@sikka/hawa 0.2.1 → 0.2.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/dist/index.d.mts +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useTabs.ts +37 -0
- package/src/layout/AppLayout.tsx +10 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/elements/HawaCheckbox.tsx","../src/elements/HawaPanelTabs.tsx","../src/elements/HawaChip.tsx","../src/elements/HawaIconCount.tsx","../src/elements/HawaSettingsRow.tsx","../src/elements/HawaTextField.tsx","../src/elements/Label.tsx","../src/util.ts","../src/elements/Skeleton.tsx","../src/elements/HawaColorPicker.tsx","../src/elements/HawaRange.tsx","../src/elements/HawaRadio.tsx","../src/elements/HawaSelect.tsx","../src/elements/Switch.tsx","../src/elements/HawaTypography.tsx","../src/elements/HawaAlert.tsx","../src/elements/Button.tsx","../src/elements/HawaLoading.tsx","../src/elements/HawaTable.tsx","../src/hooks/useTable.ts","../src/elements/DropdownMenu.tsx","../src/elements/HawaSearchBar.tsx","../src/elements/HawaAccordion.tsx","../src/elements/HawaPhoneInput.tsx","../src/countries.ts","../src/elements/HawaTabs.tsx","../src/elements/HawaModal.tsx","../src/elements/HawaMenu.tsx","../src/elements/HawaCopyrights.tsx","../src/elements/HawaStepper.tsx","../src/elements/HawaStats.tsx","../src/elements/Card.tsx","../src/elements/HawaCodeBlock.tsx","../src/elements/Tooltip.tsx","../src/hooks/useClipboard.ts","../src/elements/HawaDatepicker.tsx","../src/elements/DragDropImages.tsx","../src/elements/DraggableCard.tsx","../src/elements/Breadcrumb.tsx","../src/elements/SubsectionList.tsx","../src/elements/UsageCard.tsx","../src/elements/InvoiceAccordion.tsx","../src/elements/UserFeedback.tsx","../src/elements/ArrowCarousel.tsx","../src/elements/FloatingComment.tsx","../src/elements/FloatingCommentSlate.tsx","../src/elements/FloatingCommentExec.tsx","../src/elements/BackToTop.tsx","../src/elements/HawaInlineCode.tsx","../src/elements/Timeline.tsx","../src/elements/HawaPinInput.tsx","../src/elements/HawaItemCard.tsx","../src/elements/HawaPricingCard.tsx","../src/elements/HawaAdCard.tsx","../src/elements/HawaLandingCard.tsx","../src/elements/HawaButton.tsx","../src/elements/HawaStoreButtons.tsx","../src/elements/ActionCard.tsx","../src/elements/StickyFeatures.tsx","../src/elements/UserReferralSource.tsx","../src/elements/Textarea.tsx","../src/elements/Icons.tsx","../src/elements/Carousel.tsx","../src/hooks/useCarousel.ts","../src/elements/Input.tsx","../src/elements/InterfaceSettings.tsx","../src/elements/Popover.tsx","../src/elements/Tabs.tsx","../src/elements/Separator.tsx","../src/elements/Toast.tsx","../src/elements/Toaster.tsx","../src/hooks/useToast.ts","../src/elements/Dialog.tsx","../src/layout/Box.tsx","../src/layout/HawaBottomAppBar.tsx","../src/layout/HawaSiteLayout.tsx","../src/hooks/useDiscloser.ts","../src/hooks/useBreakpoint.ts","../src/layout/AppLayout.tsx","../src/layout/Sidebar.tsx","../src/layout/HawaAppLayout.tsx","../src/layout/HawaAppLayoutSimplified.tsx","../src/layout/HawaContainer.tsx","../src/layout/HawaGrid.tsx","../src/layout/AppSidebar.tsx","../src/layout/Footer.tsx","../src/layout/Banner.tsx","../src/blocks/Account/UserProfileForm.tsx","../src/blocks/Account/UserSettingsForm.tsx","../src/blocks/AuthForms/AppLanding.tsx","../src/blocks/AuthForms/SignInPhone.tsx","../src/blocks/AuthForms/SignInForm.tsx","../src/blocks/AuthForms/SignInBlock.tsx","../src/blocks/AuthForms/SignUpForm.tsx","../src/blocks/AuthForms/NewPasswordForm.tsx","../src/blocks/AuthForms/ResetPasswordForm.tsx","../src/blocks/AuthForms/CodeConfirmation.tsx","../src/blocks/AuthForms/CheckEmail.tsx","../src/blocks/Payment/SelectPayment.tsx","../src/blocks/Payment/CreditCardForm.tsx","../src/blocks/Payment/ChargeWalletForm.tsx","../src/blocks/Payment/PayWithWallet.tsx","../src/blocks/Payment/CheckoutForm.tsx","../src/blocks/Payment/Confirmation.tsx","../src/blocks/Pricing/PricingPlans.tsx","../src/blocks/Pricing/ComparingPlans.tsx","../src/blocks/Pricing/HorizontalPricing.tsx","../src/blocks/Referral/ReferralAccount.tsx","../src/blocks/Referral/ReferralSettlement.tsx","../src/blocks/Referral/ReferralStats.tsx","../src/blocks/Misc/NotFound.tsx","../src/blocks/Misc/EmptyState.tsx","../src/blocks/Misc/Testimonial.tsx","../src/blocks/Misc/LeadGenerator.tsx","../src/blocks/Misc/Announcement.tsx","../src/blocks/Misc/NoPermission.tsx","../src/hooks/useHover.ts"],"names":["React","useEffect","useState","clsx","HawaCheckbox","props","isChecked","setVal","e","HawaPanelTabs","value","setValue","option","o","indx","HawaChip","label","size","icon","color","dot","dotType","defaultStyles","sizeStyles","dotStyles","dotTypeStyles","HawaIconCount","LabelPrimitive","cva","twMerge","cn","inputs","labelVariants","Label","className","ref","Skeleton","HawaTextField","margin","width","preview","marginStyles","widthStyles","defaultStyle","defaultInputStyle","previewInputStyle","HawaColorPicker","selectedColor","setSelectedColor","HawaRange","handleChange","startElement","endElement","rangeValue","setRangeValue","useRef","HawaRadio","design","orientation","selectedOption","setSelectedOption","activeTabStyle","inactiveTabStyle","orientationStyle","widthStyle","parentDirection","setParentDirection","dir","opt","i","Select","CreatableSelect","Control","cx","children","getStyles","innerProps","innerRef","Menu","Option","HawaSelect","base","newValue","action","SwitchPrimitives","rootSize","thumbSize","Switch","parentRef","HawaSettingsRow","settingsLabel","settingsType","settingsDescription","colorProps","rangeProps","radioProps","switchProps","selectProps","HawaTypography","HawaLoading","animationStyles","buttonVariants","Button","variant","asChild","isLoading","Comp","loadingColor","HawaAlert","direction","severity","duration","alertRef","closed","setClosed","timeoutHide","timeoutDestroy","closeButtonStyle","act","index","calculateRange","data","rowsPerPage","range","num","sliceData","page","sortData","sortColumn","sortDirection","a","b","aValue","bValue","useTable","tableRange","setTableRange","slice","setSlice","sortedData","slicedData","useTable_default","DropdownMenuPrimitive","DropdownMenuRoot","DropdownMenuTrigger","DropdownMenuPortal","DropdownMenuSub","DropdownMenuSubTrigger","inset","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenu","trigger","items","onItemSelect","side","triggerClassname","align","alignOffset","selectCallback","item","subitem","subIndex","ChevronIcon","HawaTable","bodyColor","headerColor","borders","highlightFirst","bordersWidth","pagination","perPage","setPerPage","enteredPage","setEnteredPage","setPage","sortingCol","setSortingCol","sortedRows","setSortedRows","setSortColumn","setSortDirection","isRTL","handleSort","colIndex","sortable","prevDirection","changePage","col","singleRow","rowIndex","lastRow","r","firstCell","lastCell","isRTLLastCell","isRTLFirstCell","isLTRFirstCell","isLTRLastCell","el","HawaSearchBar","HawaAccordion","collapse","setCollapse","countries","countries_default","HawaPhoneInput","selectedCountry","setSelectedCountry","state","HawaTabs","marginBetween","pill","containerStyle","tabsStyle","tab","HawaModal","open","title","onClose","closeOnClickOutside","HawaMenu","menuItems","withHeader","headerTitle","headerSubtitle","onClickOutside","actionedItem","position","menuOpened","setMenuOpened","childrenRef","childrenHeight","setChildrenHeight","childrenWidth","setChildrenWidth","menuRef","menuWidth","setMenuWidth","menuHeight","setMenuHeight","handleClickOutside","event","menuCoordinates","spacing","group","HawaCopyrights","HawaStepper","orientationStyles","lineStyles","step","Card","clickable","CardHeader","CardTitle","CardDescription","CardContent","headless","CardFooter","HawaStats","TooltipPrimitive","TooltipContent","TooltipArrow","Tooltip","content","defaultOpen","onOpenChange","delayDuration","useClipboard","timeout","error","setError","copied","setCopied","copyTimeout","setCopyTimeout","handleCopyResult","valueToCopy","err","HawaCodeBlock","tabs","code","fileName","clipboard","selectedTab","setSelectedTab","HawaDatepicker","selectedDate","setSelectedDate","useDropzone","DragDropImages","texts","files","setFiles","setDeletedFiles","onAcceptedFiles","errorMessages","maxFiles","accept","showPreview","onDeleteFile","onClearFiles","disclaimer","maxSize","termsLink","privacyLink","cmp","setCmp","max","setMax","getRootProps","getInputProps","fileRejections","acceptedFiles","isDragActive","file","clearAllFiles","sizes","errs","rej","thumbs","DraggableCard","SubsectionList","subsections","selectedSection","setSelectedSection","ss","s","SubsectionItem","chip","selected","onItemClick","UsageCard","InvoiceAccordion","InvoiceItemProp","expanded","setExpanded","product","UserFeedback","answered","setAnswered","clickedOption","setClickedOption","closingTimer","setClosingTimer","popUpRef","boxPosition","slowClose","op","Arrow","ArrowCarousel","setIndex","Property","stylers","lineBreakIdentifier","FloatingComment","text","_setText","field","_text","setText","getChildIndex","child","getRelativePrecedingSum","element","endIndex","node","getLinePrecedingSum","lineNode","lineNodes","getSelectionPrecedingSum","name","selection","nodes","parent","sum","isNodeLine","spanIndex","lineIndex","getFieldSelection","startPrecedingSum","endPrecedingSum","start","end","startNode","endNode","total","sel","getRange","result","intersection","setA","setB","_intersection","elem","getMinimum","array","getMaximum","getCorrelation","styling1","styling2","indices1","indices2","stylingSplice","correlations","stylings","current","type","_","styling","c","__","_index","added","stylingIntersect","intersections","finish","indices","perform","id","selectionStart","selectionEnd","correlation","getIntersectStylings","startOffset","finishOffset","getStylingsInRange","startIndex","splitStyling","offset","first","second","additionTo","length","defaultBehavior","deletionOf","processNormal","difference","processPaste","pasteLength","additionStart","removalStart","removalEnd","processDrop","dropStart","dropEnd","dropLength","dragStart","dragEnd","dropDifference","dragStylings","onChange","getContent","lineIndices","character","lineStart","lineEnd","lineContent","lineStylings","spans","last","html","line","span","getTextDirection","textContent","eventType","split","anchorNode","focusNode","eventData","_content","originalLine","lines","useCallback","Editor","createEditor","Slate","Editable","withReact","initialValue","styles","Leaf","keys","key","types","FloatingCommentSlate","editor","renderLeaf","ReactDOMServer","base64","Image","FloatingCommentExec","acronym","BackToTop","visible","setVisible","rect","_setRect","_rect","setRect","self","getCoords","anchor","onScroll","scrollTop","scrollLeft","backToTop","interval","newRect","corner","vertical","horizontal","anchorRect","selfRect","height","HawaInlineCode","Timeline","HawaPinInput","digits","getPins","pin","setPin","handleKeyDown","backTo","newPin","HawaItemCard","actions","counts","headerActions","clickableImage","clickableImageAction","clickableImageActionText","clickableImageActionIcon","header","cardImage","imageStyles","headerActionsButtonStyle","openActionHeader","setOpenActionHeader","handleOpenActionHeader","HawaPricingCard","currentPlan","feature","HawaAdCard","adRef","cardStyles","HawaLandingCard","disabledSyles","disabledVariantSyles","baseStyles","containerWidthStyles","variantStyles","colorStyles","HawaButton","disabled","tooltip","tooltipSize","tooltipPosition","tooltipDirection","margins","badge","edgeCorner","feedback","isClicked","setIsClicked","buttonText","setButtonText","handleClick","HawaStoreButtons","ActionCard","hovered","setHovered","StickyFeatures","f","Textarea","UserReferralSource","Icons","useCarousel","imageWidth","isDragging","setIsDragging","startDragX","setStartDragX","setScrollLeft","containerRef","findClosestSnapPoint","handleMouseDown","handleMouseLeave","handleDragEnd","handleMouseUp","closestSnapPoint","walk","useCarousel_default","Carousel","images","handleMouseMove","image","Input","InterfaceSettings","setColor","language","setLanguage","PopoverPrimitive","PopoverContent","Popover","TabsPrimitive","TabsContext","Tabs","TabsList","TabsTrigger","TabsContent","SeparatorPrimitive","Separator","decorative","ToastPrimitives","toastVariants","ToastProvider","ToastViewport","Toast","ToastAction","ToastClose","ToastTitle","ToastDescription","TOAST_LIMIT","TOAST_REMOVE_DELAY","count","genId","toastTimeouts","addToRemoveQueue","toastId","dispatch","reducer","t","toast","listeners","memoryState","listener","update","dismiss","useToast","setState","Toaster","toasts","description","toastProps","DialogPrimitive","Dialog","DialogTrigger","DialogPortal","DialogOverlay","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Box","HawaBottomAppBar","singleContent","useDiscloser","setOpen","useDiscloser_default","useBreakpoint","breakpoint","setBreakpoint","resize","useBreakpoint_default","HawaSiteLayout","navigationSize","openSideMenu","setOpenSideMenu","openSubItem","setOpenSubItem","isOpen","onOpen","drawerItemRef","keepOpen","setKeepOpen","ltrDrawerStyle","rtlDrawerStyle","navigationSizeStyles","ltrChildrenStyle","rtlChildrenStyle","AccordionPrimitive","Accordion","triggerStyles","AccordionItem","AccordionTrigger","showArrow","AccordionContent","SidebarGroup","selectedItem","openedItem","setOpenedItem","onSubItemClick","idx","SidebarItem","getSelectedStyle","AppLayout","drawerSize","onSettingsClick","DrawerFooterActions","currentPage","clickedItem","closeDrawerWidth","openDrawerWidth","drawerSizeStyle","openedSidebarItem","setOpenedSidebarItem","setSelectedItem","drawerSizeCondition","values","FaChevronRight","HawaAppLayout","setOpenSubitem","drawerDefaultStyle","dSection","dIndex","dItem","subIt","HawaAppLayoutSimplified","AvatarIcon","ArrowIcon","pointing","directionStyle","HawaContainer","maxWidth","centered","maxWidthStyles","HawaGrid","AppSidebar","BsInstagram","BsTwitter","FaSnapchatGhost","FaTiktok","Footer","variation","pagesSection","singlePage","HawaBanner","bannerRef","bannerStyle","Controller","FormProvider","useForm","UserProfileForm","methods","errors","handleSubmit","control","UserSettingsForm","AppLanding","SignInPhone","userPhone","setUserPhone","SignInForm","SignInBlock","SignUpForm","fld","NewPasswordForm","matchError","setMatchError","handleSubmission","ResetPasswordForm","register","CodeConfirmation","pins","setPins","CheckEmail","handleResend","SelectPayment","selectedMethod","setSelectedMethod","CreditCardForm","cardNumber","setCardNumber","cardType","setCardType","getCardType","card_bin","visa_regex","mastercard_regex","amex_regex","mada_regex","meeza_regex","card_type","onCardNumberChange","cardTypeSlug","ChargeWalletForm","walletAmount","setWalletAmount","PayWithWallet","CheckoutForm","isArabic","country","ConfirmationPage","PricingPlans","plan","CheckMark","UncheckMark","ComparingPlans","currentCurrency","setCurrentCurrency","currentCycle","setCurrentCycle","HorizontalPricing","selectedCard","setSelectedCard","d","CheckIcons","CardText","CardPrice","ReferralAccount","referralLink","referralCode","ReferralSettlement","withdrawError","SettlementAccountCard","ReferralStats","NumberCard","ReferralSignUpCard","NotFound","EmptyState","onActionClick","Testimonial","LeadGenerator","handleNewsletterSub","Announcement","NoPermission"],"mappings":"AAAA,OAAOA,IAAS,aAAAC,GAAW,YAAAC,OAAoB,QAC/C,OAAOC,OAAU,OAWV,IAAMC,GAAoCC,GAAU,CACzD,GAAM,CAACC,EAAWC,CAAM,EAAIL,GAASG,EAAM,GAAG,EAE9C,OAAAJ,GAAU,IAAM,CACdI,EAAM,SAASC,CAAS,CAC1B,EAAG,CAACA,CAAS,CAAC,EAEZN,GAAA,cAAC,OACC,UAAWG,GACTE,EAAM,SACF,0CACA,0BACN,GAEAL,GAAA,cAAC,SACC,KAAK,WACL,QAASM,EACT,SAAWE,GAAMD,EAAOC,EAAE,OAAO,OAAO,EACxC,GAAIH,EAAM,GACV,aAAYA,EAAM,MAClB,UAAU,mLACZ,GACEA,EAAM,OAASA,EAAM,aACrBL,GAAA,cAAC,OACC,UAAU,qCACV,QAAUQ,GAAMD,EAAO,CAACD,CAAS,GAEhCD,EAAM,OACLL,GAAA,cAAC,SAAM,UAAU,6DACdK,EAAM,KACT,EAEDA,EAAM,YACLL,GAAA,cAAC,KAAE,UAAU,oDACVK,EAAM,UACT,CAEJ,CAEJ,CAEJ,ECrDA,OAAOL,IAAS,YAAAE,OAAoB,QAS7B,IAAMO,GAAqCJ,GAAU,CAC1D,GAAM,CAACK,EAAOC,CAAQ,EAAIT,GAASG,EAAM,YAAY,EACrD,OACEL,GAAA,cAAC,WACCA,GAAA,cAAC,OAAI,UAAU,sDACbA,GAAA,cAAC,MACC,UAAU,wDACV,GAAG,QACH,mBAAiB,gBACjB,KAAK,WAEJK,EAAM,QAAQ,IAAI,CAACO,EAAaC,IAE7Bb,GAAA,cAAC,MAAG,IAAKa,EAAG,UAAU,OAAO,KAAK,gBAChCb,GAAA,cAAC,UACC,UAAU,8JACV,GAAI,GAAGY,EAAO,KAAK,OACnB,mBAAkB,IA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,EACA,QAAS,IAAMC,EAAY,CAACD,CAAQ,EACpC,wBAAuB,4BAA8B7M,EAAM,MAC3D,gBAAc,OACd,gBAAe,2BAA6BA,EAAM,OAElDL,GAAA,cAAC,YAAMK,EAAM,KAAM,EACnBL,GAAA,cAAC,OACC,sBAAoB,GACpB,UAAW,WACTkN,EAAW,GAAK,YAClB,4BACA,KAAK,eACL,QAAQ,aAERlN,GAAA,cAAC,QACC,SAAS,UACT,EAAE,qHACF,SAAS,UACV,CACH,CACF,EACAA,GAAA,cAAC,OACC,GAAI,2BAA6BK,EAAM,MACvC,kBAAiB,8BAAgCA,EAAM,MACvD,UAAWF,GACT+M,EAAW,2BAA6B,iBACxC,yGACF,GAEAlN,GAAA,cAAC,KAAE,UAAU,yCAAyCK,EAAM,OAAQ,CACtE,CACF,CAEJ,ECxDA,OAAOL,IAAS,YAAAE,OAAoB,QCApC,IAAIkN,GAAiB,CACnB,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,uBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,MAAO,UACP,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EAEA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,iBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,uBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EAEA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,IACT,EACA,CACE,cAAe,0BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,2BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,sBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,wBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,qBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,iBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,yCACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,sBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,iCACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EAEA,CACE,cAAe,iBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,2BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,iBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EAEA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,wBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,0BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EAEA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,IACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EAEA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,uBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,+BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,yBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,IACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aAEf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,2BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,yBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,sBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT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AAS,CAC5C,EACAL,GAAA,cAACsG,EAAA,CAAO,QAAS,IAAMytB,EAAc,GAAI1zB,EAAM,UAAW,CAC5D,CACF,EC7BJ,OAAOL,OAAmB,QAUnB,IAAMo0B,GAAkC,CAAC,CAAE,MAAAzhB,CAAM,IAEpD3S,GAAA,cAACmQ,EAAA,KACCnQ,GAAA,cAACwQ,EAAA,CAAY,SAAQ,IACnBxQ,GAAA,cAAC,OAAI,UAAU,yDACbA,GAAA,cAAC,OAAI,UAAU,0HACbA,GAAA,cAAC,OACC,OAAO,eACP,KAAK,eACL,YAAY,IACZ,QAAQ,cACR,OAAO,SACP,MAAM,UAENA,GAAA,cAAC,QAAK,EAAE,uNAAuN,CACjO,EAAO,GACT,EACAA,GAAA,cAAC,OAAI,UAAU,yBACZ2S,GAAO,OAAS,2BACnB,EACA3S,GAAA,cAAC,WACE2S,GAAO,UACN,0FACJ,CACF,CACF,CACF,ECpCJ,OAAgB,aAAA1S,GAAW,UAAAsD,GAAQ,YAAArD,OAAgB","sourcesContent":["import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype TCheckBoxTypes = {\n centered?: boolean\n label?: any\n helperText?: any\n id: string\n onChange?: (e) => void\n val?: boolean\n}\n\nexport const HawaCheckbox: FC<TCheckBoxTypes> = (props) => {\n const [isChecked, setVal] = useState(props.val)\n\n useEffect(() => {\n props.onChange(isChecked)\n }, [isChecked])\n return (\n <div\n className={clsx(\n props.centered\n ? \"flex h-full items-center justify-center\"\n : \"flex h-full items-start \"\n )}\n >\n <input\n type=\"checkbox\"\n checked={isChecked}\n onChange={(e) => setVal(e.target.checked)}\n id={props.id}\n aria-label={props.label}\n className=\"mt-3 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-blue-600\"\n />\n {(props.label || props.helperText) && (\n <div\n className=\" flex cursor-pointer flex-col py-2\"\n onClick={(e) => setVal(!isChecked)}\n >\n {props.label && (\n <label className=\"mx-2 text-sm font-medium text-gray-900 dark:text-gray-300\">\n {props.label}\n </label>\n )}\n {props.helperText && (\n <p className=\"mx-2 mt-1 text-xs text-red-600 dark:text-red-500\">\n {props.helperText}\n </p>\n )}\n </div>\n )}\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\n\ntype PanelTabsTypes = {\n defaultValue: any\n options: [{ label: string; value: string }]\n lang: any\n handleChange: any\n location: any\n}\nexport const HawaPanelTabs: FC<PanelTabsTypes> = (props) => {\n const [value, setValue] = useState(props.defaultValue)\n return (\n <div>\n <div className=\"mb-4 border-b border-gray-200 dark:border-gray-700\">\n <ul\n className=\"-mb-px flex flex-wrap text-center text-sm font-medium\"\n id=\"myTab\"\n data-tabs-toggle=\"#myTabContent\"\n role=\"tablist\"\n >\n {props.options.map((option: any, o) => {\n return (\n <li key={o} className=\"mr-2\" role=\"presentation\">\n <button\n className=\"inline-block rounded-t-lg border-b-2 border-blue-600 p-4 text-blue-600 hover:text-blue-600 dark:border-blue-500 dark:text-blue-500 dark:hover:text-blue-500\"\n id={`${option.value}-tab`}\n data-tabs-target={`#${option.value}`}\n type=\"button\"\n role=\"tab\"\n aria-controls={option.value}\n aria-selected=\"true\"\n >\n {option.label}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n <div id=\"myTabContent\">\n {props.options.map((option: any, indx) => {\n return (\n <div\n key={indx}\n className=\"rounded bg-gray-50 p-4 dark:bg-gray-800\"\n id={`${option.value}`}\n role=\"tabpanel\"\n aria-labelledby={`${option.value}-tab`}\n >\n {option.content}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype TChipTypes = {\n /** The text inside the chip */\n label: string\n /** The small icon before the chip label */\n icon?: JSX.Element\n /** The color of the chip, must be a tailwind color */\n color?: string\n /** The size of the chip */\n size?: \"small\" | \"normal\" | \"large\"\n /** Enable/Disable the dot before the label of the chip */\n dot?: boolean\n /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */\n dotType?: \"available\" | \"unavailable\"\n}\n\nexport const HawaChip: FC<TChipTypes> = ({\n label,\n size = \"normal\",\n icon,\n color,\n dot,\n dotType = \"available\",\n}) => {\n let defaultStyles =\n \"flex flex-row w-fit gap-1 items-center rounded px-2.5 py-0.5 font-bold text-blue-800 dark:bg-blue-200 dark:text-blue-800\"\n let sizeStyles = {\n small: \"h-full leading-4 px-1 py-0 text-[9px] gap-0.5 \",\n normal: \"h-fit text-xs\",\n large: \"\",\n }\n\n let dotStyles = {\n small: \"flex h-1 w-1 rounded-full\",\n normal: \"flex h-2 w-2 rounded-full\",\n large: \"flex h-3 w-3 rounded-full\",\n }\n let dotTypeStyles = {\n available: \"bg-green-500\",\n unavailable: \"bg-red-500\",\n }\n return (\n <span\n className={clsx(\n defaultStyles,\n sizeStyles[size],\n color ? `bg-${color}-100 text-${color}-500` : \"bg-layoutPrimary-500\"\n )}\n >\n {dot && (\n <span className={clsx(dotStyles[size], dotTypeStyles[dotType])}></span>\n )}\n {icon && icon}\n {label}\n </span>\n )\n}\n","import React, { FC } from \"react\"\n\ntype IconCountTypes = {\n /** The icon of the counter */\n icon: JSX.Element\n /** The text next to the icon */\n count?: string\n}\n\nexport const HawaIconCount: FC<IconCountTypes> = (props) => {\n return (\n <div className=\"flex h-fit flex-row items-center gap-2 px-2\">\n <div>{props.icon}</div>\n <div className=\"text-sm\">{props.count}</div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaTextField } from \"./HawaTextField\"\nimport { HawaColorPicker } from \"./HawaColorPicker\"\nimport { HawaRange } from \"./HawaRange\"\nimport { HawaRadio } from \"./HawaRadio\"\nimport { HawaSelect } from \"./HawaSelect\"\nimport { Switch } from \"./Switch\"\n\ntype SettingsRowTypes = {\n settingsLabel: string\n settingsType: \"text\" | \"radio\" | \"boolean\" | \"color\" | \"range\" | \"select\"\n settingsDescription?: string\n radioProps: {\n defaultValue: any\n onChangeTab: any\n options: [{ label: string; value: any }]\n }\n colorProps: {\n color?: any\n handleChange?: any\n }\n rangeProps: {\n min?: any\n max?: any\n }\n switchProps: {\n size: \"sm\" | \"default\"\n }\n selectProps: {\n label?: string\n options?: any[any]\n isCreatable?: boolean\n isClearable?: boolean\n isMulti?: boolean\n isSearchable?: boolean\n onChange?: any\n helperText?: any\n onInputChange?: any\n native?: any\n fullWidth?: any\n value?: any\n children?: any\n getOptionLabel?: any\n disabled?: boolean\n }\n}\n\nexport const HawaSettingsRow: FC<SettingsRowTypes> = ({\n settingsLabel,\n settingsType,\n settingsDescription,\n colorProps,\n rangeProps,\n radioProps,\n switchProps,\n selectProps,\n}) => {\n return (\n <div className=\"flex max-h-fit flex-row items-center justify-between rounded align-middle\">\n <div>\n <div className=\"text-sm\">{settingsLabel}</div>\n {settingsDescription && (\n <div className=\"text-xs\">{settingsDescription}</div>\n )}{\" \"}\n </div>\n {settingsType === \"text\" && <HawaTextField margin=\"none\" width=\"small\" />}\n {settingsType === \"boolean\" && <Switch {...switchProps} />}\n {settingsType === \"range\" && <HawaRange {...rangeProps} />}\n {settingsType === \"color\" && <HawaColorPicker {...colorProps} />}\n {settingsType === \"radio\" && <HawaRadio {...radioProps} />}\n {settingsType === \"select\" && <HawaSelect {...selectProps} />}\n </div>\n )\n}\n","import React, { FC, PropsWithRef } from \"react\"\nimport { Label } from \"./Label\"\nimport { cn } from \"../util\"\nimport { Skeleton } from \"./Skeleton\"\n\n// TODO: make icon based on direction\n// TODO: Preferebly use context to pass direction rtl | ltr\n\ntype TextFieldTypes = {\n isLoading?: boolean\n margin?: \"none\" | \"normal\" | \"large\"\n width?: \"small\" | \"normal\" | \"full\"\n /** The label of the input field */\n label?: any\n /** Disable/Enable multiple line text input field */\n multiline?: boolean\n /** The small red text under the input field to show validation or a hint. */\n helpertext?: any\n /** The value of the input field */\n value?: any\n props?: PropsWithRef<\"input\">\n /** The type of input field. Same as the types of <input/> component */\n type?: any\n /** The placeholder of the input field */\n placeholder?: any\n defaultValue?: any\n name?: any\n inputProps?: any\n onChange?: any\n ref?: any\n /** The icon inside the input field */\n icon?: any\n /** Boolean to enable/disable editing the input field and using it as a text field */\n preview?: boolean\n autoComplete?: any\n maxLength?: any\n iconInside?: React.ReactNode\n}\n\nexport const HawaTextField: FC<TextFieldTypes> = ({\n margin = \"normal\",\n width = \"full\",\n preview = false,\n ...props\n}) => {\n let marginStyles = {\n none: \"mb-0\",\n normal: \"mb-3\",\n large: \"mb-5\",\n }\n let widthStyles = {\n small: \"w-full max-w-2xs\",\n normal: \"w-1/2\",\n full: \"w-full\",\n }\n\n let defaultStyle = \"flex max-h-fit relative flex-col justify-center gap-2\"\n let defaultInputStyle =\n \"block w-full rounded border transition-all bg-background p-2 text-sm text-black dark:text-white focus:border-blue-500 focus:ring-blue-500\"\n let previewInputStyle =\n \"block w-full rounded bg-gray-50 p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500\"\n // \"mb-0 block w-full rounded border border-gray-300 bg-gray-50 p-2 text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500\",\n\n return (\n <div className={cn(defaultStyle, marginStyles[margin], widthStyles[width])}>\n {props.label && <Label>{props.label}</Label>}\n {props.isLoading ? (\n <Skeleton className=\"h-[38px] w-full\" />\n ) : (\n <>\n <div\n className={cn(\n \"absolute top-[22px] h-[0.8px] w-full bg-gray-200 transition-all dark:bg-gray-800\",\n preview ? \"opacity-100\" : \"opacity-0\"\n )}\n ></div>\n <>\n <div className={cn(\"relative\")}>\n {props.icon && (\n <div className=\"absolute left-3 top-1/2 -translate-y-1/2\">\n {props.icon}\n </div>\n )}\n <input\n {...props}\n className={cn(\n defaultInputStyle,\n props.icon && \"pl-10\",\n preview && \"border-transparent bg-transparent px-0\"\n )}\n disabled={preview}\n />\n </div>\n {props.iconInside && (\n <div className=\"absolute right-1 top-[41px] -translate-y-1/2\">\n {props.iconInside}\n </div>\n )}\n {props.helpertext ? (\n <p className=\"mb-0 mt-0 text-xs text-red-600 dark:text-red-500\">\n {props.helpertext}\n </p>\n ) : null}\n </>\n </>\n )}\n </div>\n )\n}\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../util\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n))\n\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\ntype Palette = {\n name: string\n colors: {\n [key: number]: string\n }\n}\ntype Rgb = {\n r: number\n g: number\n b: number\n}\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\")\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n )\n\n if (!colorParts) {\n return null\n }\n\n const [, r, g, b] = colorParts\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16),\n } as Rgb\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2)\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`\n}\n\nfunction getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color)\n\n if (!rgbColor) {\n return \"#333\"\n }\n\n const { r, g, b } = rgbColor\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b\n\n return luma < 120 ? \"#FFF\" : \"#333\"\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`)\n\n if (!color) {\n return \"\"\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity)\n const g = Math.round(color.g + (255 - color.g) * intensity)\n const b = Math.round(color.b + (255 - color.b) * intensity)\n\n return rgbToHex(r, g, b)\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex)\n\n if (!color) {\n return \"\"\n }\n\n const r = Math.round(color.r * intensity)\n const g = Math.round(color.g * intensity)\n const b = Math.round(color.b * intensity)\n\n return rgbToHex(r, g, b)\n}\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\"),\n },\n }\n\n const intensityMap: {\n [key: number]: number\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49,\n }\n\n ;[50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level])\n })\n ;[600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level])\n })\n\n return response as Palette\n}\n\nexport { getPallette }\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import React from \"react\"\nimport { cn } from \"../util\"\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import React, { useState, FC, ChangeEvent } from \"react\"\n\ntype ColorPickerTypes = {\n /** The hex code for the color */\n color?: any\n /** Fires everytime the color changes */\n handleChange?: (e: ChangeEvent<HTMLInputElement>) => void\n}\n\nexport const HawaColorPicker: FC<ColorPickerTypes> = (props) => {\n const [selectedColor, setSelectedColor] = useState(props.color)\n return (\n <div className={`flex w-fit flex-row rounded border p-0`}>\n <div\n style={{ backgroundColor: selectedColor }}\n className=\"rounded-bl-lg rounded-tl-lg\"\n >\n <input\n type=\"color\"\n value={selectedColor}\n onChange={(e) => {\n setSelectedColor(e.target.value)\n props.handleChange(e)\n }}\n className=\"opacity-0\"\n />\n </div>\n\n <input\n type=\"text\"\n onChange={(e) => {\n setSelectedColor(e.target.value)\n props.handleChange(e)\n }}\n value={selectedColor}\n className=\"w-24 bg-background rounded-br-lg rounded-tr-lg pl-2 pr-2\"\n />\n </div>\n )\n}\n","import React, { FC, useState } from \"react\"\n\ntype RangeTypes = {\n value?: any\n handleChange?: any\n startElement?: any\n endElement?: any\n label?: string\n min?: any\n max?: any\n}\n\nexport const HawaRange: FC<RangeTypes> = ({\n value,\n handleChange,\n startElement,\n endElement,\n label,\n ...props\n}) => {\n const [rangeValue, setRangeValue] = useState(value)\n\n return (\n <div {...props}>\n {label && (\n <label\n htmlFor=\"default-range\"\n className=\"mb-2 block text-sm font-medium text-gray-900 dark:text-gray-300\"\n >\n {label}\n </label>\n )}\n <div className=\"flex w-fit flex-row items-center justify-center\">\n <div className=\"mr-2\">{startElement}</div>{\" \"}\n <input\n id=\"default-range\"\n type=\"range\"\n value={rangeValue}\n onChange={(e) => {\n setRangeValue(e.target.value)\n handleChange(e)\n }}\n className=\"h-2 w-fit cursor-pointer appearance-none rounded bg-gray-200 dark:bg-gray-700\"\n />\n <div className=\"ml-2\">{endElement}</div>{\" \"}\n </div>\n </div>\n )\n}\n","import React, { useState, FC, useRef, useEffect } from \"react\"\nimport { cn } from \"../util\"\n\ntype RadioTypes = {\n orientation?: \"vertical\" | \"horizontal\"\n design?: \"default\" | \"tabs\" | \"cards\" | \"bordered\"\n options?: {\n value: any\n label: any\n disabled?: any\n sublabel?: any\n icon?: any\n }[]\n width?: \"default\" | \"full\"\n onChangeTab?: any\n defaultValue?: any\n}\nexport const HawaRadio: FC<RadioTypes> = ({\n design = \"default\",\n width = \"default\",\n orientation = \"horizontal\",\n ...props\n}) => {\n const [selectedOption, setSelectedOption] = useState(props.defaultValue)\n let activeTabStyle =\n \"inline-block py-2 px-4 w-full text-primary-foreground bg-primary active dark:bg-primary \"\n let inactiveTabStyle =\n \"inline-block py-2 px-4 w-full transition-all hover:bg-primary/10 dark:bg-background bg-primary/5 hover:text-gray-900 dark:hover:bg-primary/10 dark:hover:text-white dark:bg-primary/5\"\n let orientationStyle = {\n horizontal: \"flex flex-row\",\n vertical: \"flex flex-col\",\n }\n let widthStyle = {\n default: \"max-w-fit\",\n full: \"w-full\",\n }\n const [parentDirection, setParentDirection] = useState(null)\n const ref = useRef(null)\n\n useEffect(() => {\n if (ref.current && ref.current.parentNode) {\n const dir = window.getComputedStyle(ref.current.parentNode).direction\n setParentDirection(dir)\n }\n })\n\n switch (design) {\n case \"tabs\":\n return (\n <ul\n ref={ref}\n className={cn(\n props.options?.length > 2\n ? \"flex-wrap xs:max-w-full xs:flex-nowrap\"\n : \"\",\n \"select-none whitespace-nowrap rounded border text-center text-sm font-medium\",\n widthStyle[width],\n orientationStyle[orientation]\n )}\n >\n {props.options?.map((opt: any, o) => (\n <li\n aria-current=\"page\"\n onClick={() => {\n setSelectedOption(opt.value)\n props.onChangeTab(opt.value)\n }}\n className={cn(\n \"w-full cursor-pointer \",\n orientation === \"horizontal\" &&\n parentDirection === \"ltr\" &&\n \"rounded-none first:rounded-l last:rounded-r\",\n orientation === \"horizontal\" &&\n parentDirection === \"rtl\" &&\n \"rounded-none first:rounded-r last:rounded-l\",\n orientation === \"vertical\" &&\n \"rounded-none first:rounded-t last:rounded-b\",\n\n \"last flex flex-row items-center justify-center gap-2 \",\n selectedOption === opt.value ? activeTabStyle : inactiveTabStyle\n // \"bg-red-500\"\n )}\n key={o}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </li>\n ))}\n </ul>\n )\n case \"bordered\":\n return (\n <div className={cn(orientationStyle[orientation], \"gap-4\")}>\n {props.options.map((opt, i) => (\n <div className=\"rounded border border-gray-200 \">\n <div\n className=\"radio-item radio-item-bordered flex items-center transition-all\"\n key={i + 1}\n >\n <input\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name=\"bordered-radio\"\n // className=\"h-4 w-4 border-gray-300 \"\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"ml-2 w-full p-4 pl-3 text-sm font-medium dark:text-white\",\n opt.disabled ? \"opacity-50\" : \"cursor-pointer text-gray-900\"\n )}\n >\n {opt.label}\n </label>\n </div>\n </div>\n ))}\n </div>\n )\n case \"cards\":\n return (\n <ul className={cn(orientationStyle[orientation], \"gap-4\")}>\n {props.options?.map((opt: any, o) => (\n <li>\n <input\n type=\"radio\"\n id={opt.value.toString()}\n name=\"cards-radio\"\n value={opt.value.toString()}\n className=\"peer hidden\"\n required\n disabled={opt.disabled}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"inline-flex h-full w-full items-center justify-between rounded-lg border border-gray-200 bg-white p-5 text-gray-500 peer-checked:border-blue-600 peer-checked:text-blue-600 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:peer-checked:text-primary\",\n opt.disabled\n ? \"opacity-50\"\n : \"cursor-pointer hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300\"\n )}\n >\n <div className=\"block h-full w-full\">\n <div className=\"w-full text-lg font-semibold\">\n {opt.label}\n </div>\n <div className=\"w-full\">{opt.sublabel}</div>\n </div>\n {/* <svg\n className=\"ml-3 h-5 w-5 \"\n aria-hidden=\"true\"\n fill=\"none\"\n viewBox=\"0 0 14 10\"\n >\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M1 5h12m0 0L9 1m4 4L9 9\"\n />\n </svg> */}\n </label>\n </li>\n ))}\n </ul>\n )\n\n default:\n return (\n <div className={cn(orientationStyle[orientation], \"gap-2\")}>\n {props.options.map((opt, i) => (\n <div\n className=\"radio-item radio-item-default flex items-center transition-all\"\n key={i + 1}\n >\n <input\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name=\"default-radio\"\n // className=\"h-4 w-4 border-gray-300 \"\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"text-sm font-medium dark:text-white\",\n opt.disabled\n ? \"text-gray-400\"\n : \"cursor-pointer text-gray-900\"\n )}\n >\n {opt.label}\n </label>\n </div>\n ))}\n </div>\n )\n }\n}\n","import clsx from \"clsx\"\nimport React, { FC } from \"react\"\nimport Select from \"react-select\"\nimport CreatableSelect from \"react-select/creatable\"\nimport { Label } from \"./Label\"\nimport { cn } from \"../util\"\nimport { Skeleton } from \"./Skeleton\"\n\ntype ControlTypes = {\n cx: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n size?: \"small\" | \"normal\" | \"large\"\n}\nconst Control: FC<ControlTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n size = \"normal\",\n ...props\n}) => {\n let sizeStyles = {\n small: \"h-7 text-xs\",\n normal: \"h-[2.36rem] text-sm\",\n large: \"\",\n }\n return (\n <div\n ref={innerRef}\n className={clsx(\n sizeStyles[size],\n \"flex w-full rounded border bg-background text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:focus:ring-blue-500\"\n )}\n {...innerProps}\n // {...props}\n >\n {children}\n </div>\n )\n}\n// The options container\ntype MenuTypes = {\n cx: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n}\nconst Menu: FC<MenuTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n ...props\n}) => {\n return (\n <div\n className=\"absolute z-10 mt-2 flex w-full flex-col justify-start rounded border bg-background p-1.5\"\n ref={innerRef}\n {...innerProps}\n // {...props}\n >\n {children}\n </div>\n )\n}\n// The single options\ntype OptionTypes = {\n cx: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n size?: \"small\" | \"normal\" | \"large\"\n}\nconst Option: FC<OptionTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n size = \"normal\",\n ...props\n}) => (\n <div\n ref={innerRef}\n className=\"flex cursor-pointer select-none flex-row items-center justify-between rounded-inner p-1 px-2 hover:bg-primary hover:text-primary-foreground\"\n {...innerProps}\n >\n {children}\n </div>\n)\n\ntype SelectTypes = {\n label?: string\n options?: {\n value: any\n label: any\n }[]\n isCreatable?: boolean\n isClearable?: boolean\n isMulti?: boolean\n isSearchable?: boolean\n onChange?: any\n helperText?: any\n onInputChange?: any\n native?: any\n width?: \"full\" | \"small\"\n value?: any\n children?: any\n getOptionLabel?: any\n disabled?: boolean\n defaultValue?: any\n isLoading?: any\n}\nexport const HawaSelect: FC<SelectTypes> = (props) => {\n return (\n <div className=\" flex w-full flex-col gap-2\">\n {props.label && <Label>{props.label}</Label>}\n\n {props.isLoading ? (\n <Skeleton className=\"h-[38px] w-full\" />\n ) : !props.isCreatable ? (\n <Select\n classNames={{\n // control: () => \"bg-blue-500 w-full\",\n container: () =>\n cn(\n \"rounded\",\n props.disabled ? \"cursor-not-allowed\" : \"cursor-pointer\"\n ),\n placeholder: () => \"px-2 text-muted-foreground\",\n input: () => \"text-white px-2\",\n valueContainer: () => \"text-white dark:text-muted-foreground\",\n singleValue: () => \"text-black dark:text-white px-2\",\n indicatorsContainer: () =>\n \" px-2 cursor-pointer text-muted-foreground\",\n }}\n unstyled\n isDisabled={props.disabled}\n options={props.options}\n defaultValue={props.defaultValue}\n isClearable={props.isClearable}\n isMulti={props.isMulti}\n isSearchable={props.isSearchable}\n onChange={(newValue: any, action) =>\n // props.onChange(newValue.label, action)\n props.onChange(newValue, action)\n }\n components={{\n Control,\n Option,\n Menu,\n }}\n getOptionLabel={props.getOptionLabel}\n />\n ) : (\n <CreatableSelect\n styles={{\n input: (base) => ({\n ...base,\n \"input:focus\": {\n boxShadow: \"none\",\n },\n }),\n\n control: (base) => ({\n ...base,\n borderRadius: \"0.75rem\",\n }),\n menu: (base) => ({\n ...base,\n borderRadius: \"0.75rem\",\n padding: 0,\n display: \"flex\",\n justifyContent: \"center\",\n }),\n menuList: (base) => ({\n ...base,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n width: \"100%\",\n }),\n option: (base) => ({\n ...base,\n borderRadius: \"0.75rem\",\n margin: 3,\n width: \"98%\",\n }),\n }}\n options={props.options}\n isClearable={props.isClearable}\n isMulti={props.isMulti}\n isSearchable={props.isSearchable}\n onCreateOption={() => console.log(\"im changing\")}\n onChange={(newValue, action) => props.onChange(newValue, action)}\n onInputChange={(newValue, action) =>\n props.onInputChange(newValue, action)\n }\n />\n )}\n {props.helperText && (\n <p className=\"mt-2 text-sm text-red-600 dark:text-red-500\">\n {props.helperText}\n </p>\n )}\n </div>\n )\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\nimport { cn } from \"../util\"\n\nlet rootSize = {\n default: \"h-[25px] w-[42px]\",\n sm: \"h-[20px] w-[37px]\",\n}\nlet thumbSize = {\n default: \"h-[21px] w-[21px]\",\n sm: \"h-[16px] w-[16px]\",\n}\n\ninterface SwitchProps\n extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {\n size?: \"default\" | \"sm\" | \"lg\" // Define the possible sizes here\n label?: string\n}\n\nexport const Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n SwitchProps\n>(({ className, size = \"default\", label, ...props }, ref) => {\n const [parentDirection, setParentDirection] = React.useState(null)\n const parentRef = React.useRef(null)\n\n React.useEffect(() => {\n if (parentRef.current && parentRef.current.parentNode) {\n const dir = window.getComputedStyle(\n parentRef.current.parentNode\n ).direction\n setParentDirection(dir)\n }\n })\n\n return (\n <div className=\"flex flex-row items-center\" ref={parentRef}>\n <SwitchPrimitives.Root\n className={cn(\n \"relative cursor-pointer rounded-full bg-primary/20 outline-none data-[state=checked]:bg-primary\",\n className,\n rootSize[size]\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n thumbSize[size],\n \"block rounded-full bg-white transition-transform duration-100 will-change-transform data-[state=checked]:bg-primary-foreground dark:bg-background\",\n\n parentDirection === \"rtl\"\n ? \"-translate-x-0.5 data-[state=checked]:-translate-x-[19px]\"\n : \"translate-x-0.5 data-[state=checked]:translate-x-[19px]\"\n )}\n />\n </SwitchPrimitives.Root>\n {label && (\n <span className=\"mx-2 text-sm font-medium text-gray-900 dark:text-gray-300\">\n {label}\n </span>\n )}\n </div>\n )\n})\nSwitch.displayName = SwitchPrimitives.Root.displayName\n","import React, { FC } from \"react\"\n\ntype TypographyTypes = {\n children: any\n align?: any\n}\nexport const HawaTypography: FC<TypographyTypes> = (props) => {\n return <div>{props.children}</div>\n}\n","import React, { useRef, useState, useEffect } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\n// TODO: make handleClose to detect when the alert is closed from outside this component\n\ntype AlertTypes = {\n severity?: \"info\" | \"warning\" | \"error\" | \"success\"\n /** The title of the alert placed above the text of the alert. Can be used alone */\n title?: any\n /** The text of the alert placed below the title of the alert. Can be used alone */\n text: any\n /** The duration for the alert to stay on the screen */\n duration?: number\n variant?:\n | \"normal\"\n | \"solid\"\n | \"top-accent\"\n | \"left-accent\"\n | \"right-accent\"\n | \"bottom-accent\"\n direction?: \"rtl\" | \"ltr\"\n actions?: [\n {\n label: string\n onClick: any\n variant:\n | \"outline\"\n | \"link\"\n | \"default\"\n | \"destructive\"\n | \"secondary\"\n | \"ghost\"\n }\n ]\n persistant?: boolean\n icon?: any\n className?: any\n}\nexport const HawaAlert: React.FunctionComponent<AlertTypes> = ({\n variant = \"normal\",\n direction = \"ltr\",\n severity = \"info\",\n duration,\n icon,\n className,\n ...props\n}) => {\n const alertRef = useRef(null)\n const [closed, setClosed] = useState(false)\n\n useEffect(() => {\n if (duration) {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n setClosed(true)\n }, duration)\n //To destroy the component after hiding it\n const timeoutDestroy = setTimeout(() => {\n setClosed(true)\n alertRef.current.removeChild(alertRef.current.children[0])\n }, duration + 1000)\n\n return () => {\n clearTimeout(timeoutHide)\n clearTimeout(timeoutDestroy)\n }\n }\n }, [duration])\n let closeButtonStyle = {\n none: \"hover:bg-gray-300\",\n info: \"hover:bg-blue-300\",\n warning: \"hover:bg-yellow-300\",\n error: \"hover:bg-red-300\",\n success: \"hover:bg-green-300\",\n }\n let styleVariant = {\n normal: {\n none: \"text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error: \"text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n \"top-accent\": {\n none: \"border-t-4 border-gray-300 text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"border-t-4 border-blue-300 text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"border-t-4 border-yellow-300 text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error:\n \"border-t-4 border-red-300 text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"border-t-4 border-green-300 text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n \"left-accent\": {\n none: \"border-l-4 border-gray-300 text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"border-l-4 border-blue-300 text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"border-l-4 border-yellow-300 text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error:\n \"border-l-4 border-red-300 text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"border-l-4 border-green-300 text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n \"right-accent\": {\n none: \"border-r-4 border-gray-300 text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"border-r-4 border-blue-300 text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"border-r-4 border-yellow-300 text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error:\n \"border-r-4 border-red-300 text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"border-r-4 border-green-300 text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n \"bottom-accent\": {\n none: \"border-b-4 border-gray-300 text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"border-b-4 border-blue-300 text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"border-b-4 border-yellow-300 text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error:\n \"border-b-4 border-red-300 text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"border-b-4 border-green-300 text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n }\n return (\n <div ref={alertRef}>\n <div\n className={clsx(\n \"relative mb-4 flex flex-col rounded p-4 text-sm transition-all\",\n styleVariant[variant][severity],\n closed ? \"opacity-0\" : \"opacity-100\",\n className\n )}\n role=\"alert\"\n dir={direction}\n >\n <div className=\"flex flex-row\">\n {icon && (\n <div className={direction === \"rtl\" ? \"pl-2 pt-1\" : \"pr-2 pt-1\"}>\n {icon}\n </div>\n )}\n <div className=\"flex flex-col\">\n <span\n className={clsx(\n \"font-medium\",\n direction === \"rtl\" ? \"ml-8\" : \"mr-8\"\n )}\n >\n {props.title}\n </span>\n <span>{props.text}</span>\n {props.actions && (\n <div className=\"mt-2 flex flex-row gap-2\">\n {props.actions.map((act, index) => (\n <Button\n key={index}\n variant={act.variant}\n onClick={act.onClick()}\n >\n {act.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n </div>\n {!props.persistant && (\n <button\n type=\"button\"\n className={clsx(\n \"absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900\",\n closeButtonStyle[severity],\n direction === \"rtl\" ? \"left-2\" : \"right-2\"\n )}\n data-dismiss-target=\"#alert-default\"\n aria-label=\"Close\"\n onClick={() => {\n setClosed(true)\n setTimeout(() => {\n alertRef.current.removeChild(alertRef.current.children[0])\n }, 200)\n }}\n >\n <span className=\"sr-only\">Close</span>\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n )}\n </div>\n </div>\n )\n}\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../util\"\nimport { HawaLoading } from \"./HawaLoading\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center select-none rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n light: \"bg-primary/20 text-primary hover:bg-primary/40\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n neoBrutalism:\n \"cursor-pointer transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms] active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n heightless: \"px-4 py-4\",\n xs: \"h-fit py-1 text-[10px] px-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n xl: \"h-14 rounded-md px-10\",\n icon: \"h-10 w-10\",\n smallIcon: \"h-7 w-7\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n isLoading?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n isLoading,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = \"button\"\n\n // Determine the color for the HawaLoading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"bg-primary\"\n : \"bg-primary-foreground\"\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <HawaLoading\n design=\"dots-pulse\"\n color={loadingColor} // Apply the computed color here\n size=\"button\"\n />\n ) : (\n children\n )}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import React, { FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype LoadingTypes = {\n size?: \"button\" | \"sm\" | \"normal\" | \"lg\" | \"xl\"\n design?: \"spinner\" | \"dots-bounce\" | \"dots-pulse\" | \"pulse\" | \"spinner-dots\"\n color?: any\n}\n\nexport const HawaLoading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"sm\",\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"h-4 w-4\",\n sm: \"h-6 w-6\",\n normal: \"h-8 w-8\",\n lg: \"h-14 w-14\",\n xl: \"h-24 w-24\",\n }\n\n let animationStyles = {\n pulse: \"animate-in fade-in duration-1000\",\n bounce: \"animate-bounce\",\n }\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div className=\"flex flex-row gap-2\">\n <div\n className={clsx(\n \"animate-bounce rounded-full delay-100 repeat-infinite\",\n size === \"button\" ? \"h-2 w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"bg-primary\"\n )}\n ></div>\n <div\n className={clsx(\n \"animate-bounce rounded-full delay-200 repeat-infinite\",\n size === \"button\" ? \"h-2 w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"bg-primary\"\n )}\n ></div>\n <div\n className={clsx(\n \"animate-bounce rounded-full delay-300 repeat-infinite\",\n size === \"button\" ? \"h-2 w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"bg-primary\"\n )}\n ></div>\n </div>\n )\n\n default:\n return (\n <div className=\"flex flex-row gap-x-3\">\n <div aria-label=\"Loading...\" role=\"status\">\n <svg\n className={clsx(sizeStyles[size], \"animate-spin\")}\n viewBox=\"3 3 18 18\"\n >\n <path\n className=\"fill-primary/20\"\n d=\"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z\"\n ></path>\n <path\n className={color ? color : \"fill-primary\"}\n d=\"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z\"\n ></path>\n </svg>\n </div>\n </div>\n )\n }\n}\n","import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\nimport useTable from \"../hooks/useTable\"\nimport { cn } from \"../util\"\nimport { DropdownMenu, MenuItemType } from \"./DropdownMenu\"\nimport { Skeleton } from \"./Skeleton\"\n\ntype RowTypes = {\n hidden: boolean\n value: any\n suffix?: any\n}\ntype ColTypes = {\n hidden: boolean\n value: any\n sortable?: boolean\n}\ntype TableTypes = {\n pagination?: boolean\n isLoading?: boolean\n columns: ColTypes[]\n actions?: MenuItemType[]\n actionsWidth?: \"default\" | \"sm\" | \"lg\" | \"parent\"\n actionsSize?: \"default\" | \"sm\"\n direction?: \"rtl\" | \"ltr\"\n rows?: RowTypes[][]\n handleActionClick?: any\n end?: any\n size?: \"normal\" | \"small\"\n highlightFirst?: boolean\n bodyColor?: string\n headerColor?: string\n clickable?: boolean\n texts?: {\n actions?: string\n noData?: any\n items?: string\n page?: string\n filter?: string\n }\n bordersWidth?: string\n headerTools?: boolean\n borders?: \"all\" | \"cols\" | \"rows\" | \"outer\" | \"inner\"\n}\nconst ChevronIcon = () => (\n <svg\n aria-label=\"Chevron Right Icon\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"\n ></path>\n </svg>\n)\nexport const HawaTable: FC<TableTypes> = ({\n size = \"normal\",\n bodyColor = \"white\",\n headerColor = \"gray-200\",\n borders = \"all\",\n highlightFirst = false,\n direction = \"ltr\",\n bordersWidth = \"1\",\n pagination = true,\n ...props\n}) => {\n const [perPage, setPerPage] = useState(10)\n const [enteredPage, setEnteredPage] = useState(null)\n const [page, setPage] = useState(1)\n const [sortingCol, setSortingCol] = useState(null)\n const [sortedRows, setSortedRows] = useState(props.rows)\n const [sortColumn, setSortColumn] = useState(null)\n const [sortDirection, setSortDirection] = useState(null)\n const { slice, range } = useTable(\n props.rows,\n page,\n perPage,\n sortColumn,\n sortDirection\n )\n let isRTL = direction === \"rtl\"\n let sizeStyles = {\n normal: \"py-3 px-6\",\n small: \"px-3 py-1\",\n }\n const handleSort = (colIndex, sortable) => {\n if (sortable) {\n setSortColumn(colIndex)\n setSortDirection((prevDirection) =>\n prevDirection === \"asc\" ? \"desc\" : \"asc\"\n )\n }\n }\n const changePage = () => {\n if (slice?.length < 1 && page !== 1) {\n setPage(page - 1)\n }\n if (enteredPage) {\n setPage(enteredPage)\n }\n }\n useEffect(() => {\n changePage()\n }, [slice, page])\n\n return (\n <div className=\"relative flex flex-col gap-2 \">\n {props.isLoading ? (\n // <div>dd</div>\n <Skeleton className=\"h-[105px] w-full\" />\n ) : (\n <>\n <div className={`overflow-x-auto rounded bg-${headerColor}`}>\n {props.headerTools && (\n <div className=\"flex flex-row items-center justify-between gap-2 border bg-background px-2 py-2\">\n {props.headerTools}\n </div>\n )}\n <table\n className={clsx(\n // borders === \"outer\" || borders === \"all\"\n // ? `outline outline-[${bordersWidth}px] -outline-offset-1 outline-gray-300 dark:outline-gray-700`\n // : \"\",\n \"w-full rounded bg-muted text-left text-sm text-muted-foreground\",\n `bg-${headerColor}`\n )}\n >\n <thead\n className={clsx(\n \"bg-muted text-xs uppercase text-muted-foreground \",\n borders === \"rows\" || borders === \"all\" || borders === \"inner\"\n ? \"border-b \"\n : \"\"\n )}\n >\n <tr>\n {props.columns.map((col: any, i: any) => {\n if (col.hidden) {\n return\n } else {\n return (\n <th\n onClick={() =>\n col.sortable && handleSort(i, col.sortable)\n }\n key={i}\n scope=\"col\"\n colSpan={2}\n className={clsx(\n col.sortable\n ? \"cursor-pointer hover:bg-muted-foreground/10\"\n : \"\",\n sizeStyles[size],\n i !== 0 &&\n (borders === \"cols\" ||\n borders === \"all\" ||\n borders === \"inner\")\n ? `border-r border-r-[${bordersWidth}px] border-l border-l-[${bordersWidth}px]`\n : \"\"\n )}\n >\n {col.value}\n {sortColumn === i && (\n <span>{sortDirection === \"asc\" ? \" ▲\" : \" ▼\"}</span>\n )}\n </th>\n )\n }\n })}\n {props.actions ? (\n <th\n scope=\"col\"\n className={clsx(\n sizeStyles[size],\n \"w-[calc(1%)] text-center\"\n )}\n >\n {props.texts?.actions ?? \"Actions\"}\n </th>\n ) : null}\n </tr>\n </thead>\n <tbody\n className={\n bodyColor && props.rows ? `bg-${bodyColor}` : \"bg-transparent\"\n }\n >\n {/* Table Rows */}\n {sortedRows ? (\n slice?.map((singleRow: any, rowIndex: any) => {\n let lastRow = rowIndex == slice?.length - 1\n return (\n <tr\n key={rowIndex}\n className={clsx(\n \" text-mute-foreground border bg-background\",\n props.clickable ? \"hover:bg-gray-100\" : \"\",\n !lastRow &&\n (borders === \"all\" ||\n borders === \"rows\" ||\n borders === \"inner\")\n ? `border-b border-b-[${bordersWidth}px]`\n : \"\"\n )}\n >\n {singleRow?.map((r: any, i: any) => {\n let firstCell = i === 0\n let lastCell = i === singleRow?.length - 1\n let isRTLLastCell =\n isRTL && lastRow && lastCell && !props.actions\n let isRTLFirstCell = isRTL && lastRow && firstCell\n let isLTRFirstCell = !isRTL && lastRow && firstCell\n let isLTRLastCell =\n !isRTL && lastRow && lastCell && !props.actions\n\n if (r.hidden) {\n return\n } else {\n return (\n <td\n colSpan={2}\n key={i}\n className={clsx(\n // borders === \"outer\" ? \"border\" : \"\",\n sizeStyles[size],\n highlightFirst && firstCell\n ? \"font-bold\"\n : \"font-normal\",\n isRTLFirstCell\n ? \"rounded-bl-none rounded-br\"\n : isRTLLastCell\n ? \"rounded-bl rounded-br-none\"\n : isLTRFirstCell\n ? \"rounded-bl rounded-br-none\"\n : isLTRLastCell\n ? \"rounded-bl-none rounded-br\"\n : \"\",\n\n !firstCell &&\n !lastCell &&\n (borders === \"cols\" ||\n borders === \"inner\" ||\n borders === \"all\")\n ? `border-l border-l-[${bordersWidth}px] border-r border-r-[${bordersWidth}px]`\n : !firstCell &&\n props.actions &&\n (borders === \"cols\" ||\n borders === \"inner\" ||\n borders === \"all\")\n ? `border-l border-l-[${bordersWidth}px] border-r border-r-[${bordersWidth}px]`\n : \"\"\n // bodyColor ? `bg-${bodyColor}` : \"bg-white\"\n )}\n >\n {r.value} {r.suffix && r.suffix}\n </td>\n )\n }\n })}\n {props.actions && (\n <td\n align={isRTL ? \"right\" : \"left\"}\n className={cn(\n isRTL && lastRow && \"rounded-bl rounded-br-none\",\n !isRTL && lastRow && \"rounded-bl-none rounded-br\"\n )}\n colSpan={1}\n >\n <div className=\"flex items-center justify-center\">\n <DropdownMenu\n width={props.actionsWidth}\n size={props.actionsSize}\n direction={direction}\n side=\"right\"\n items={props.actions}\n selectCallback={(e) =>\n props.handleActionClick(e, singleRow)\n }\n trigger={\n <div className=\"flex w-fit cursor-pointer items-center justify-center rounded p-2 transition-all hover:bg-primary/20 \">\n <svg\n aria-label=\"Vertical Three Dots Menu Icon\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z\"></path>\n </svg>\n </div>\n }\n />\n </div>\n </td>\n )}\n </tr>\n )\n })\n ) : (\n <tr className=\"bg-transparent\">\n <td colSpan={20}>\n <div\n className={clsx(\n \"w-full rounded-b border p-5 text-center\",\n // bodyColor ? `bg-${bodyColor}` : \"bg-background\"\n \"bg-background\"\n )}\n >\n {props.texts?.noData ?? \"No Data\"}\n </div>\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n </>\n )}\n {pagination && (\n <div className=\"flex flex-row items-center justify-between \">\n {/* Pagination Pages */}\n {range.length > 1 ? (\n <div className=\"flex w-fit flex-row items-stretch justify-center gap-2 overflow-clip rounded \">\n {/* Previous Page Button */}\n <div\n className={cn(\n \"flex h-6 w-6 rotate-180 cursor-pointer items-center justify-center rounded border bg-background p-1 text-xs hover:bg-primary/10 dark:hover:bg-primary/10\",\n direction === \"rtl\" && \"rotate-0\"\n )}\n onClick={() =>\n page <= 1 ? setPage(range.length) : setPage(page - 1)\n }\n >\n <ChevronIcon />\n </div>\n {/* Numbered Pagination */}\n <div className=\"flex flex-row items-center overflow-clip rounded transition-all\">\n {/* The first page */}\n {range.length > 6 &&\n range.map((el, index) => {\n if (index <= 0) {\n return (\n <button\n key={index}\n className={clsx(\n \"w-10 p-1 text-xs hover:bg-gray-200\",\n page === el\n ? \"bg-primary text-primary-foreground hover:bg-primary\"\n : \"bg-gray-100\"\n )}\n onClick={() => setPage(el)}\n >\n {el}\n </button>\n )\n }\n })}\n {/* The Current Page / Input */}\n {range?.length > 6 && (\n <input\n type={\"text\"}\n className=\" w-10 bg-gray-100 p-1 text-center text-xs\"\n defaultValue={\n page !== 0 || page !== range.length - 1 ? page : \"...\"\n }\n value={\n page == 1 || page == range.length\n ? \"...\"\n : enteredPage\n ? enteredPage\n : page\n }\n onChange={(e) => setEnteredPage(parseInt(e.target.value))}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") {\n setPage(enteredPage)\n setEnteredPage(null)\n }\n }}\n />\n )}\n {/* The last page */}\n {range?.length > 6 &&\n range.map((el, index) => {\n if (index >= range.length - 1) {\n return (\n <button\n key={index}\n className={clsx(\n \"w-10 p-1 text-xs hover:bg-gray-200\",\n page === el\n ? \"bg-primary text-primary-foreground hover:bg-primary\"\n : \"bg-gray-100\"\n )}\n onClick={() => setPage(el)}\n >\n {el}\n </button>\n )\n }\n })}\n\n {/* All Pages if less than 6 pages */}\n {range?.length <= 6 &&\n range.map((el, index) => {\n return (\n <button\n key={index}\n className={clsx(\n \"w-10 p-1 text-xs\",\n page === el\n ? \"bg-primary text-primary-foreground \"\n : \"border bg-background hover:bg-primary/10 dark:hover:bg-primary/10\",\n\n // Check if the direction is 'rtl'\n direction === \"rtl\"\n ? // If direction is 'rtl', then check for the index conditions\n // and apply respective classes along with the 'something' class\n index === 0\n ? \"rounded-r border-l-0\" // Apply if index is 0 and direction is 'rtl'\n : index === range.length - 1\n ? \"rounded-l border-r-0\" // Apply if index is the last element and direction is 'rtl'\n : \"\" // Apply if index is other than 0 or last element and direction is 'rtl'\n : // If direction is not 'rtl', then again check for the index conditions\n // and apply respective classes along with the 'something else' class\n index === 0\n ? \"rounded-l border-r-0\" // Apply if index is 0 and direction is not 'rtl'\n : index === range.length - 1\n ? \"rounded-r border-l-0\" // Apply if index is the last element and direction is not 'rtl'\n : \"\" // Apply if index is other than 0 or last element and direction is not 'rtl'\n )}\n onClick={() => setPage(el)}\n >\n {el}\n </button>\n )\n })}\n </div>\n {/* Next Page Button */}\n <div\n onClick={() =>\n page >= range.length ? setPage(1) : setPage(page + 1)\n }\n className={cn(\n \"flex h-6 w-6 cursor-pointer items-center justify-center rounded border bg-background p-1 text-xs hover:bg-primary/10 dark:hover:bg-primary/10\",\n direction === \"rtl\" && \"rotate-180\"\n )}\n >\n <ChevronIcon />\n </div>\n </div>\n ) : (\n <div></div>\n )}\n {/* Pagination Settings */}\n {props.rows ? (\n <div className=\"flex w-fit flex-row items-center gap-2 \">\n <div className=\"text-xs \">\n {props.rows.length} {props.texts?.items ?? \"Items\"}\n </div>\n\n <select\n value={perPage}\n className=\"h-6 cursor-pointer rounded border bg-background px-2 text-xs\"\n onChange={(e) => {\n setPerPage(parseInt(e.target.value))\n }}\n >\n <option value={10} style={{ fontSize: 10 }}>\n 10 / {props.texts?.page ?? \"Page\"}\n </option>\n <option value={20} style={{ fontSize: 10 }}>\n 20 / {props.texts?.page ?? \"Page\"}\n </option>\n <option value={30} style={{ fontSize: 10 }}>\n 30 / {props.texts?.page ?? \"Page\"}\n </option>\n <option value={50} style={{ fontSize: 10 }}>\n 50 / {props.texts?.page ?? \"Page\"}\n </option>\n <option value={100} style={{ fontSize: 10 }}>\n 100 / {props.texts?.page ?? \"Page\"}\n </option>\n </select>\n </div>\n ) : (\n <div></div>\n )}\n </div>\n )}\n\n {/* <Pagination\n handleNextPage={() =>\n page >= range.length ? setPage(1) : setPage(page + 1)\n }\n handlePrevPage={() =>\n page <= 1 ? setPage(range.length) : setPage(page - 1)\n }\n /> */}\n </div>\n )\n}\n","// useTable.js\nimport React, { useState, useEffect } from \"react\"\n\nconst calculateRange = (data, rowsPerPage) => {\n const range = []\n const num = Math.ceil(data?.length / rowsPerPage)\n let i = 1\n for (let i = 1; i <= num; i++) {\n range.push(i)\n }\n return range\n}\n\nconst sliceData = (data, page, rowsPerPage) => {\n return data?.slice((page - 1) * rowsPerPage, page * rowsPerPage)\n}\n\n// useTable.js\nconst sortData = (data, sortColumn, sortDirection) => {\n if (sortColumn !== null) {\n return data?.sort((a, b) => {\n const aValue = a[sortColumn].value\n const bValue = b[sortColumn].value\n\n // Handle non-string values by using simple comparison\n if (typeof aValue === \"string\" && typeof bValue === \"string\") {\n if (sortDirection === \"asc\") {\n return aValue.localeCompare(bValue)\n } else {\n return bValue.localeCompare(aValue)\n }\n } else {\n if (sortDirection === \"asc\") {\n return aValue - bValue\n } else {\n return bValue - aValue\n }\n }\n })\n }\n return data\n}\n\nconst useTable = (data, page, rowsPerPage, sortColumn, sortDirection) => {\n const [tableRange, setTableRange] = useState([])\n const [slice, setSlice] = useState([])\n\n useEffect(() => {\n if (data) {\n const range = calculateRange(data, rowsPerPage)\n setTableRange([...range])\n\n const sortedData = sortData(data, sortColumn, sortDirection)\n const slicedData = sliceData(sortedData, page, rowsPerPage)\n setSlice([...slicedData])\n }\n }, [data, setTableRange, page, rowsPerPage, sortColumn, sortDirection])\n\n return { slice, range: tableRange }\n}\n\nexport default useTable\n\n// import React, { useState, useEffect } from \"react\"\n\n// const calculateRange = (data, rowsPerPage) => {\n// const range = []\n// const num = Math.ceil(data?.length / rowsPerPage)\n// let i = 1\n// for (let i = 1; i <= num; i++) {\n// range.push(i)\n// }\n// return range\n// }\n\n// const sliceData = (data, page, rowsPerPage) => {\n// return data?.slice((page - 1) * rowsPerPage, page * rowsPerPage)\n// }\n\n// const sortData = (data, sortColumn, sortDirection) => {\n// if (sortColumn !== null) {\n// return data?.sort((a, b) => {\n// const aValue = a[sortColumn].value\n// const bValue = b[sortColumn].value\n\n// if (sortDirection === \"asc\") {\n// return aValue.localeCompare(bValue)\n// } else {\n// return bValue.localeCompare(aValue)\n// }\n// })\n// }\n// return data\n// }\n\n// const useTable = (data, page, rowsPerPage, sortColumn, sortDirection) => {\n// const [tableRange, setTableRange] = useState([])\n// const [slice, setSlice] = useState([])\n\n// useEffect(() => {\n// if (data) {\n// const range = calculateRange(data, rowsPerPage)\n// setTableRange([...range])\n\n// const sortedData = sortData(data, sortColumn, sortDirection)\n// const slicedData = sliceData(sortedData, page, rowsPerPage)\n// setSlice([...slicedData])\n// }\n// }, [data, setTableRange, page, rowsPerPage, sortColumn, sortDirection])\n\n// return { slice, range: tableRange }\n// }\n\n// export default useTable\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n// import React, { useState, useEffect } from \"react\"\n\n// const calculateRange = (data, rowsPerPage) => {\n// const range = []\n// const num = Math.ceil(data?.length / rowsPerPage)\n// let i = 1\n// for (let i = 1; i <= num; i++) {\n// range.push(i)\n// }\n// return range\n// }\n\n// const sliceData = (data, page, rowsPerPage) => {\n// return data?.slice((page - 1) * rowsPerPage, page * rowsPerPage)\n// }\n\n// const useTable = (data, page, rowsPerPage) => {\n// const [tableRange, setTableRange] = useState([])\n// const [slice, setSlice] = useState([])\n\n// useEffect(() => {\n// if (data) {\n// const range = calculateRange(data, rowsPerPage)\n// setTableRange([...range])\n\n// const slice = sliceData(data, page, rowsPerPage)\n// setSlice([...slice])\n// }\n// }, [data, setTableRange, page, setSlice, rowsPerPage])\n\n// return { slice, range: tableRange }\n// }\n\n// export default useTable\n","import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\n// import { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../util\"\n\nconst DropdownMenuRoot = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center justify-between rounded-sm px-2 py-3 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n <div className=\"flex flex-row items-center gap-2\">{children}</div>{\" \"}\n {/* <ChevronRight className=\"ml-auto h-4 w-4\" /> */}\n <svg\n aria-label=\"Chevron Right Icon\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n className={cn(props.dir === \"rtl\" ? \"rotate-180\" : \"\")}\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"\n ></path>\n </svg>\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n end?: any\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n disabled={props.disabled}\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center justify-between rounded-sm text-sm outline-none transition-colors focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n <div className=\"flex flex-row items-center gap-2 \">{props.children}</div>\n\n {props.end && props.end}\n </DropdownMenuPrimitive.Item>\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n {/* <Check className=\"h-4 w-4\" /> */}\n <svg\n aria-label=\"Check Mark\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"0.60em\"\n width=\"0.60em\"\n >\n <path d=\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\"></path>\n </svg>{\" \"}\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n {/* <Circle className=\"h-2 w-2 fill-current\" /> */}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n aria-label=\"Circle\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"h-2 w-2 fill-current\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\ntype ExtendedDropdownMenuContentProps = Partial<\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n> & {\n // Add any additional types or overrides here, for example:\n // side?: \"left\" | \"right\" | \"top\" | \"bottom\"\n}\ntype ExtendedDropdownMenuTriggerProps = Partial<\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>\n> & {\n // Add any additional types or overrides here, for example:\n // side?: \"left\" | \"right\" | \"top\" | \"bottom\"\n}\n\nexport type SubItem = {\n label: string\n value: string\n icon?: any\n action?: () => void\n highlighted?: boolean\n disabled?: boolean\n}\nexport type MenuItemType = {\n icon?: any\n label?: string\n value?: string\n end?: any\n presist?: boolean\n type?: \"separator\" | \"label\"\n action?: () => void\n highlighted?: boolean\n subitems?: SubItem[] // Note the use of the optional modifier\n disabled?: boolean\n}\ninterface DropdownMenuProps {\n trigger?: any\n items?: MenuItemType[]\n direction?: \"rtl\" | \"ltr\"\n onItemSelect?: any\n className?: ExtendedDropdownMenuContentProps[\"className\"]\n triggerClassname?: ExtendedDropdownMenuTriggerProps[\"className\"]\n sideOffset?: ExtendedDropdownMenuContentProps[\"sideOffset\"]\n side?: ExtendedDropdownMenuContentProps[\"side\"]\n align?: ExtendedDropdownMenuContentProps[\"align\"]\n alignOffset?: ExtendedDropdownMenuContentProps[\"alignOffset\"]\n width?: \"default\" | \"sm\" | \"lg\" | \"parent\"\n size?: \"default\" | \"sm\"\n selectCallback?: any\n}\n\n// const dropDownMenuVariants = cva(\n// \"inline-flex items-center justify-center select-none rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n// {\n// variants: {\n// width: {\n// default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n// },\n// size: {\n// default: \"h-10 px-4 py-2\",\n// sm: \"h-9 rounded-md px-3\",\n// },\n// },\n// defaultVariants: {\n// width: \"default\",\n// size: \"default\",\n// },\n// }\n// )\n\nexport const DropdownMenu: React.FC<DropdownMenuProps> = ({\n trigger,\n items,\n direction,\n onItemSelect,\n sideOffset,\n side,\n className,\n triggerClassname,\n align,\n alignOffset,\n selectCallback,\n size = \"default\",\n width = \"default\",\n}) => {\n const widthStyles = {\n default: \"min-w-[8rem]\",\n sm: \"w-fit\",\n lg: \"w-[200px]\",\n parent: \"ddm-w-parent\",\n }\n const sizeStyles = {\n default: \"px-2 py-3 \",\n sm: \"text-xs px-1.5 py-1.5\",\n }\n return (\n <DropdownMenuRoot dir={direction}>\n <DropdownMenuTrigger asChild className={triggerClassname}>\n {trigger}\n </DropdownMenuTrigger>\n <DropdownMenuPortal>\n <DropdownMenuContent\n side={side}\n sideOffset={sideOffset}\n className={cn(className, widthStyles[width], \"flex flex-col gap-2\")}\n align={align}\n alignOffset={alignOffset}\n >\n {items.map((item, index) => {\n if (item.type === \"separator\") {\n return <DropdownMenuSeparator key={index} />\n } else if (item.type === \"label\") {\n return (\n <DropdownMenuLabel key={index}>{item.label}</DropdownMenuLabel>\n )\n } else {\n return item.subitems ? (\n <DropdownMenuSub key={index}>\n <DropdownMenuSubTrigger\n className={cn(sizeStyles[size])}\n dir={direction}\n >\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuSubTrigger>\n <DropdownMenuPortal>\n <DropdownMenuSubContent>\n {item.subitems.map((subitem, subIndex) => (\n <DropdownMenuItem\n key={subIndex}\n className={cn(\n sizeStyles[size],\n\n !item.icon && !item.label\n ? \"px-0 py-0 focus:bg-transparent\"\n : \"focus:bg-accent\"\n )}\n disabled={subitem.disabled}\n // className=\"flex flex-row gap-2\"\n onSelect={() => {\n subitem.action()\n if (selectCallback) {\n selectCallback(subitem.value)\n }\n }}\n >\n {subitem.icon && subitem.icon}\n {subitem.label && subitem.label}\n </DropdownMenuItem>\n ))}\n </DropdownMenuSubContent>\n </DropdownMenuPortal>\n </DropdownMenuSub>\n ) : (\n <DropdownMenuItem\n key={index}\n disabled={item.disabled}\n onSelect={(e) => {\n if (item.presist) {\n e.preventDefault()\n }\n if (item.action) {\n item.action()\n if (selectCallback) {\n selectCallback(item.value)\n }\n } else {\n if (selectCallback) {\n selectCallback(item.value)\n }\n }\n }}\n end={item.end}\n className={cn(\n sizeStyles[size],\n !item.icon && !item.label\n ? \"px-0 py-0 focus:bg-transparent \"\n : \"focus:bg-accent \",\n item.presist && \"focus:bg-transparent\"\n )}\n >\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuItem>\n )\n }\n })}\n </DropdownMenuContent>\n </DropdownMenuPortal>\n </DropdownMenuRoot>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaTextField } from \"./HawaTextField\"\n\ntype SearchBarTypes = {}\nexport const HawaSearchBar: FC<SearchBarTypes> = (props) => {\n return <HawaTextField type={\"search\"} {...props} />\n}\n","import React, { useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype AccordionTypes = {\n /** The title of the clickable accordion bar */\n title: string\n /** The content inside the accordion to be visible once the bar is clicked */\n content: any\n /** The index of each accordion, must be unique for each usage of this component */\n index: any\n}\nexport const HawaAccordion: FC<AccordionTypes> = (props) => {\n const [collapse, setCollapse] = useState(false)\n\n return (\n <div className=\"h-fit w-full\">\n <button\n id={\"accordion-collapse-heading-\" + props.index}\n type=\"button\"\n className={clsx(\n collapse ? \"rounded\" : \"rounded-t\",\n \"flex w-full items-center justify-between border border-gray-200 bg-gray-100 p-5 text-left font-medium text-gray-900 hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:text-white dark:hover:bg-gray-800 dark:focus:ring-gray-800\"\n )}\n onClick={() => setCollapse(!collapse)}\n data-accordion-target={\"#accordion-collapse-body-\" + props.index}\n aria-expanded=\"true\"\n aria-controls={\"accordion-collapse-body-\" + props.index}\n >\n <span>{props.title}</span>\n <svg\n data-accordion-icon=\"\"\n className={`h-6 w-6 ${\n collapse ? \"\" : \"rotate-180\"\n } shrink-0 transition-all`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n <div\n id={\"accordion-collapse-body-\" + props.index}\n aria-labelledby={\"accordion-collapse-heading-\" + props.index}\n className={clsx(\n collapse ? \"invisible hidden h-0 p-0\" : \"visible h-full\",\n \"w-full rounded-b border border-t-0 border-gray-200 p-5 font-light dark:border-gray-700 dark:bg-gray-900\"\n )}\n >\n <p className=\"mb-2 text-gray-500 dark:text-gray-400\">{props.content}</p>\n </div>\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport Countries from \"../countries\"\nimport Select from \"react-select\"\ntype MenuTypes = {\n cx: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n}\nconst Menu: FC<MenuTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n ...props\n}) => {\n return (\n <div\n // width: 190,\n // borderRadius: \"0.5rem\",\n className=\"absolute z-50 w-[190px] rounded border bg-background\"\n // \"absolute z-10 mt-2 flex w-full flex-col justify-start rounded bg-white p-1 px-1.5 ring-1 ring-blue-200\"\n ref={innerRef}\n {...innerProps}\n // {...props}\n >\n {children}\n </div>\n )\n}\ntype OptionTypes = {\n cx: any\n data: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n}\nconst Option: FC<OptionTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n ...props\n}) => (\n <div\n ref={innerRef}\n className=\"m-2 flex cursor-pointer flex-row items-center justify-between rounded-inner p-1 px-2 hover:bg-primary hover:text-primary-foreground\"\n {...innerProps}\n >\n <div className=\"flex flex-row items-center justify-center gap-1\">\n <img className=\"h-8 w-8\" src={props.data.image}></img>\n <span className=\"text-[10px]\">{props.data.country_label}</span>\n </div>\n {children}\n </div>\n)\n\ntype HawaPhoneInputTypes = {\n preferredCountry?: any\n helperText?: any\n label?: string\n value?: any\n country?: any\n handleChange?: any\n}\nexport const HawaPhoneInput: FC<HawaPhoneInputTypes> = (props) => {\n const [selectedCountry, setSelectedCountry] = useState(\"+966\")\n\n return (\n <div className=\"mb-3 flex flex-col\">\n {props.label && (\n <label className=\"mb-2 block text-sm font-medium\">{props.label}</label>\n )}\n <div dir=\"ltr\" className=\"flex flex-row \">\n <Select\n classNames={{\n // container: () => \"cursor-pointer z-10 border rounded-l bg-background\",\n control: () =>\n \"w-[64px] text-right pr-2 cursor-pointer z-10 border rounded-l bg-background\",\n placeholder: (state) => \"text-muted-foreground text-right \",\n input: (state) =>\n \"bg-transparent cursor-pointer dark:text-white p-2 rounded-l text-[0.875rem] \",\n valueContainer: () => \"rounded-l h-auto text-[0.875rem]\",\n // container: () => \"bg-orange-400 border-none\",\n // control: () => \"bg-blue-500\",\n // menu: () => \"bg-red-900\",\n }}\n styles={{\n // input: (base) => ({\n // ...base,\n // fontSize: \"0.875rem\",\n // \"input:focus\": {\n // boxShadow: \"none\",\n // },\n // lineHeight: \"1.25rem\",\n // padding: \"0.37rem\",\n // paddingLeft: 0,\n // textAlign: \"right\",\n // direction: \"ltr\",\n // }),\n // singleValue: (base) => ({\n // ...base,\n // fontSize: \"0.875rem\",\n // // textAlign: \"right\",\n // }),\n placeholder: (base) => ({\n ...base,\n fontSize: \"0.875rem\",\n textAlign: \"right\",\n }),\n // control: (base) => ({\n // ...base,\n // width: 64,\n // borderRadius: \"0.5rem\",\n // borderTopRightRadius: 0,\n // borderBottomRightRadius: 0,\n // }),\n // menu: (base) => ({\n // ...base,\n // width: 190,\n // borderRadius: \"0.5rem\",\n // }),\n }}\n components={{\n Option,\n Menu,\n // SelectContainer,\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n // Placeholder: () => <div className=\"bg-red-400\">test</div>,\n // SelectContainer:\n // () =>\n // ({ innerProps, innerRef }) =>\n // <div ref={innerRef} {...innerProps} />,\n }}\n // className=\"bg-red-500\"\n\n options={Countries}\n isMulti={false}\n isSearchable={true}\n isClearable={false}\n placeholder=\"+966\"\n unstyled\n defaultValue={props.preferredCountry}\n value={selectedCountry}\n onChange={(newValue, action) => setSelectedCountry(newValue)}\n />\n <input\n onChange={props.handleChange}\n type=\"number\"\n placeholder=\"531045453\"\n // text-gray-900 dark:text-gray-300\n // dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500\n className=\"block w-full rounded-r border bg-background p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500\"\n\n // className=\"block w-full appearance-none rounded rounded-l-none border border-l-0\n // bg-background p-2 text-[0.875rem] text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:text-white \"\n />\n {props.helperText && (\n <p className=\"mb-1 mt-1 text-xs text-red-600 dark:text-red-500\">\n {props.helperText}\n </p>\n )}\n </div>\n </div>\n )\n}\n","let countries: any = [\n {\n country_label: \"Saudi Arabia\",\n code: \"SA\",\n unicode: \"🇸🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SA.svg\",\n label: \"+966\",\n },\n {\n country_label: \"United Arab Emirates\",\n code: \"AE\",\n unicode: \"🇦🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AE.svg\",\n label: \"+971\",\n },\n {\n country_label: \"Bahrain\",\n code: \"BH\",\n unicode: \"🇧🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BH.svg\",\n label: \"+973\",\n },\n {\n country_label: \"Kuwait\",\n code: \"KW\",\n unicode: \"🇰🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KW.svg\",\n label: \"+965\",\n },\n {\n country_label: \"Qatar\",\n code: \"QA\",\n unicode: \"🇶🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/QA.svg\",\n label: \"+974\",\n },\n {\n country_label: \"Oman\",\n code: \"OM\",\n unicode: \"🇴🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/OM.svg\",\n label: \"+968\",\n },\n {\n country_label: \"Andorra\",\n value: \"Andorra\",\n code: \"AD\",\n unicode: \"🇦🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AD.svg\",\n label: \"+376\",\n },\n\n {\n country_label: \"Afghanistan\",\n code: \"AF\",\n unicode: \"🇦🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AF.svg\",\n label: \"+93\",\n },\n {\n country_label: \"Antigua & Barbuda\",\n code: \"AG\",\n unicode: \"🇦🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AG.svg\",\n label: \"+1268\",\n },\n {\n country_label: \"Anguilla\",\n code: \"AI\",\n unicode: \"🇦🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AI.svg\",\n label: \"+1264\",\n },\n {\n country_label: \"Albania\",\n code: \"AL\",\n unicode: \"🇦🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AL.svg\",\n label: \"+355\",\n },\n {\n country_label: \"Armenia\",\n code: \"AM\",\n unicode: \"🇦🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AM.svg\",\n label: \"+374\",\n },\n {\n country_label: \"Angola\",\n code: \"AO\",\n unicode: \"🇦🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AO.svg\",\n label: \"+244\",\n },\n {\n country_label: \"Antarctica\",\n code: \"AQ\",\n unicode: \"🇦🇶\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AQ.svg\",\n label: \"+672\",\n },\n {\n country_label: \"Argentina\",\n code: \"AR\",\n unicode: \"🇦🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AR.svg\",\n label: \"+54\",\n },\n {\n country_label: \"American Samoa\",\n code: \"AS\",\n unicode: \"🇦🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AS.svg\",\n label: \"+1684\",\n },\n {\n country_label: \"Austria\",\n code: \"AT\",\n unicode: \"🇦🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AT.svg\",\n label: \"+43\",\n },\n {\n country_label: \"Australia\",\n code: \"AU\",\n unicode: \"🇦🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AU.svg\",\n label: \"+61\",\n },\n {\n country_label: \"Aruba\",\n code: \"AW\",\n unicode: \"🇦🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AW.svg\",\n label: \"+297\",\n },\n {\n country_label: \"Åland Islands\",\n code: \"AX\",\n unicode: \"🇦🇽\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AX.svg\",\n label: \"+358\",\n },\n {\n country_label: \"Azerbaijan\",\n code: \"AZ\",\n unicode: \"🇦🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AZ.svg\",\n label: \"+994\",\n },\n {\n country_label: \"Bosnia & Herzegovina\",\n code: \"BA\",\n unicode: \"🇧🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BA.svg\",\n label: \"+387\",\n },\n {\n country_label: \"Barbados\",\n code: \"BB\",\n unicode: \"🇧🇧\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BB.svg\",\n label: \"+1246\",\n },\n {\n country_label: \"Bangladesh\",\n code: \"BD\",\n unicode: \"🇧🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BD.svg\",\n label: \"+880\",\n },\n {\n country_label: \"Belgium\",\n code: \"BE\",\n unicode: \"🇧🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BE.svg\",\n label: \"+32\",\n },\n {\n country_label: \"Burkina Faso\",\n code: \"BF\",\n unicode: \"🇧🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BF.svg\",\n label: \"+226\",\n },\n {\n country_label: \"Bulgaria\",\n code: \"BG\",\n unicode: \"🇧🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BG.svg\",\n label: \"+359\",\n },\n\n {\n country_label: \"Burundi\",\n code: \"BI\",\n unicode: \"🇧🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BI.svg\",\n label: \"+257\",\n },\n {\n country_label: \"Benin\",\n code: \"BJ\",\n unicode: \"🇧🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BJ.svg\",\n label: \"+229\",\n },\n {\n country_label: \"St. Barthélemy\",\n code: \"BL\",\n unicode: \"🇧🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BL.svg\",\n label: \"+590\",\n },\n {\n country_label: \"Bermuda\",\n code: \"BM\",\n unicode: \"🇧🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BM.svg\",\n label: \"+1441\",\n },\n {\n country_label: \"Brunei\",\n code: \"BN\",\n unicode: \"🇧🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BN.svg\",\n label: \"+673\",\n },\n {\n country_label: \"Bolivia\",\n code: \"BO\",\n unicode: \"🇧🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BO.svg\",\n label: \"+591\",\n },\n {\n country_label: \"Brazil\",\n code: \"BR\",\n unicode: \"🇧🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BR.svg\",\n label: \"+55\",\n },\n {\n country_label: \"Bahamas\",\n code: \"BS\",\n unicode: \"🇧🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BS.svg\",\n label: \"+1242\",\n },\n {\n country_label: \"Bhutan\",\n code: \"BT\",\n unicode: \"🇧🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BT.svg\",\n label: \"+975\",\n },\n {\n country_label: \"Botswana\",\n code: \"BW\",\n unicode: \"🇧🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BW.svg\",\n label: \"+267\",\n },\n {\n country_label: \"Belarus\",\n code: \"BY\",\n unicode: \"🇧🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BY.svg\",\n label: \"+375\",\n },\n {\n country_label: \"Belize\",\n code: \"BZ\",\n unicode: \"🇧🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BZ.svg\",\n label: \"+501\",\n },\n {\n country_label: \"Canada\",\n code: \"CA\",\n unicode: \"🇨🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CA.svg\",\n label: \"+1\",\n },\n {\n country_label: \"Cocos (Keeling) Islands\",\n code: \"CC\",\n unicode: \"🇨🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CC.svg\",\n label: \"+61\",\n },\n {\n country_label: \"Congo - Kinshasa\",\n code: \"CD\",\n unicode: \"🇨🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CD.svg\",\n label: \"+243\",\n },\n {\n country_label: \"Central African Republic\",\n code: \"CF\",\n unicode: \"🇨🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CF.svg\",\n label: \"+236\",\n },\n {\n country_label: \"Congo - Brazzaville\",\n code: \"CG\",\n unicode: \"🇨🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CG.svg\",\n label: \"+242\",\n },\n {\n country_label: \"Switzerland\",\n code: \"CH\",\n unicode: \"🇨🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CH.svg\",\n label: \"+41\",\n },\n {\n country_label: \"Côte d’Ivoire\",\n code: \"CI\",\n unicode: \"🇨🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CI.svg\",\n label: \"+225\",\n },\n {\n country_label: \"Cook Islands\",\n code: \"CK\",\n unicode: \"🇨🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CK.svg\",\n label: \"+682\",\n },\n {\n country_label: \"Chile\",\n code: \"CL\",\n unicode: \"🇨🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CL.svg\",\n label: \"+56\",\n },\n {\n country_label: \"Cameroon\",\n code: \"CM\",\n unicode: \"🇨🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CM.svg\",\n label: \"+237\",\n },\n {\n country_label: \"China\",\n code: \"CN\",\n unicode: \"🇨🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CN.svg\",\n label: \"+86\",\n },\n {\n country_label: \"Colombia\",\n code: \"CO\",\n unicode: \"🇨🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CO.svg\",\n label: \"+57\",\n },\n {\n country_label: \"Costa Rica\",\n code: \"CR\",\n unicode: \"🇨🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CR.svg\",\n label: \"+506\",\n },\n {\n country_label: \"Cuba\",\n code: \"CU\",\n unicode: \"🇨🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CU.svg\",\n label: \"+53\",\n },\n {\n country_label: \"Cape Verde\",\n code: \"CV\",\n unicode: \"🇨🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CV.svg\",\n label: \"+238\",\n },\n {\n country_label: \"Christmas Island\",\n code: \"CX\",\n unicode: \"🇨🇽\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CX.svg\",\n label: \"+61\",\n },\n {\n country_label: \"Cyprus\",\n code: \"CY\",\n unicode: \"🇨🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CY.svg\",\n label: \"+357\",\n },\n {\n country_label: \"Czechia\",\n code: \"CZ\",\n unicode: \"🇨🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CZ.svg\",\n label: \"+420\",\n },\n {\n country_label: \"Germany\",\n code: \"DE\",\n unicode: \"🇩🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DE.svg\",\n label: \"+49\",\n },\n {\n country_label: \"Djibouti\",\n code: \"DJ\",\n unicode: \"🇩🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DJ.svg\",\n label: \"+253\",\n },\n {\n country_label: \"Denmark\",\n code: \"DK\",\n unicode: \"🇩🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DK.svg\",\n label: \"+45\",\n },\n {\n country_label: \"Dominica\",\n code: \"DM\",\n unicode: \"🇩🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DM.svg\",\n label: \"+1767\",\n },\n {\n country_label: \"Dominican Republic\",\n code: \"DO\",\n unicode: \"🇩🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DO.svg\",\n label: \"+1849\",\n },\n {\n country_label: \"Algeria\",\n code: \"DZ\",\n unicode: \"🇩🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DZ.svg\",\n label: \"+213\",\n },\n {\n country_label: \"Ecuador\",\n code: \"EC\",\n unicode: \"🇪🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EC.svg\",\n label: \"+593\",\n },\n {\n country_label: \"Estonia\",\n code: \"EE\",\n unicode: \"🇪🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EE.svg\",\n label: \"+372\",\n },\n {\n country_label: \"Egypt\",\n code: \"EG\",\n unicode: \"🇪🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EG.svg\",\n label: \"+20\",\n },\n {\n country_label: \"Eritrea\",\n code: \"ER\",\n unicode: \"🇪🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ER.svg\",\n label: \"+291\",\n },\n {\n country_label: \"Spain\",\n code: \"ES\",\n unicode: \"🇪🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ES.svg\",\n label: \"+34\",\n },\n {\n country_label: \"Ethiopia\",\n code: \"ET\",\n unicode: \"🇪🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ET.svg\",\n label: \"+251\",\n },\n {\n country_label: \"Finland\",\n code: \"FI\",\n unicode: \"🇫🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FI.svg\",\n label: \"+358\",\n },\n {\n country_label: \"Fiji\",\n code: \"FJ\",\n unicode: \"🇫🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FJ.svg\",\n label: \"+679\",\n },\n {\n country_label: \"Falkland Islands\",\n code: \"FK\",\n unicode: \"🇫🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FK.svg\",\n label: \"+500\",\n },\n {\n country_label: \"Micronesia\",\n code: \"FM\",\n unicode: \"🇫🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FM.svg\",\n label: \"+691\",\n },\n {\n country_label: \"Faroe Islands\",\n code: \"FO\",\n unicode: \"🇫🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FO.svg\",\n label: \"+298\",\n },\n {\n country_label: \"France\",\n code: \"FR\",\n unicode: \"🇫🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FR.svg\",\n label: \"+33\",\n },\n {\n country_label: \"Gabon\",\n code: \"GA\",\n unicode: \"🇬🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GA.svg\",\n label: \"+241\",\n },\n {\n country_label: \"United Kingdom\",\n code: \"GB\",\n unicode: \"🇬🇧\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GB.svg\",\n label: \"+44\",\n },\n {\n country_label: \"Grenada\",\n code: \"GD\",\n unicode: \"🇬🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GD.svg\",\n label: \"+1473\",\n },\n {\n country_label: \"Georgia\",\n code: \"GE\",\n unicode: \"🇬🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GE.svg\",\n label: \"+995\",\n },\n {\n country_label: \"French Guiana\",\n code: \"GF\",\n unicode: \"🇬🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GF.svg\",\n label: \"+594\",\n },\n {\n country_label: \"Guernsey\",\n code: \"GG\",\n unicode: \"🇬🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GG.svg\",\n label: \"+44\",\n },\n {\n country_label: \"Ghana\",\n code: \"GH\",\n unicode: \"🇬🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GH.svg\",\n label: \"+233\",\n },\n {\n country_label: \"Gibraltar\",\n code: \"GI\",\n unicode: \"🇬🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GI.svg\",\n label: \"+350\",\n },\n {\n country_label: \"Greenland\",\n code: \"GL\",\n unicode: \"🇬🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GL.svg\",\n label: \"+299\",\n },\n {\n country_label: \"Gambia\",\n code: \"GM\",\n unicode: \"🇬🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GM.svg\",\n label: \"+220\",\n },\n {\n country_label: \"Guinea\",\n code: \"GN\",\n unicode: \"🇬🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GN.svg\",\n label: \"+224\",\n },\n {\n country_label: \"Guadeloupe\",\n code: \"GP\",\n unicode: \"🇬🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GP.svg\",\n label: \"+590\",\n },\n {\n country_label: \"Equatorial Guinea\",\n code: \"GQ\",\n unicode: \"🇬🇶\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GQ.svg\",\n label: \"+240\",\n },\n {\n country_label: \"Greece\",\n code: \"GR\",\n unicode: \"🇬🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GR.svg\",\n label: \"+30\",\n },\n {\n country_label: \"South Georgia & South Sandwich Islands\",\n code: \"GS\",\n unicode: \"🇬🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GS.svg\",\n label: \"+500\",\n },\n {\n country_label: \"Guatemala\",\n code: \"GT\",\n unicode: \"🇬🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GT.svg\",\n label: \"+502\",\n },\n {\n country_label: \"Guam\",\n code: \"GU\",\n unicode: \"🇬🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GU.svg\",\n label: \"+1671\",\n },\n {\n country_label: \"Guinea-Bissau\",\n code: \"GW\",\n unicode: \"🇬🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GW.svg\",\n label: \"+245\",\n },\n {\n country_label: \"Guyana\",\n code: \"GY\",\n unicode: \"🇬🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GY.svg\",\n label: \"+595\",\n },\n {\n country_label: \"Hong Kong SAR China\",\n code: \"HK\",\n unicode: \"🇭🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HK.svg\",\n label: \"+852\",\n },\n {\n country_label: \"Honduras\",\n code: \"HN\",\n unicode: \"🇭🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HN.svg\",\n label: \"+504\",\n },\n {\n country_label: \"Croatia\",\n code: \"HR\",\n unicode: \"🇭🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HR.svg\",\n label: \"+385\",\n },\n {\n country_label: \"Haiti\",\n code: \"HT\",\n unicode: \"🇭🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HT.svg\",\n label: \"+509\",\n },\n {\n country_label: \"Hungary\",\n code: \"HU\",\n unicode: \"🇭🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HU.svg\",\n label: \"+36\",\n },\n {\n country_label: \"Indonesia\",\n code: \"ID\",\n unicode: \"🇮🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ID.svg\",\n label: \"+62\",\n },\n {\n country_label: \"Ireland\",\n code: \"IE\",\n unicode: \"🇮🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IE.svg\",\n label: \"+353\",\n },\n {\n country_label: \"Israel\",\n code: \"IL\",\n unicode: \"🇮🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IL.svg\",\n label: \"+972\",\n },\n {\n country_label: \"Isle of Man\",\n code: \"IM\",\n unicode: \"🇮🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IM.svg\",\n label: \"+44\",\n },\n {\n country_label: \"India\",\n code: \"IN\",\n unicode: \"🇮🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IN.svg\",\n label: \"+91\",\n },\n {\n country_label: \"British Indian Ocean Territory\",\n code: \"IO\",\n unicode: \"🇮🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IO.svg\",\n label: \"+246\",\n },\n {\n country_label: \"Iraq\",\n code: \"IQ\",\n unicode: \"🇮🇶\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IQ.svg\",\n label: \"+964\",\n },\n {\n country_label: \"Iran\",\n code: \"IR\",\n unicode: \"🇮🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IR.svg\",\n label: \"+98\",\n },\n {\n country_label: \"Iceland\",\n code: \"IS\",\n unicode: \"🇮🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IS.svg\",\n label: \"+354\",\n },\n {\n country_label: \"Italy\",\n code: \"IT\",\n unicode: \"🇮🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IT.svg\",\n label: \"+39\",\n },\n {\n country_label: \"Jersey\",\n code: \"JE\",\n unicode: \"🇯🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JE.svg\",\n label: \"+44\",\n },\n {\n country_label: \"Jamaica\",\n code: \"JM\",\n unicode: \"🇯🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JM.svg\",\n label: \"+1876\",\n },\n {\n country_label: \"Jordan\",\n code: \"JO\",\n unicode: \"🇯🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JO.svg\",\n label: \"+962\",\n },\n {\n country_label: \"Japan\",\n code: \"JP\",\n unicode: \"🇯🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JP.svg\",\n label: \"+81\",\n },\n {\n country_label: \"Kenya\",\n code: \"KE\",\n unicode: \"🇰🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KE.svg\",\n label: \"+254\",\n },\n {\n country_label: \"Kyrgyzstan\",\n code: \"KG\",\n unicode: \"🇰🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KG.svg\",\n label: \"+996\",\n },\n {\n country_label: \"Cambodia\",\n code: \"KH\",\n unicode: \"🇰🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KH.svg\",\n label: \"+855\",\n },\n {\n country_label: \"Kiribati\",\n code: \"KI\",\n unicode: \"🇰🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KI.svg\",\n label: \"+686\",\n },\n {\n country_label: \"Comoros\",\n code: \"KM\",\n unicode: \"🇰🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KM.svg\",\n label: \"+269\",\n },\n {\n country_label: \"St. Kitts & Nevis\",\n code: \"KN\",\n unicode: \"🇰🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KN.svg\",\n label: \"+1869\",\n },\n {\n country_label: \"North Korea\",\n code: \"KP\",\n unicode: \"🇰🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KP.svg\",\n label: \"+850\",\n },\n {\n country_label: \"South Korea\",\n code: \"KR\",\n unicode: \"🇰🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KR.svg\",\n label: \"+82\",\n },\n\n {\n country_label: \"Cayman Islands\",\n code: \"KY\",\n unicode: \"🇰🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KY.svg\",\n label: \"+ 345\",\n },\n {\n country_label: \"Kazakhstan\",\n code: \"KZ\",\n unicode: \"🇰🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KZ.svg\",\n label: \"+77\",\n },\n {\n country_label: \"Laos\",\n code: \"LA\",\n unicode: \"🇱🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LA.svg\",\n label: \"+856\",\n },\n {\n country_label: \"Lebanon\",\n code: \"LB\",\n unicode: \"🇱🇧\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LB.svg\",\n label: \"+961\",\n },\n {\n country_label: \"St. Lucia\",\n code: \"LC\",\n unicode: \"🇱🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LC.svg\",\n label: \"+1758\",\n },\n {\n country_label: \"Liechtenstein\",\n code: \"LI\",\n unicode: \"🇱🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LI.svg\",\n label: \"+423\",\n },\n {\n country_label: \"Sri Lanka\",\n code: \"LK\",\n unicode: \"🇱🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LK.svg\",\n label: \"+94\",\n },\n {\n country_label: \"Liberia\",\n code: \"LR\",\n unicode: \"🇱🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LR.svg\",\n label: \"+231\",\n },\n {\n country_label: \"Lesotho\",\n code: \"LS\",\n unicode: \"🇱🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LS.svg\",\n label: \"+266\",\n },\n {\n country_label: \"Lithuania\",\n code: \"LT\",\n unicode: \"🇱🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LT.svg\",\n label: \"+370\",\n },\n {\n country_label: \"Luxembourg\",\n code: \"LU\",\n unicode: \"🇱🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LU.svg\",\n label: \"+352\",\n },\n {\n country_label: \"Latvia\",\n code: \"LV\",\n unicode: \"🇱🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LV.svg\",\n label: \"+371\",\n },\n {\n country_label: \"Libya\",\n code: \"LY\",\n unicode: \"🇱🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LY.svg\",\n label: \"+218\",\n },\n {\n country_label: \"Morocco\",\n code: \"MA\",\n unicode: \"🇲🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MA.svg\",\n label: \"+212\",\n },\n {\n country_label: \"Monaco\",\n code: \"MC\",\n unicode: \"🇲🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MC.svg\",\n label: \"+377\",\n },\n {\n country_label: \"Moldova\",\n code: \"MD\",\n unicode: \"🇲🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MD.svg\",\n label: \"+373\",\n },\n {\n country_label: \"Montenegro\",\n code: \"ME\",\n unicode: \"🇲🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ME.svg\",\n label: \"+382\",\n },\n {\n country_label: \"St. Martin\",\n code: \"MF\",\n unicode: \"🇲🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MF.svg\",\n label: \"+590\",\n },\n {\n country_label: \"Madagascar\",\n code: \"MG\",\n unicode: \"🇲🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MG.svg\",\n label: \"+261\",\n },\n {\n country_label: \"Marshall Islands\",\n code: \"MH\",\n unicode: \"🇲🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MH.svg\",\n label: \"+692\",\n },\n {\n country_label: \"North Macedonia\",\n code: \"MK\",\n unicode: \"🇲🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MK.svg\",\n label: \"+389\",\n },\n {\n country_label: \"Mali\",\n code: \"ML\",\n unicode: \"🇲🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ML.svg\",\n label: \"+223\",\n },\n {\n country_label: \"Myanmar (Burma)\",\n code: \"MM\",\n unicode: \"🇲🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MM.svg\",\n label: \"+95\",\n },\n {\n country_label: \"Mongolia\",\n code: \"MN\",\n unicode: \"🇲🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MN.svg\",\n label: \"+976\",\n },\n {\n country_label: \"Macao SAR China\",\n code: \"MO\",\n unicode: \"🇲🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MO.svg\",\n label: \"+853\",\n },\n {\n country_label: \"Northern Mariana Islands\",\n code: \"MP\",\n unicode: \"🇲🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MP.svg\",\n label: \"+1670\",\n },\n {\n country_label: \"Martinique\",\n code: \"MQ\",\n unicode: \"🇲🇶\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MQ.svg\",\n label: \"+596\",\n },\n {\n country_label: \"Mauritania\",\n code: \"MR\",\n unicode: \"🇲🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MR.svg\",\n label: \"+222\",\n },\n {\n country_label: \"Montserrat\",\n code: \"MS\",\n unicode: \"🇲🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MS.svg\",\n label: \"+1664\",\n },\n {\n country_label: \"Malta\",\n code: \"MT\",\n unicode: \"🇲🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MT.svg\",\n label: \"+356\",\n },\n {\n country_label: \"Mauritius\",\n code: \"MU\",\n unicode: \"🇲🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MU.svg\",\n label: \"+230\",\n },\n {\n country_label: \"Maldives\",\n code: \"MV\",\n unicode: \"🇲🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MV.svg\",\n label: \"+960\",\n },\n {\n country_label: \"Malawi\",\n code: \"MW\",\n unicode: \"🇲🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MW.svg\",\n label: \"+265\",\n },\n {\n country_label: \"Mexico\",\n code: \"MX\",\n unicode: \"🇲🇽\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MX.svg\",\n label: \"+52\",\n },\n {\n country_label: \"Malaysia\",\n code: \"MY\",\n unicode: \"🇲🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MY.svg\",\n label: \"+60\",\n },\n {\n country_label: \"Mozambique\",\n code: \"MZ\",\n unicode: \"🇲🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MZ.svg\",\n label: \"+258\",\n },\n {\n country_label: \"Namibia\",\n code: \"NA\",\n unicode: \"🇳🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NA.svg\",\n label: \"+264\",\n },\n {\n country_label: \"New Caledonia\",\n code: \"NC\",\n unicode: \"🇳🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NC.svg\",\n label: \"+687\",\n },\n {\n country_label: \"Niger\",\n code: \"NE\",\n unicode: \"🇳🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NE.svg\",\n label: \"+227\",\n },\n {\n country_label: \"Norfolk Island\",\n code: \"NF\",\n unicode: \"🇳🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NF.svg\",\n label: \"+672\",\n },\n {\n country_label: \"Nigeria\",\n code: \"NG\",\n unicode: \"🇳🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NG.svg\",\n label: \"+234\",\n },\n {\n country_label: \"Nicaragua\",\n code: \"NI\",\n unicode: \"🇳🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NI.svg\",\n label: \"+505\",\n },\n {\n country_label: \"Netherlands\",\n code: \"NL\",\n unicode: \"🇳🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NL.svg\",\n label: \"+31\",\n },\n {\n country_label: \"Norway\",\n code: \"NO\",\n unicode: \"🇳🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NO.svg\",\n label: \"+47\",\n },\n {\n country_label: \"Nepal\",\n code: \"NP\",\n unicode: \"🇳🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NP.svg\",\n label: \"+977\",\n },\n {\n country_label: \"Nauru\",\n code: \"NR\",\n unicode: \"🇳🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NR.svg\",\n label: \"+674\",\n },\n {\n country_label: \"Niue\",\n code: \"NU\",\n unicode: \"🇳🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NU.svg\",\n label: \"+683\",\n },\n {\n country_label: \"New Zealand\",\n code: \"NZ\",\n unicode: \"🇳🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NZ.svg\",\n label: \"+64\",\n },\n\n {\n country_label: \"Panama\",\n code: \"PA\",\n unicode: \"🇵🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PA.svg\",\n label: \"+507\",\n },\n {\n country_label: \"Peru\",\n code: \"PE\",\n unicode: \"🇵🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PE.svg\",\n label: \"+51\",\n },\n {\n country_label: \"French Polynesia\",\n code: \"PF\",\n unicode: \"🇵🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PF.svg\",\n label: \"+689\",\n },\n {\n country_label: \"Papua New Guinea\",\n code: \"PG\",\n unicode: \"🇵🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PG.svg\",\n label: \"+675\",\n },\n {\n country_label: \"Philippines\",\n code: \"PH\",\n unicode: \"🇵🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PH.svg\",\n label: \"+63\",\n },\n {\n country_label: \"Pakistan\",\n code: \"PK\",\n unicode: \"🇵🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PK.svg\",\n label: \"+92\",\n },\n {\n country_label: \"Poland\",\n code: \"PL\",\n unicode: \"🇵🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PL.svg\",\n label: \"+48\",\n },\n {\n country_label: \"St. Pierre & Miquelon\",\n code: \"PM\",\n unicode: \"🇵🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PM.svg\",\n label: \"+508\",\n },\n {\n country_label: \"Pitcairn Islands\",\n code: \"PN\",\n unicode: \"🇵🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PN.svg\",\n label: \"+872\",\n },\n {\n country_label: \"Puerto Rico\",\n code: \"PR\",\n unicode: \"🇵🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PR.svg\",\n label: \"+1939\",\n },\n {\n country_label: \"Palestinian Territories\",\n code: \"PS\",\n unicode: \"🇵🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PS.svg\",\n label: \"+970\",\n },\n {\n country_label: \"Portugal\",\n code: \"PT\",\n unicode: \"🇵🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PT.svg\",\n label: \"+351\",\n },\n {\n country_label: \"Palau\",\n code: \"PW\",\n unicode: \"🇵🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PW.svg\",\n label: \"+680\",\n },\n {\n country_label: \"Paraguay\",\n code: \"PY\",\n unicode: \"🇵🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PY.svg\",\n label: \"+595\",\n },\n\n {\n country_label: \"Réunion\",\n code: \"RE\",\n unicode: \"🇷🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RE.svg\",\n label: \"+262\",\n },\n {\n country_label: \"Romania\",\n code: \"RO\",\n unicode: \"🇷🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RO.svg\",\n label: \"+40\",\n },\n {\n country_label: \"Serbia\",\n code: \"RS\",\n unicode: \"🇷🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RS.svg\",\n label: \"+381\",\n },\n {\n country_label: \"Russia\",\n code: \"RU\",\n unicode: \"🇷🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RU.svg\",\n label: \"+7\",\n },\n {\n country_label: \"Rwanda\",\n code: \"RW\",\n unicode: \"🇷🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RW.svg\",\n label: \"+250\",\n },\n\n {\n country_label: \"Solomon Islands\",\n code: \"SB\",\n unicode: \"🇸🇧\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SB.svg\",\n label: \"+677\",\n },\n {\n country_label: \"Seychelles\",\n code: \"SC\",\n unicode: \"🇸🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SC.svg\",\n label: \"+248\",\n },\n {\n country_label: \"Sudan\",\n code: \"SD\",\n unicode: \"🇸🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SD.svg\",\n label: \"+249\",\n },\n {\n country_label: \"Sweden\",\n code: \"SE\",\n unicode: \"🇸🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SE.svg\",\n label: \"+46\",\n },\n {\n country_label: \"Singapore\",\n code: \"SG\",\n unicode: \"🇸🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SG.svg\",\n label: \"+65\",\n },\n {\n country_label: \"St. Helena\",\n code: \"SH\",\n unicode: \"🇸🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SH.svg\",\n label: \"+290\",\n },\n {\n country_label: \"Slovenia\",\n code: \"SI\",\n unicode: \"🇸🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SI.svg\",\n label: \"+386\",\n },\n {\n country_label: \"Svalbard & Jan Mayen\",\n code: \"SJ\",\n unicode: \"🇸🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SJ.svg\",\n label: \"+47\",\n },\n {\n country_label: \"Slovakia\",\n code: \"SK\",\n unicode: \"🇸🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SK.svg\",\n label: \"+421\",\n },\n {\n country_label: \"Sierra Leone\",\n code: \"SL\",\n unicode: \"🇸🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SL.svg\",\n label: \"+232\",\n },\n {\n country_label: \"San Marino\",\n code: \"SM\",\n unicode: \"🇸🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SM.svg\",\n label: \"+378\",\n },\n {\n country_label: \"Senegal\",\n code: \"SN\",\n unicode: \"🇸🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SN.svg\",\n label: \"+221\",\n },\n {\n country_label: \"Somalia\",\n code: \"SO\",\n unicode: \"🇸🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SO.svg\",\n label: \"+252\",\n },\n {\n country_label: \"Suriname\",\n code: \"SR\",\n unicode: \"🇸🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SR.svg\",\n label: \"+597\",\n },\n {\n country_label: \"South Sudan\",\n code: \"SS\",\n unicode: \"🇸🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SS.svg\",\n label: \"+211\",\n },\n {\n country_label: \"São Tomé & Príncipe\",\n code: \"ST\",\n unicode: \"🇸🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ST.svg\",\n label: \"+239\",\n },\n {\n country_label: \"El Salvador\",\n code: \"SV\",\n unicode: \"🇸🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SV.svg\",\n label: \"+503\",\n },\n {\n country_label: \"Syria\",\n code: \"SY\",\n unicode: \"🇸🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SY.svg\",\n label: \"+963\",\n },\n {\n country_label: \"Eswatini\",\n code: \"SZ\",\n unicode: \"🇸🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SZ.svg\",\n label: \"+268\",\n },\n {\n country_label: \"Turks & Caicos Islands\",\n code: \"TC\",\n unicode: \"🇹🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TC.svg\",\n label: \"+1649\",\n },\n {\n country_label: \"Chad\",\n code: \"TD\",\n unicode: \"🇹🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TD.svg\",\n label: \"+235\",\n },\n {\n country_label: \"Togo\",\n code: \"TG\",\n unicode: \"🇹🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TG.svg\",\n label: \"+228\",\n },\n {\n country_label: \"Thailand\",\n code: \"TH\",\n unicode: \"🇹🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TH.svg\",\n label: \"+66\",\n },\n {\n country_label: \"Tajikistan\",\n code: \"TJ\",\n unicode: \"🇹🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TJ.svg\",\n label: \"+992\",\n },\n {\n country_label: \"Tokelau\",\n code: \"TK\",\n unicode: \"🇹🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TK.svg\",\n label: \"+690\",\n },\n {\n country_label: \"Timor-Leste\",\n code: \"TL\",\n unicode: \"🇹🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TL.svg\",\n label: \"+670\",\n },\n {\n country_label: \"Turkmenistan\",\n code: \"TM\",\n unicode: \"🇹🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TM.svg\",\n label: \"+993\",\n },\n {\n country_label: \"Tunisia\",\n code: \"TN\",\n unicode: \"🇹🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TN.svg\",\n label: \"+216\",\n },\n {\n country_label: \"Tonga\",\n code: \"TO\",\n unicode: \"🇹🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TO.svg\",\n label: \"+676\",\n },\n {\n country_label: \"Turkey\",\n code: \"TR\",\n unicode: \"🇹🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TR.svg\",\n label: \"+90\",\n },\n {\n country_label: \"Trinidad & Tobago\",\n code: \"TT\",\n unicode: \"🇹🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TT.svg\",\n label: \"+1868\",\n },\n {\n country_label: \"Tuvalu\",\n code: \"TV\",\n unicode: \"🇹🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TV.svg\",\n label: \"+688\",\n },\n {\n country_label: \"Taiwan\",\n code: \"TW\",\n unicode: \"🇹🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TW.svg\",\n label: \"+886\",\n },\n {\n country_label: \"Tanzania\",\n code: \"TZ\",\n unicode: \"🇹🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TZ.svg\",\n label: \"+255\",\n },\n {\n country_label: \"Ukraine\",\n code: \"UA\",\n unicode: \"🇺🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UA.svg\",\n label: \"+380\",\n },\n {\n country_label: \"Uganda\",\n code: \"UG\",\n unicode: \"🇺🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UG.svg\",\n label: \"+256\",\n },\n {\n country_label: \"United States\",\n code: \"US\",\n unicode: \"🇺🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/US.svg\",\n label: \"+1\",\n },\n {\n country_label: \"Uruguay\",\n code: \"UY\",\n unicode: \"🇺🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UY.svg\",\n label: \"+598\",\n },\n {\n country_label: \"Uzbekistan\",\n\n code: \"UZ\",\n unicode: \"🇺🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UZ.svg\",\n label: \"+998\",\n },\n {\n country_label: \"Vatican City\",\n code: \"VA\",\n unicode: \"🇻🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VA.svg\",\n label: \"+379\",\n },\n {\n country_label: \"St. Vincent & Grenadines\",\n code: \"VC\",\n unicode: \"🇻🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VC.svg\",\n label: \"+1784\",\n },\n {\n country_label: \"Venezuela\",\n code: \"VE\",\n unicode: \"🇻🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VE.svg\",\n label: \"+58\",\n },\n {\n country_label: \"British Virgin Islands\",\n code: \"VG\",\n unicode: \"🇻🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VG.svg\",\n label: \"+1284\",\n },\n {\n country_label: \"U.S. Virgin Islands\",\n code: \"VI\",\n unicode: \"🇻🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VI.svg\",\n label: \"+1340\",\n },\n {\n country_label: \"Vietnam\",\n code: \"VN\",\n unicode: \"🇻🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VN.svg\",\n label: \"+84\",\n },\n {\n country_label: \"Vanuatu\",\n code: \"VU\",\n unicode: \"🇻🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VU.svg\",\n label: \"+678\",\n },\n {\n country_label: \"Wallis & Futuna\",\n code: \"WF\",\n unicode: \"🇼🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WF.svg\",\n label: \"+681\",\n },\n {\n country_label: \"Samoa\",\n code: \"WS\",\n unicode: \"🇼🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WS.svg\",\n label: \"+685\",\n },\n {\n country_label: \"Yemen\",\n code: \"YE\",\n unicode: \"🇾🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/YE.svg\",\n label: \"+967\",\n },\n {\n country_label: \"Mayotte\",\n code: \"YT\",\n unicode: \"🇾🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/YT.svg\",\n label: \"+262\",\n },\n {\n country_label: \"South Africa\",\n code: \"ZA\",\n unicode: \"🇿🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZA.svg\",\n label: \"+27\",\n },\n {\n country_label: \"Zambia\",\n code: \"ZM\",\n unicode: \"🇿🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZM.svg\",\n label: \"+260\",\n },\n {\n country_label: \"Zimbabwe\",\n code: \"ZW\",\n unicode: \"🇿🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZW.svg\",\n label: \"+263\",\n },\n]\n\nexport default countries\n","import React, { useState, FC } from \"react\"\nimport { cn } from \"../util\"\n\n// TODO: fix wrapping issue when small screen\n\ntype TabsTypes = {\n options?: any\n onChangeTab?: (option) => void\n defaultValue?: any\n orientation?: \"horizontal\" | \"vertical\"\n direction?: \"rtl\" | \"ltr\"\n marginBetween?: any\n width?: \"full\" | \"normal\"\n pill?: boolean\n}\nexport const HawaTabs: FC<TabsTypes> = ({\n orientation = \"horizontal\",\n direction = \"ltr\",\n width = \"normal\",\n marginBetween = 0,\n pill = false,\n ...props\n}) => {\n const [selectedOption, setSelectedOption] = useState(props.options[0]?.value)\n\n let activeTabStyle = {\n vertical: \"inline-block py-2 px-4 text-white bg-primary active\",\n horizontal: \"inline-block py-2 px-4 text-white bg-primary active\",\n }\n // rounded rounded-br-none rounded-bl-none\n let inactiveTabStyle = {\n vertical:\n \"inline-block py-2 px-4 hover:text-gray-900 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-white\",\n horizontal:\n \"bg-gray-100 inline-block py-2 px-4 hover:text-gray-900 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-white\",\n }\n // rounded rounded-br-none rounded-bl-none\n let widthStyles = {\n full: \"w-full min-w-full\",\n normal: \"w-fit\",\n }\n let orientationStyle = {\n vertical: {\n container: \"flex flex-row\",\n tabs: \"flex flex-col w-fit flex-wrap rounded border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400\",\n },\n horizontal: {\n container: \"\",\n tabs: \"flex w-fit flex-wrap rounded rounded-br-none rounded-bl-none border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400\",\n },\n }\n let containerStyle = {\n vertical: \"flex flex-row\",\n horizontal: \"flex flex-col\",\n }\n let tabsStyle = {\n vertical:\n \"sticky top-2 h-fit flex flex-col w-fit flex-wrap rounded border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400\",\n horizontal:\n \"flex w-fit flex-wrap border-b-primary text-center text-sm font-medium text-gray-500 dark:text-gray-400\",\n }\n return (\n <div\n dir={direction}\n className={cn(\n containerStyle[orientation],\n props.options[selectedOption] ? \"border-b-2\" : \"border-b-0\"\n )}\n >\n <ul\n className={cn(\n \"w-full border-primary\",\n marginBetween\n ? orientation === \"vertical\"\n ? \"mb-0\"\n : \"mb-\" + marginBetween\n : \"\",\n marginBetween && direction === \"rtl\"\n ? \"ml-\" + marginBetween\n : \"mr-\" + marginBetween,\n tabsStyle[orientation],\n orientation === \"horizontal\"\n ? \"grid grid-cols-3 gap-1 sm:flex sm:flex-row sm:gap-0 \"\n : \"\",\n // orientation === \"vertical\"\n // ? direction === \"rtl\"\n // ? \"rounded-none rounded-r border-l-2\"\n // : \"rounded-none rounded-l border-r-2\"\n // : \"border-b-2\",\n widthStyles[width],\n pill\n ? \"gap-0.5 rounded border-none bg-gray-100 p-0.5\"\n : orientation === \"vertical\"\n ? direction === \"rtl\"\n ? \"rounded-none rounded-r border-l-2\"\n : \"rounded-none rounded-l border-r-2\"\n : \"border-b-0 sm:border-b-2\"\n )}\n >\n {props.options?.map((opt: any, o) => (\n <button\n key={o}\n aria-current=\"page\"\n onClick={() => {\n setSelectedOption(opt.value)\n props?.onChangeTab(opt)\n }}\n className={cn(\n opt.value === selectedOption\n ? // props.options[selectedOption].value === opt.value\n [\n activeTabStyle[orientation],\n direction === \"rtl\" ? \"rounded-r\" : \"rounded-l\",\n ]\n : inactiveTabStyle[orientation],\n pill\n ? \"rounded\"\n : orientation === \"vertical\"\n ? \"rounded rounded-bl-none rounded-tl-none\"\n : \"rounded sm:rounded-b-none\",\n // direction === \"rtl\" ? \"bg-yellow-400\" : \"bg-yellow-400\"\n \"flex w-fit flex-row items-center gap-2 transition-all \"\n )}\n >\n {opt.icon}\n {opt.label}\n </button>\n ))}\n </ul>\n\n <div className=\"flex-1 transition-all\">\n {props.options.map((tab, i) => (\n <div\n key={i}\n className={cn(selectedOption === tab.value ? \"\" : \"hidden\")}\n >\n {tab.content}\n </div>\n ))}\n </div>\n </div>\n )\n}\n","import React, { ReactElement, useEffect, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype ModalTypes = {\n /** * The boolean to open and close the modal */\n open: boolean\n /** * The title of the modal, it will appear in the header of the modal */\n title: string\n /**\n * a function that's triggered when the modal is closed either by the clicking the close button or outside the modal.\n * @returns void\n */\n onClose: () => void\n /** * Boolean to enable/disable closing the modal upon clicking outside the modal */\n closeOnClickOutside?: boolean\n /** * The id of the modal */\n modalID?: string\n children: ReactElement\n /** * The array of actions for the modal, it will appear in the footer of the modal */\n actions: any\n}\nexport const HawaModal: FC<ModalTypes> = ({\n open,\n title,\n onClose,\n closeOnClickOutside = true,\n ...props\n}) => {\n let defaultStyle =\n \"absolute top-1/2 left-1/2 w-full h-screen flex flex-col justify-center items-center -translate-x-1/2 -translate-y-1/2 transition-all\"\n useEffect((): any => {\n if (closeOnClickOutside && open) {\n window.onclick = (e) => {\n e.stopPropagation()\n onClose()\n }\n }\n return () => (window.onclick = null)\n }, [open])\n return (\n <div\n className={clsx(\n defaultStyle,\n open ? \"z-10 opacity-100 \" : \"invisible -z-10 opacity-0\"\n )}\n >\n <div\n className={clsx(\n \"absolute h-screen w-full bg-gray-500 opacity-50\",\n open ? \"opacity-50\" : \"opacity-0\"\n )}\n ></div>\n\n <div className=\"relative w-1/2 max-w-md rounded bg-white p-1 shadow-lg dark:bg-gray-700\">\n <div className=\"flex items-start justify-between rounded-t p-3 dark:border-gray-600\">\n <h3 className=\"text-xl font-semibold text-gray-900 dark:text-white\">\n {title}\n </h3>\n <button\n type=\"button\"\n className=\"inline-flex items-center rounded bg-transparent p-1.5 text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white\"\n data-modal-toggle=\"defaultModal\"\n onClick={(e) => {\n onClose()\n }}\n >\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"sr-only\">Close modal</span>\n </button>\n </div>\n <div className=\"space-y-6 p-3\">{props.children}</div>\n <div className=\"mx-2 flex items-center justify-end space-x-1 p-0 dark:border-gray-600\">\n {props.actions}\n </div>\n </div>\n </div>\n )\n}\n","import React, { ReactNode, useEffect, useRef, useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\n// TODO: add width to decrease width\n\ninterface TMenuTypes {\n menuItems: MenuItems[][]\n withHeader?: boolean\n headerTitle?: string\n headerSubtitle?: string\n direction?: \"rtl\" | \"ltr\"\n anchor?: any\n children?: ReactNode\n position?:\n | \"left-top\"\n | \"left-bottom\"\n | \"right-top\"\n | \"right-bottom\"\n | \"top-right\"\n | \"top-left\"\n | \"bottom-right\"\n | \"bottom-left\"\n onClickOutside?: any\n actionedItem?: any\n size?: \"small\" | \"normal\" | \"large\"\n}\n\ntype MenuItems = {\n icon?: JSX.Element\n disabled?: boolean\n label: string\n action?: (e: any) => void\n isButton?: boolean\n element?: any\n}\n\nexport const HawaMenu: FC<TMenuTypes> = ({\n menuItems,\n withHeader,\n direction = \"ltr\",\n headerTitle,\n headerSubtitle,\n size = \"normal\",\n children,\n onClickOutside,\n actionedItem,\n position = \"top-right\",\n}) => {\n const [menuOpened, setMenuOpened] = useState(false)\n const childrenRef = useRef(null)\n const [childrenHeight, setChildrenHeight] = useState(null)\n const [childrenWidth, setChildrenWidth] = useState(null)\n const menuRef = useRef(null)\n const [menuWidth, setMenuWidth] = useState(null)\n const [menuHeight, setMenuHeight] = useState(null)\n\n useEffect(() => {\n setMenuHeight(menuRef.current?.getBoundingClientRect().height)\n setMenuWidth(menuRef.current?.getBoundingClientRect().width)\n setChildrenHeight(childrenRef.current?.getBoundingClientRect().height)\n setChildrenWidth(childrenRef.current?.getBoundingClientRect().width)\n\n const handleClickOutside = (event) => {\n if (menuRef.current && !menuRef.current.contains(event.target)) {\n setMenuOpened(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [onClickOutside])\n\n let defaultStyles =\n \"border-none absolute ring-offset-1 absolute z-10 w-44 divide-y divide-gray-100 overflow-y-clip rounded bg-gray-50 shadow-lg transition-all dark:bg-gray-700\"\n let sizeStyles = {\n small: \"text-[11px] p-1 px-4 m-0\",\n normal: \"py-2 px-4\",\n large: \"\",\n }\n let menuCoordinates\n let spacing = 5\n switch (position) {\n case \"top-right\":\n menuCoordinates =\n direction === \"rtl\"\n ? `${menuWidth - childrenWidth}px, -${\n menuHeight + childrenHeight + spacing\n }px`\n : `0px, -${menuHeight + childrenHeight + spacing}px`\n break\n case \"top-left\":\n menuCoordinates =\n direction === \"rtl\"\n ? `${0}px, -${menuHeight + childrenHeight + spacing}px`\n : `-${menuWidth - childrenWidth}px, -${\n menuHeight + childrenHeight + spacing\n }px`\n break\n case \"bottom-right\":\n menuCoordinates =\n direction === \"rtl\"\n ? `-${0}px, ${spacing}px`\n : `-${childrenWidth - menuWidth}px, ${spacing}px`\n\n break\n case \"bottom-left\":\n menuCoordinates =\n direction === \"rtl\"\n ? `0px, ${spacing}px`\n : `-${menuWidth - childrenWidth}px,${spacing}px`\n break\n case \"right-bottom\":\n menuCoordinates =\n direction === \"rtl\"\n ? `${menuWidth + spacing}px, -${childrenHeight}px`\n : `${childrenWidth + spacing}px, -${childrenHeight}px`\n break\n case \"right-top\":\n menuCoordinates =\n direction === \"rtl\"\n ? `${menuWidth + spacing}px, -${menuHeight}px`\n : `${childrenWidth + spacing}px, -${menuHeight}px`\n break\n case \"left-bottom\":\n menuCoordinates =\n direction === \"rtl\"\n ? `-${childrenWidth + spacing}px, -${childrenHeight}px`\n : `-${menuWidth + spacing}px, -${childrenHeight}px`\n break\n case \"left-top\":\n menuCoordinates =\n direction === \"rtl\"\n ? `-${childrenWidth + spacing}px, -${menuHeight}px`\n : `-${menuWidth + spacing}px, -${menuHeight}px`\n break\n\n default:\n menuCoordinates = `-${menuWidth / 2}px, -${\n childrenHeight + menuHeight / 2\n }px`\n\n break\n }\n return (\n <div\n onClick={() => {\n if (menuOpened) setMenuOpened(false)\n else setMenuOpened(true)\n }}\n >\n <div ref={childrenRef}>{children}</div>\n\n <div\n ref={menuRef}\n style={{\n position: \"absolute\",\n width: \"max-content\",\n transform: `translate(${menuCoordinates})`,\n maxWidth: \"200px\",\n }}\n className={clsx(\n defaultStyles,\n menuOpened ? \"opacity-100\" : \"invisible opacity-0\"\n )}\n >\n {withHeader && (\n <div className=\"px-4 py-3 text-xs text-gray-900 dark:text-white\">\n <div>{headerTitle}</div>\n <div className=\"truncate font-medium\">{headerSubtitle}</div>\n </div>\n )}\n {menuItems?.map((group, o) => {\n return (\n <ul\n key={o}\n className=\"bg-layout-1200 flex flex-col gap-1 p-1 text-gray-700 dark:text-gray-200\"\n >\n {group?.map((item, indx) => {\n return item.element ? (\n <li\n key={indx}\n className=\"cursor-pointer items-center rounded hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white\"\n >\n {item.element}\n </li>\n ) : (\n <li\n key={indx}\n onClick={() => {\n if (item.disabled) {\n console.log(\"button is disabled\")\n } else {\n item?.action(actionedItem)\n }\n }}\n className={clsx(\n \"transition-all\",\n item.isButton\n ? \"flex cursor-pointer flex-row items-center rounded-inner bg-buttonPrimary-500 px-4 py-2 text-white hover:bg-buttonPrimary-700 rtl:flex-row-reverse\"\n : item.disabled\n ? \"text-gray-300\"\n : \" flex cursor-pointer flex-row items-center rounded-inner hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white \",\n sizeStyles[size]\n )}\n >\n {item.icon && (\n <div\n className={\n size === \"small\" ? \"mr-1 rtl:ml-1\" : \"mr-2 rtl:ml-2\"\n }\n >\n {item.icon}\n </div>\n )}\n {item.label}\n </li>\n )\n })}\n </ul>\n )\n })}\n </div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\n\ntype CopyRightsTypes = {\n /** A text used as the version of the app, for example: v1.0.0 */\n version?: string\n /** Credit to the creator of the app, for example: Sikka Software */\n credits?: string\n /** The URL of the logo in the copyrights */\n logoURL?: string\n /** Enable/Disable the existance of the logo */\n withLogo?: boolean\n /** Fires when the logo is clicked, usually goes to the website of the creator of the app */\n onLogoClicked?: any\n}\n\nexport const HawaCopyrights: FC<CopyRightsTypes> = (props) => {\n return (\n <div className=\"my-2 flex flex-col items-center justify-center gap-1 text-xs text-gray-400\">\n {props.withLogo ? (\n <a href={props.onLogoClicked}>\n <div className=\"cursor-pointer\">\n <image href={props.logoURL} width={100} height={50} />\n </div>\n </a>\n ) : null}\n <div>{props.version}</div>\n {props.credits ? props.credits : null}\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype THawaTimeline = {\n steps: any[any]\n currentStep: any\n orientation: \"vertical\" | \"horizontal\"\n}\n\nexport const HawaStepper: FC<THawaTimeline> = ({\n orientation = \"horizontal\",\n ...props\n}) => {\n let orientationStyles = {\n vertical: \"flex flex-col items-start w-fit\",\n horizontal: \"flex flex-row\",\n }\n let lineStyles = {\n vertical: \"w-1 h-32 rounded bg-red-200 ml-6 my-2\",\n horizontal: \"h-0.5 flex w-full rounded bg-red-200\",\n }\n return (\n <div\n className={clsx(\n orientationStyles[orientation],\n \" flex-wrap justify-start gap-4\"\n )}\n >\n {props.steps.map((step: any, i: number) => {\n return (\n <div\n key={i}\n className=\"my-2 flex w-auto flex-row flex-wrap justify-start \"\n >\n <div\n className={\n orientation === \"vertical\"\n ? \"flex w-full flex-row items-center\"\n : i + 1 === props.steps.length\n ? \"flex w-full flex-row items-center justify-start gap-2\"\n : \"flex flex-row items-center justify-start gap-2 after:mx-2 after:hidden after:h-1 after:w-10 after:border-b after:border-gray-200 dark:after:border-gray-700 sm:after:inline-block sm:after:content-[''] md:w-full xl:after:mx-10\"\n }\n >\n <div className=\"flex flex-row gap-2 \">\n {/* Icon */}\n <div\n className={clsx(\n \"flex h-6 w-6 min-w-[24px] items-center justify-center rounded ring-2 ring-primary/20 ring-offset-2\",\n i + 1 <= props.currentStep\n ? \"bg-primary text-primary-foreground \"\n : \"bg-primary/20\"\n )}\n >\n {i + 1 <= props.currentStep ? (\n <svg\n aria-label=\"Check Mark\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"0.60em\"\n width=\"0.60em\"\n >\n <path d=\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\"></path>\n </svg>\n ) : (\n i + 1\n )}\n </div>\n {/* Text */}\n <div className=\"whitespace-nowrap\">{step}</div>\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n}\n\n// const TimelineStep = (props) => {\n// let defaultStyles = {\n// vertical: \"\",\n// horizontal: \"\",\n// }\n// return (\n// <div\n// className={\n// props.orientation === \"vertical\"\n// ? \"flex w-full flex-row items-center\"\n// : props.stepNumber === props.steps\n// ? \"flex items-center\"\n// : \"after:border-1 flex items-center after:mx-6 after:hidden after:h-1 after:w-10 after:border-b after:border-gray-200 dark:after:border-gray-700 sm:after:inline-block sm:after:content-[''] md:w-full xl:after:mx-10\"\n// }\n// >\n// <div\n// className={clsx(\n// \"ring-buttonPrimary-200 m-2 mr-4 flex h-6 w-6 items-center justify-center rounded ring-2 ring-offset-2\",\n// props.current\n// ? \"bg-buttonPrimary-500 text-white\"\n// : \"bg-buttonPrimary-200\"\n// )}\n// >\n// {props.current ? <FaCheck fontSize={11} /> : props.stepNumber}\n// </div>\n// <div className=\"whitespace-nowrap\">{props.stepName}</div>\n// </div>\n// )\n// }\n","import React, { FC } from \"react\"\nimport { Card, CardContent, CardHeader, CardTitle } from \"./Card\"\nimport { Skeleton } from \"./Skeleton\"\n\ntype StatTypes = {\n label?: string\n color?: string\n number?: string\n helperText?: string\n chart?: any\n icon?: any\n variant?:\n | \"default\"\n | \"plain\"\n | \"contained\"\n | \"outlined\"\n | \"brutalist\"\n | \"dropshadow\"\n width?: \"full\" | \"min\" | \"normal\"\n isLoading?: boolean\n handleClick?: () => void\n}\nexport const HawaStats: FC<StatTypes> = ({ variant = \"default\", ...props }) => {\n return (\n <Card onClick={props.handleClick} clickable={Boolean(props.handleClick)}>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">{props.label}</CardTitle>\n {props.icon && props.icon}\n </CardHeader>\n <CardContent>\n {props.isLoading ? (\n <Skeleton className=\"h-8 w-3/4\" />\n ) : (\n <div className=\"text-2xl font-bold\">{props.number}</div>\n )}\n {props.isLoading && props.helperText ? (\n <Skeleton className=\"mt-2 h-4 w-1/2\" />\n ) : (\n props.helperText && (\n <p className=\"text-xs text-muted-foreground\">{props.helperText}</p>\n )\n )}\n {props.isLoading && props.chart ? (\n <Skeleton className=\"mt-2 h-4 w-1/2\" />\n ) : (\n props.chart\n )}\n </CardContent>\n </Card>\n )\n}\n","import * as React from \"react\"\nimport { cn } from \"../util\"\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n clickable?: boolean\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, clickable = false, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border bg-card text-card-foreground shadow-sm\",\n clickable &&\n \"cursor-pointer transition-all hover:drop-shadow-md dark:hover:shadow-dark\",\n className\n )}\n {...props}\n />\n )\n)\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nCardDescription.displayName = \"CardDescription\"\n\ntype CardContentProps = {\n headless?: boolean\n} & React.HTMLAttributes<HTMLDivElement>\n\nconst CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(\n ({ headless, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"p-6\", headless ? \"pt-6\" : \"pt-0\", className)}\n {...props}\n />\n )\n)\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n))\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","import React, { FC, useState } from \"react\"\nimport { Button } from \"./Button\"\nimport { Tooltip } from \"./Tooltip\"\nimport { cn } from \"../util\"\nimport { useClipboard } from \"../hooks/useClipboard\"\n\ntype CodeBlockTypes = {\n color?: \"dark\" | \"light\"\n language?: string\n width?: \"full\" | \"md\" | \"sm\"\n tabs?: TabsTypes[]\n fileName?: string\n code?: string\n}\ntype TabsTypes = {\n title: string\n code: string\n}\n\nexport const HawaCodeBlock: FC<CodeBlockTypes> = ({\n tabs,\n code,\n fileName,\n width = \"full\",\n}) => {\n const clipboard = useClipboard()\n const [selectedTab, setSelectedTab] = useState(0)\n\n let widthStyles = {\n full: \"w-full\",\n md: \"w-full max-w-md\",\n sm: \"w-full max-w-sm\",\n xs: \"w-full max-w-xs\",\n }\n\n return (\n <div\n className={cn(\n widthStyles[width],\n \"w-full flex-col items-center rounded bg-gray-200 text-left text-sm text-white dark:bg-gray-800 sm:text-base\"\n )}\n >\n {tabs && (\n <div className=\"flex flex-row gap-2 rounded-t bg-gray-100 p-2 pb-0 text-black dark:bg-gray-700 dark:text-white\">\n {tabs.map((tab, i) => (\n <div\n className={cn(\n selectedTab === i\n ? \" border-b-2 border-primary\"\n : \"bg-transparent\"\n )}\n >\n <div\n onClick={() => setSelectedTab(i)}\n className={cn(\n \"mb-1 w-full max-w-[52px] cursor-pointer rounded-inner p-2 py-1 text-center text-[0.75rem] hover:bg-gray-300 dark:hover:bg-gray-500\"\n )}\n >\n {tab.title}\n </div>\n </div>\n ))}\n </div>\n )}\n {fileName && (\n <div className=\"flex flex-row gap-2 rounded-t bg-gray-100 p-2 pb-0 text-black dark:bg-gray-700 dark:text-white\">\n <div\n className={cn(\n \"mb-1 w-full max-w-[52px] rounded-inner p-2 py-1 text-center text-[0.75rem]\"\n )}\n >\n {fileName}\n </div>\n </div>\n )}\n <pre>\n <code\n className={cn(\n \"flex w-full flex-row items-start justify-between rounded bg-gray-200 p-0 text-left text-sm text-black dark:bg-gray-800 dark:text-white sm:text-base\"\n )}\n >\n <div className=\"flex min-h-[37.75px] w-full flex-col justify-center p-4 \">\n {tabs ? tabs[selectedTab].code : code}\n </div>\n <div className=\"flex w-fit flex-row items-center gap-2 p-2\">\n <Tooltip\n open={clipboard.copied}\n side=\"left\"\n content={<div>Copied!</div>}\n >\n <Button\n size=\"icon\"\n onClick={() =>\n clipboard.copy(tabs ? tabs[selectedTab].code : code)\n }\n >\n <svg\n aria-label=\"Copy Icon\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1em\"\n width=\"1em\"\n >\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect>\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path>\n </svg>\n </Button>\n </Tooltip>\n </div>\n </code>\n </pre>\n </div>\n )\n}\n","\"use client\"\n\nimport React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\nimport { cn } from \"../util\"\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nconst TooltipArrow = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>\n>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn(className)} {...props} />\n))\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName\n\ntype TooltipTypes = {\n open?: any\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n content?: any\n children?: any\n defaultOpen?: any\n onOpenChange?: any\n delayDuration?: any\n}\n\nconst Tooltip: React.FunctionComponent<TooltipTypes> = ({\n side,\n open,\n content,\n children,\n defaultOpen,\n onOpenChange,\n delayDuration = 300,\n ...props\n}) => {\n return (\n <TooltipPrimitive.TooltipProvider delayDuration={delayDuration}>\n <TooltipPrimitive.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n >\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipContent side={side} align=\"center\" {...props}>\n {content}\n </TooltipContent>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.TooltipProvider>\n )\n}\n\nexport { Tooltip }\n","import { useState } from \"react\"\n\nexport function useClipboard({ timeout = 2000 } = {}) {\n const [error, setError] = useState<Error>(null)\n const [copied, setCopied] = useState(false)\n const [copyTimeout, setCopyTimeout] = useState(null)\n\n const handleCopyResult = (value: boolean) => {\n clearTimeout(copyTimeout)\n setCopyTimeout(setTimeout(() => setCopied(false), timeout))\n setCopied(value)\n }\n\n const copy = (valueToCopy: any) => {\n if (\"clipboard\" in navigator) {\n navigator.clipboard\n .writeText(valueToCopy)\n .then(() => handleCopyResult(true))\n .catch((err) => setError(err))\n } else {\n setError(new Error(\"useClipboard: navigator.clipboard is not supported\"))\n }\n }\n\n const reset = () => {\n setCopied(false)\n setError(null)\n clearTimeout(copyTimeout)\n }\n\n return { copy, reset, error, copied }\n}\n","import React, { FC, useState } from \"react\"\n\ntype DatepickerTypes = {}\n\nexport const HawaDatepicker: FC<DatepickerTypes> = () => {\n const [selectedDate, setSelectedDate] = useState(\"\")\n\n const handleDateChange = (event) => {\n setSelectedDate(event.target.value)\n }\n return (\n <div className=\"relative inline-block text-left\">\n <span className=\"rounded-md shadow-sm\">\n <input\n type=\"date\"\n value={selectedDate}\n onChange={handleDateChange}\n className=\"block w-full rounded border border-gray-300 bg-white p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500\"\n />\n </span>\n </div>\n )\n}\n","import React, { useEffect, useState } from \"react\"\nimport { useDropzone } from \"react-dropzone\"\nimport { HawaAlert } from \"./HawaAlert\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\n\n//TODO: This element needs more improvements and testing\n\ntype DragDropImagesTypes = {\n /** The text label above the component. Consistant with the other form input fields */\n label?: string\n files: [File]\n setFiles: any\n setDeletedFiles: any\n maxFiles: number\n accept: string\n onAcceptedFiles: any\n showPreview: any\n onDeleteFile: any\n onClearFiles: any\n maxSize: number\n errorMessages: string\n disclaimer?: boolean\n termsLink?: string\n privacyLink?: string\n /** The translation object, use this to replace the default text with any translated text you want.*/\n texts: {\n errorUploading: any\n clickHereToUpload: any\n maxFileSize: any\n tooManyFiles: any\n fileTooLarge: any\n acceptedFileTypes: any\n invalidFileType: any\n terms?: string\n privacyPolicy?: string\n disclaimer?: string\n and?: string\n }\n}\n\nexport const DragDropImages: React.FunctionComponent<DragDropImagesTypes> = ({\n texts,\n files,\n setFiles,\n setDeletedFiles,\n onAcceptedFiles,\n errorMessages,\n maxFiles,\n accept,\n showPreview,\n onDeleteFile,\n onClearFiles,\n disclaimer,\n maxSize,\n label,\n termsLink,\n privacyLink,\n}) => {\n const [cmp, setCmp] = useState(0)\n const [max, setMax] = useState<any>(0)\n\n const {\n getRootProps,\n getInputProps,\n fileRejections,\n acceptedFiles,\n isDragActive,\n } = useDropzone({\n multiple: true,\n accept: accept,\n maxSize: maxSize,\n maxFiles: maxFiles,\n onDrop: (acceptedFiles) => {\n setFiles(\n acceptedFiles.map((file, index) =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n })\n )\n )\n },\n })\n useEffect(\n () => () => {\n files?.forEach((file: any) => {\n URL.revokeObjectURL(file.preview)\n })\n },\n [files]\n )\n useEffect(() => {\n setFiles(acceptedFiles)\n }, [acceptedFiles, cmp])\n onClearFiles = () => {\n acceptedFiles.length = 0\n acceptedFiles.splice(0, acceptedFiles.length)\n setFiles([])\n }\n\n const clearAllFiles = () => {\n acceptedFiles.length = 0\n setFiles([])\n }\n\n useEffect(() => {\n if (maxSize > 0) {\n const k = 1024\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\n const i = Math.floor(Math.log(maxSize) / Math.log(1024))\n\n setMax(\n parseFloat((maxSize / Math.pow(1024, i)).toFixed(2)) + \" \" + sizes[i]\n )\n }\n }, [maxSize])\n const errs = fileRejections.map((rej, i) => {\n switch (rej.errors[0].code) {\n case \"file-too-large\":\n return (\n <HawaAlert\n text={rej.file.name}\n title={texts.fileTooLarge}\n severity=\"error\"\n />\n )\n case \"too-many-files\":\n return (\n <HawaAlert\n text={rej.file.name}\n title={texts.tooManyFiles}\n severity=\"error\"\n />\n )\n case \"file-invalid-type\":\n return (\n <HawaAlert\n text={rej.file.name}\n title={texts.invalidFileType}\n severity=\"error\"\n />\n )\n\n default:\n return (\n <HawaAlert\n text={rej.file.name}\n title={rej.errors[0].code}\n severity=\"error\"\n />\n )\n }\n })\n const thumbs = files?.map((file: any, index: any) => (\n <div className=\"relative rounded\">\n <button\n onClick={(e) => {\n e.stopPropagation()\n acceptedFiles.splice(acceptedFiles.indexOf(file), 1)\n setCmp(Math.random)\n onDeleteFile(file)\n }}\n type=\"button\"\n className=\"absolute left-0 ml-auto inline-flex items-center rounded-inner rounded-bl-none rounded-tr-none bg-gray-900 p-1.5 text-sm text-gray-400 transition-all hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white\"\n data-modal-toggle=\"defaultModal\"\n >\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"sr-only\">Close modal</span>\n </button>\n\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n overflow: \"hidden\",\n height: 100,\n width: 100,\n backgroundImage: `url(${file.preview})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n border: \"1px solid black\",\n }}\n className=\"rounded-lg\"\n key={file.name}\n />\n </div>\n ))\n\n return (\n <div>\n {label && (\n <div className=\"mb-2 block text-sm font-medium text-gray-900 dark:text-gray-300\">\n {label}\n </div>\n )}\n <div\n className={clsx(\n \"flex flex-col justify-center rounded border border-dashed bg-gray-50 p-6 transition-all hover:bg-gray-100 dark:bg-gray-950 dark:hover:bg-gray-800 \",\n isDragActive ? \"bg-gray-200 dark:bg-gray-700\" : \"bg-background\"\n )}\n >\n <div {...getRootProps({})}>\n <p {...getInputProps()} />\n <div className=\"flex flex-col items-center justify-center gap-2 pt-4 text-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1.5em\"\n width=\"1.5em\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M19 11v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\"></path>\n <path d=\"M13 13l9 3l-4 2l-2 4l-3 -9\"></path>\n <path d=\"M3 3l0 .01\"></path>\n <path d=\"M7 3l0 .01\"></path>\n <path d=\"M11 3l0 .01\"></path>\n <path d=\"M15 3l0 .01\"></path>\n <path d=\"M3 7l0 .01\"></path>\n <path d=\"M3 11l0 .01\"></path>\n <path d=\"M3 15l0 .01\"></path>\n </svg>\n {<texts.clickHereToUpload />}\n </div>\n <div className=\"pt-2 text-center text-xs\">\n {texts.acceptedFileTypes} {accept.split(\",\")}\n </div>\n <div className=\"pb-2 pt-1 text-center text-xs\">\n {texts.maxFileSize} {max}\n </div>\n </div>\n {acceptedFiles.length > 0 && (\n <div className=\"flex justify-center rounded-lg p-2 \">\n <Button onClick={clearAllFiles}>Clear All</Button>\n </div>\n )}\n {acceptedFiles.length > 0 && thumbs && showPreview ? (\n <aside className=\"flex flex-row flex-wrap justify-center gap-2 rounded-lg p-2\">\n {thumbs}\n </aside>\n ) : null}\n <div className=\"px-4\">{fileRejections[0]?.errors[0]?.code && errs}</div>\n </div>\n {disclaimer && (\n <div className=\"mt-2 text-sm text-muted-foreground/50\">\n {texts.disclaimer ?? \"By uploading a file you agree to our\"}{\" \"}\n <a\n href={termsLink}\n className=\"clickable-link text-muted-foreground/50\"\n >\n {texts.terms ?? \"Terms\"}\n </a>{\" \"}\n {texts.and ?? \"and\"}{\" \"}\n <a\n href={privacyLink}\n className=\"clickable-link text-muted-foreground/50\"\n >\n {texts.privacyPolicy ?? \"Privacy Policy\"}\n </a>\n </div>\n )}\n </div>\n )\n}\n","import React, { ReactElement, FC } from \"react\"\n\ntype DraggableCardTypes = {\n children: ReactElement\n}\n\nexport const DraggableCard: FC<DraggableCardTypes> = (props) => {\n return (\n <div className=\"flex flex-row rounded bg-layoutPrimary-500 p-4\">\n <button\n className=\"inline-flex items-center rounded bg-white p-2 text-center text-sm font-medium text-gray-900 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-50 dark:bg-gray-800 dark:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-600\"\n type=\"button\"\n >\n <svg\n className=\"h-6 w-6\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path d=\"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z\"></path>\n </svg>\n </button>\n\n <div className=\"p-4\">{props.children}</div>\n </div>\n )\n}\n","import React, { FC, ReactNode } from \"react\"\n\ntype TBreadcrumb = {\n /** The array of crumbs, each one with a label and a href link */\n breadcrumbLinks: [{ label: string; href: string }]\n /** The separator between each crumb, can be character or React Node. The default is \">\" */\n separator?: string | ReactNode\n}\n\nconst HawaBreadcrumb: FC<TBreadcrumb> = ({\n breadcrumbLinks,\n separator = \">\",\n}) => {\n return (\n <div className=\"flex flex-row items-center gap-2 text-sm\">\n {breadcrumbLinks.map((singleBreadcrumbLink, index) => (\n <div className=\"flex flex-row items-center justify-center gap-2\">\n <a\n href={singleBreadcrumbLink.href}\n className={\n index + 1 === breadcrumbLinks.length\n ? \"pointer-events-none\"\n : \"underline-offset-4 transition-all hover:text-primary hover:underline hover:decoration-2\"\n }\n >\n {singleBreadcrumbLink.label}\n </a>\n {index != breadcrumbLinks.length - 1 ? (\n typeof separator == \"string\" ? (\n <div>{separator}</div>\n ) : (\n <div>{separator}</div>\n )\n ) : null}\n </div>\n ))}\n </div>\n )\n}\n\nexport default HawaBreadcrumb\n","import React, { useState, FC } from \"react\"\nimport clsx from \"clsx\"\nimport { HawaChip } from \"./HawaChip\"\n\ntype SubsectionListTypes = {\n align?: any\n subsections: [\n {\n title: string\n sections: [\n {\n label: string\n action: () => void\n icon?: any\n value?: any\n }\n ]\n }\n ]\n}\nexport const SubsectionList: FC<SubsectionListTypes> = ({ subsections }) => {\n const [selectedSection, setSelectedSection] = useState(null)\n return (\n <div className=\"w-full max-w-2xs rounded bg-layoutPrimary-500 p-4 \">\n {subsections.map((ss, i) => (\n <div key={i} className=\"my-0\">\n {ss.title && <div className=\"my-4 font-bold\">{ss.title}</div>}\n {ss.sections.map((s, i) => (\n <SubsectionItem\n key={i}\n onItemClick={() => setSelectedSection(s.value)}\n selected={selectedSection}\n value={s.value}\n icon={s.icon}\n title={s.label}\n chip=\"Upgrade\"\n />\n ))}\n </div>\n ))}\n </div>\n )\n}\n\ntype TSubsectionItem = {\n chip?: string\n title: string\n value: string\n icon?: any\n selected?: any\n onItemClick?: () => void\n}\nconst SubsectionItem: FC<TSubsectionItem> = ({\n title,\n value,\n icon,\n chip,\n selected,\n onItemClick,\n}) => {\n return (\n <div\n onClick={onItemClick}\n className={clsx(\n \"flex w-full cursor-pointer flex-row items-center justify-between gap-2 rounded p-2 transition-all \",\n selected === value\n ? \"bg-primary text-white hover:bg-primary\"\n : \"hover:bg-layoutPrimary-300\"\n )}\n >\n <div className=\"flex w-full flex-row items-center justify-start gap-2\">\n {icon} <span>{title}</span>\n </div>\n {chip && <HawaChip label=\"Upgrade\" size=\"normal\" />}{\" \"}\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport { Tooltip } from \"./Tooltip\"\n\ntype UsageCardTypes = {\n tooltip?: any\n title: any\n percent: any\n currentUsage: any\n}\nexport const UsageCard: FC<UsageCardTypes> = (props) => {\n return (\n <div className=\"flex w-full flex-col gap-0 border p-4\">\n <div className=\"flex flex-row items-center gap-2\">\n <span className=\"bg-white-200\">{props.title}</span>\n {props.tooltip && (\n <Tooltip content={props.tooltip} side=\"right\">\n <svg\n stroke=\"currentColor\"\n aria-label=\"Exclamation Circle\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z\"></path>\n </svg>\n </Tooltip>\n )}\n </div>\n <div className=\"bg-white-100 flex flex-row\">\n <div>{props.currentUsage}</div>\n <div> ({props.percent}%)</div>\n </div>\n <div className=\"mt-2 h-2.5 w-full rounded-full bg-gray-200 dark:bg-gray-700\">\n <div\n className=\"h-2.5 rounded-full bg-primary\"\n style={{\n width: `${props.percent ?? 0}%`,\n }}\n ></div>\n </div>\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport clsx from \"clsx\"\nimport { HawaChip } from \"./HawaChip\"\nimport { HawaMenu } from \"./HawaMenu\"\n\ntype InvoiceAccordionTypes = {\n products: {\n usage?: string\n price?: string\n amount?: string\n plan?: string\n }[]\n texts: {\n total: string\n plan: string\n usage: string\n amount: string\n price: string\n }\n invoiceTitle: string\n invoiceSubtitle: string\n invoiceDescription?: string\n invoiceActions?: {\n icon?: JSX.Element\n label: string\n action?: (e: any) => void\n isButton?: boolean\n element?: any\n }[][]\n total: any\n direction?: \"rtl\" | \"ltr\"\n status?: \"paid\" | \"pending\" | \"overdue\"\n}\nexport const InvoiceAccordion: FC<InvoiceAccordionTypes> = ({\n direction = \"ltr\",\n texts = {\n total: \"Total\",\n plan: \"Plan\",\n usage: \"Usage\",\n amount: \"Amount\",\n price: \"Price\",\n },\n ...props\n}) => {\n const InvoiceItemProp = (props) => (\n <div\n className={clsx(\n props.start ? \"items-start\" : \"items-end\",\n \"flex w-full flex-col\"\n )}\n >\n <div className=\" text-sm text-gray-500\">{props.label}</div>\n <div className=\" whitespace-nowrap\">{props.text}</div>\n </div>\n )\n const [expanded, setExpanded] = useState(false)\n return (\n <div className=\"flex w-full flex-col\">\n <div className=\"flex w-full flex-row items-center gap-2 border p-4 \">\n {props.invoiceActions && (\n <div\n className={clsx(\n \"transition-all hover:cursor-pointer \",\n direction === \"rtl\" ? \"rotate-180\" : \"\",\n expanded ? \"rotate-90\" : \"\"\n )}\n onClick={() => setExpanded(!expanded)}\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"2em\"\n width=\"2em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </div>\n )}\n <div\n className=\"flex w-full cursor-pointer flex-col gap-0\"\n onClick={() => setExpanded(!expanded)}\n >\n <div className=\"flex flex-row items-center gap-2\">\n <span className=\"bg-white-200\">{props.invoiceTitle}</span>\n {props.status && <HawaChip size=\"small\" label={props.status} />}\n </div>\n <div className=\"font-sm text-gray-400\">{props.invoiceSubtitle}</div>\n </div>\n <div className=\"flex flex-row items-center gap-2\">\n <div className=\"whitespace-nowrap\">{props.total}</div>\n <HawaMenu\n direction={direction}\n position={direction === \"rtl\" ? \"bottom-right\" : \"bottom-left\"}\n menuItems={props.invoiceActions}\n >\n <div className=\" p-2\">\n {/* <BsThreeDotsVertical /> */}\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z\"></path>\n </svg>\n </div>\n </HawaMenu>\n </div>\n </div>\n {expanded && (\n <div\n className={clsx(\n expanded ? \"h-full\" : \"h-0 border-none p-0 px-4\",\n \"flex h-auto flex-col gap-4 overflow-clip border border-t-0 bg-gray-50 p-4 transition-all\"\n )}\n >\n <div className=\"border-b pb-2\">{props.invoiceDescription}</div>\n {props.products?.map((product, i) => (\n <div key={i} className=\"flex flex-row border-b pb-4\">\n <div className=\"w-full\">\n <InvoiceItemProp start label={texts.plan} text={product.plan} />\n </div>\n <div className=\"flex w-full flex-row gap-20 \">\n <InvoiceItemProp\n label={texts.usage}\n text={`${product.usage} SAR`}\n />\n <InvoiceItemProp\n label={texts.price}\n text={`${product.price} SAR`}\n />\n <InvoiceItemProp\n label={texts.amount}\n text={`${product.amount} SAR`}\n />\n </div>\n </div>\n ))}\n <div className=\"flex flex-row justify-between\">\n <div>{texts.total}</div> <div>{props.total}</div>\n </div>\n </div>\n )}\n </div>\n )\n}\n","import React, { FC, useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\n\ntype ComponentTypes = {\n title?: string\n question: string\n options?: []\n texts?: {\n least: string\n most: string\n }\n position?: \"bottom-right\" | \"bottom-left\"\n onOptionClicked?: (option) => void\n}\nexport const UserFeedback: FC<ComponentTypes> = ({\n position = \"bottom-right\",\n ...props\n}) => {\n const [closed, setClosed] = useState(false)\n const [answered, setAnswered] = useState(false)\n const [clickedOption, setClickedOption] = useState(null)\n const [closingTimer, setClosingTimer] = useState(5)\n const popUpRef = useRef(null)\n\n const boxPosition = {\n \"bottom-right\": \"right-4\",\n \"bottom-left\": \"left-4\",\n }\n useEffect(() => {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n if (closingTimer >= 0) {\n setClosingTimer(closingTimer - 1)\n }\n }, 1000)\n\n return () => {\n clearTimeout(timeoutHide)\n }\n }, [closingTimer])\n\n const slowClose = () => {\n setClosed(true)\n setTimeout(() => {\n popUpRef.current.removeChild(popUpRef.current.children[0])\n }, 200)\n }\n return (\n <div\n ref={popUpRef}\n className={clsx(\"fixed bottom-4 \", boxPosition[position])}\n >\n <div\n className={clsx(\n \"relative flex w-full max-w-sm flex-col gap-2 rounded border bg-background p-4 shadow-md transition-all\",\n closed ? \"opacity-0\" : \"opacity-100\"\n )}\n >\n <div className=\"absolute left-2 top-2 p-1.5 text-sm\">{props.title}</div>\n <button\n type=\"button\"\n className=\"absolute right-2 top-2 inline-flex h-8 w-8 rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white\"\n data-dismiss-target=\"#toast-default\"\n aria-label=\"Close\"\n onClick={() => slowClose()}\n >\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n <div className=\"mt-8\">{props.question}</div>\n <div className=\"flex w-full flex-row gap-1 rounded\">\n {props.options.map((op) => (\n <span\n onClick={() => {\n props.onOptionClicked(op)\n setClickedOption(op)\n setAnswered(true)\n const timeoutDestroy = setTimeout(() => {\n setClosed(true)\n }, 4800)\n setTimeout(() => {\n popUpRef.current.removeChild(popUpRef.current.children[0])\n clearTimeout(timeoutDestroy)\n }, 5300)\n }}\n className={clsx(\n \"w-full cursor-pointer rounded border p-4 text-center transition-all \",\n clickedOption === op\n ? \"bg-gray-500 text-white\"\n : \"border bg-background hover:bg-gray-300 dark:hover:bg-gray-700\"\n )}\n >\n {op}\n </span>\n ))}\n </div>\n {props.texts && (\n <div className=\" flex flex-row justify-between text-xs\">\n <span>{props.texts.least}</span>\n <span>{props.texts.most}</span>\n </div>\n )}\n {answered && (\n <div className=\"absolute left-0 top-0 gap-2 flex h-full w-full flex-col items-center justify-center rounded bg-black bg-opacity-80 p-4 text-center transition-all\">\n <span className=\"font-bold text-white\">\n Thank you for your answer. This box will disappear in\n {\" \" + closingTimer} seconds\n </span>\n <div className=\"flex flex-row gap-2\">\n <Button onClick={() => slowClose()}>Close</Button>\n </div>\n </div>\n )}\n </div>\n </div>\n )\n}\n","import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype Item = {\n label?: string\n icon?: JSX.Element\n}\n\ntype ComponentTypes = {\n items: Item[]\n index?: number\n arrowSize?: number\n labelSize?: \"small\" | \"medium\" | \"big\"\n}\n\nconst Arrow = (props: {\n icon?: any\n size?: number\n onClick?: () => void\n disabled?: boolean\n direction?: \"right\" | \"left\"\n}) => {\n return (\n <svg\n onClick={props.onClick || (() => {})}\n className={clsx(\n \"h-6 w-6 shrink-0 transition-all disabled:bg-gray-200\",\n props.direction === \"right\" ? \"-rotate-90\" : \"rotate-90\",\n props.disabled ? \"text-gray-300\" : \"cursor-pointer hover:scale-150\"\n )}\n fill={props.disabled && \"grey\"}\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )\n}\n\nexport const ArrowCarousel: FC<ComponentTypes> = (props) => {\n const [index, setIndex] = useState(props.index || 0)\n\n useEffect(() => {\n console.log(`INDEX CHANGED TO: ${index}`)\n }, [index])\n\n const sizes = {\n small: [\"\", -8],\n medium: [\"2\", -11],\n big: [\"3\", -16],\n }\n\n return (\n <div className=\"align-center box-boorder relative flex h-min w-min flex-row items-center justify-center rounded bg-layoutPrimary-500 p-4 py-0 pb-2 pt-2 shadow-md\">\n <Arrow\n direction=\"left\"\n // size={props.arrowSize || 48}\n disabled={index == 0}\n onClick={() => {\n if (index != 0) setIndex(index - 1)\n }}\n />\n\n <div\n className={`relative m-5 my-0 box-border flex h-full flex-col items-center justify-center py-6 pt-0 `}\n >\n <div>{props.items[index].icon}</div>\n <div\n className={\"absolute bottom-1 mb-0 mt-2 select-none\"}\n // {`absolute bottom-0 text-${\n // sizes[props.labelSize || \"small\"][0]\n // }xl `}\n // style={{\n // marginBottom: sizes[props.labelSize || \"small\"][1],\n // }}\n >\n {props.items[index].label}\n </div>\n </div>\n\n <Arrow\n direction=\"right\"\n // size={props.arrowSize || 48}\n disabled={index == props.items.length - 1}\n onClick={() => {\n if (index != props.items.length - 1) setIndex(index + 1)\n }}\n />\n </div>\n )\n}\n","import React, { useRef, useState, useEffect } from \"react\"\nimport clsx from \"clsx\"\n\nconst Property = (props) => {\n return (\n <div\n className=\"border-box mr-[10px] flex h-[32px] w-[32px] items-center justify-center rounded bg-gray-300 p-2\"\n onMouseDown={props.onMouseDown}\n >\n {props.name}\n </div>\n )\n}\n\ntype ComponentTypes = {\n rtl?: \"enabled\" | \"disabled\" | \"auto\"\n onSubmit?: (\n content: string,\n stylings: { type: keyof typeof stylers; start: number; finish: number }[]\n ) => void\n}\n\nconst stylers = {\n bold: { css: \"font-bold\", content: \"B\" },\n italic: { id: \"italic\", css: \"italic\", content: \"I\" },\n under: { id: \"under\", css: \"underline\", content: \"U\" },\n strike: { id: \"strike\", css: \"line-through\", content: \"S\" },\n}\n\n// FIXME: ? Highlighting a part of styled text with a bit on the left with an overall length not equal to clipboard copied text will result in paste issues\n\n// FIXME: Highlighting the beginning characters of styled text and then pasting text sometimes doesn't register as right intersecting\n// This expecially happens when the selection is for example, [0, 2] and the styling is [0, 3], this might be failure of addition which doesn't offset the styling\n\n// TODO: Refactor styling splicing into one method\n// TODO: Refactor function that simplifies a list of stylings\n// TODO: Turn stylings into a class, this should also change .finish to .end\n\n// Possible logic changes:\n// Paste = Removal + Addition -> Styling Removal + Styling Addition\n// Drag & Drop = Removal + Addition -> Styling Removal + Styling Addition\n\n// FIXME:\n// - Creating a new line, and typing data in it, and then setting two different stylings on the same text\n// FIXME:\n// - Type characters, create new line, remove the new line immediately\n\n// FIXME: Line at first index of content editable\n\n// FIXME: Typing behind a line break identifier\n// One way to prevent it, is to check in the onChange event if the data added (removed might not be needed here), is behind a line break identifier\n// if so, move the start and end index by the length of the added, and replace the added, and then add the added back in the offset index\n\n// FIXME:\n// Deleting all text in a line removes that line entirely\n\nconst lineBreakIdentifier = \"\"\n\nexport const FloatingComment: React.FunctionComponent<ComponentTypes> = (\n props\n) => {\n const [text, _setText] = useState({\n content: \"\",\n stylings: [], // A styling is an object with 2 indices specifying a substring of text, and the applied effect\n revert: [0, 0],\n clipboard: [],\n events: {\n paste: { is: false, length: null },\n drop: { is: false, text: null, drag: null },\n },\n })\n\n const field = useRef(null)\n const _text = useRef(text)\n const setText = (data) => {\n _text.current = data\n _setText(data)\n }\n\n const getChildIndex = (child) => {\n for (var i = 0; (child = child.previousSibling); i++);\n return i\n }\n\n const getRelativePrecedingSum = (element, endIndex) => {\n let nodes: any = Array.from(element.childNodes)\n let sum = nodes\n .slice(0, endIndex)\n .map((node) => node.textContent.length)\n .reduce((a, b) => a + b, 0)\n return sum\n }\n\n const getLinePrecedingSum = (endIndex) => {\n let fieldNodes = Array.from(field.current.childNodes)\n let sum = fieldNodes\n .slice(0, endIndex)\n .map((lineNode: any) => {\n let lineNodes = Array.from(lineNode.childNodes)\n return getRelativePrecedingSum(lineNode, lineNodes.length)\n })\n .reduce((a, b) => a + b, 0)\n\n return sum\n }\n\n const getSelectionPrecedingSum = (name) => {\n let selection = window.getSelection()\n let nodes = Array.from(field.current.childNodes)\n\n // All current occurences for text or br:\n // Pasting on empty text (text)\n // Cutting/removing all text (br)\n // Typing the first character in empty text (text)\n // Dragging text to the end of the text (text)\n\n nodes = nodes.filter(\n (item: any) => ![\"#text\", \"BR\"].includes(item.nodeName)\n )\n\n let node = selection[name]\n let parent: any = node.parentNode\n let sum = 0\n // let special = 0\n\n const isNodeLine =\n node.nodeName == \"DIV\" && Array.from(node.classList).includes(\"line\")\n\n // If the parent node is a span, this must be a text node\n if (parent.nodeName == \"SPAN\") {\n // Get index of span within line\n let spanIndex = getChildIndex(parent)\n\n // Get relative sum within line\n sum += getRelativePrecedingSum(parent.parentNode, spanIndex)\n\n // Get parent line index\n let lineIndex = getChildIndex(parent.parentNode)\n\n // Get relative sum within entire field\n sum += getLinePrecedingSum(lineIndex)\n }\n\n // If the parent node is a line element, this must be a new line, so return the preceding sum\n if (Array.from(parent.classList).includes(\"line\")) {\n // If the node is a text node, then that must mean this is a non-styled drop\n if (node.nodeName == \"#text\") {\n let spanIndex = getChildIndex(node)\n\n sum += getRelativePrecedingSum(parent, spanIndex)\n }\n\n // Get line element index\n let lineIndex = getChildIndex(parent)\n\n // Get relative sum within entire field\n sum += getLinePrecedingSum(lineIndex)\n }\n\n if (isNodeLine) {\n // Get line element index\n let lineIndex = getChildIndex(node)\n\n // Get relative sum within entire field\n sum = getLinePrecedingSum(lineIndex)\n }\n\n // If the parent is the field, return zero\n // FIXME: Should we return zero here?\n if (parent == field.current && !isNodeLine) {\n return 0\n }\n\n // // Special case for dropping text near or inside styled text\n // if (!Array.from(parent.parentNode.classList).includes(\"selection-ignore\")) {\n // parent = parent.parentNode\n\n // let index = getChildIndex(selection[name].parentNode)\n // special = Array.from(parent.childNodes)\n // .slice(0, index)\n // .map((e: any) => e.textContent.length)\n // .reduce((a, b) => a + b, 0)\n // }\n\n // let index = parent == field.current ? nodes.length : getChildIndex(parent)\n\n // let sum =\n // nodes\n // .slice(0, index)\n // .map((span: any) => span.textContent.length)\n // .reduce((a, b) => a + b, 0) + special\n\n return sum\n }\n\n const getFieldSelection = () => {\n if (document.activeElement != field.current) return [0, 0]\n let selection = window.getSelection()\n\n let startPrecedingSum = getSelectionPrecedingSum(\"anchorNode\")\n let endPrecedingSum = getSelectionPrecedingSum(\"focusNode\")\n\n let result = [\n startPrecedingSum + selection.anchorOffset,\n endPrecedingSum + selection.focusOffset,\n ]\n\n // Sort to make the minimum selection the start selection\n return result.sort((a, b) => a - b)\n }\n\n useEffect(() => {\n setTimeout(function () {\n let [start, end] = _text.current.revert\n\n if (start == 0 && end == 0) return\n\n let startNode = null\n let endNode = null\n\n let total = 0\n // let nodes = Array.from(field.current.childNodes)\n let nodes = Array.from(field.current.getElementsByTagName(\"span\"))\n\n for (let i = 0; i < nodes.length; i++) {\n let node: any = nodes[i]\n let sum = node.textContent.length + total\n\n if (startNode == null && start >= total && start <= sum) {\n startNode = nodes[i]\n start -= total\n }\n\n if (endNode == null && end > total && end <= sum) {\n endNode = nodes[i]\n end -= total\n }\n\n total += node.textContent.length\n }\n\n var range = document.createRange()\n var sel = window.getSelection()\n\n range.setStart(startNode.firstChild, start)\n range.setEnd(endNode.firstChild, end)\n\n sel.removeAllRanges()\n sel.addRange(range)\n }, 1)\n }, [text.revert])\n\n // utility functions\n const getRange = (start, end) => {\n let result = []\n for (let i = start; i <= end; i++) {\n result.push(i)\n }\n return result\n }\n\n const intersection = (setA, setB) => {\n const _intersection = new Set()\n for (const elem of setB) {\n if (setA.has(elem)) {\n _intersection.add(elem)\n }\n }\n return _intersection\n }\n\n const getMinimum = (array) => {\n return array.sort((a, b) => a - b)[0]\n }\n\n const getMaximum = (array) => {\n return array.sort((a, b) => b - a)[0]\n }\n\n // -1 - types dont match\n // 0 - s1 is surrounded or on the edge of the s2\n // 1 - s1 intersects with s2\n // 2 - s1 does not intersect with s2\n const getCorrelation = (styling1, styling2) => {\n if (styling1.type != styling2.type) return -1\n\n if (\n styling2.start <= styling1.start &&\n styling2.finish >= styling1.finish\n ) {\n return 0\n }\n\n let indices1 = new Set(getRange(styling1.start - 1, styling1.finish - 1))\n let indices2 = new Set(getRange(styling2.start - 1, styling2.finish - 1))\n\n let result = intersection(indices1, indices2)\n\n return result.size == 0 ? 2 : 1\n }\n\n // Correlation handler\n const stylingSplice = (correlations, stylings, current, type) => {\n // Only one surround correlation is possible at one time, so use .find to fetch it\n\n let [_, index, styling] = correlations.find(([c, _, __]) => c == 0)\n\n // Remove correlated styling\n stylings = stylings.filter((_, _index) => _index != index)\n\n // Get splices\n let added = [\n {\n type: type,\n start: getMinimum([styling.start, current.start]),\n finish: getMaximum([styling.start, current.start]),\n },\n {\n type: type,\n start: getMinimum([styling.finish, current.finish]),\n finish: getMaximum([styling.finish, current.finish]),\n },\n ]\n\n // Remove empty splices (edge cases)\n added = added.filter((item) => item.start != item.finish)\n\n // Add to current stylings\n stylings = [...stylings, ...added]\n\n return stylings\n }\n\n // Correlation handler\n const stylingIntersect = (correlations, stylings, current, type) => {\n // Filter out all intersected stylings\n let intersections = correlations\n .filter(([c, _, __]) => c == 1)\n .map(([_, index, styling]) => {\n return [index, styling]\n })\n\n // Add current styling with no index for the sake for endpoint indices\n intersections.push([-1, current])\n\n // Get minimum intersection start index\n let start = intersections\n .map(([_, styling]) => styling.start)\n .sort((a, b) => a - b)[0]\n\n // Get maximum intersection start index\n let finish = intersections\n .map(([_, styling]) => styling.finish)\n .sort((a, b) => b - a)[0]\n\n // Get indices of all intersection\n let indices = intersections.map((e) => e[0])\n\n // Remove all from resulting styling array\n stylings = stylings.filter((_, index) => !indices.includes(index))\n\n // Add widest styling which encompasses all intersections\n stylings.push({\n type: type,\n start: start,\n finish: finish,\n })\n\n return stylings\n }\n\n const perform = (id) => {\n let stylings = _text.current.stylings.slice()\n let [selectionStart, selectionEnd] = getFieldSelection()\n\n if (selectionStart == selectionEnd) return\n\n let current = {\n type: id,\n start: selectionStart,\n finish: selectionEnd,\n }\n\n let correlations = []\n\n // Check the correlation between this requested styling and all other stylings\n for (let i = 0; i < stylings.length; i++) {\n let styling = stylings[i]\n let correlation = getCorrelation(current, styling)\n\n if (correlation != -1) correlations.push([correlation, i, styling])\n }\n\n let result\n\n if (correlations.find(([c, _, __]) => c == 1)) {\n result = stylingIntersect(correlations, stylings, current, id)\n } else if (correlations.find(([c, _, __]) => c == 0)) {\n result = stylingSplice(correlations, stylings, current, id)\n } else if (\n correlations.find(([c, _, __]) => c == 2) ||\n correlations.length == 0\n ) {\n result = [...stylings, current]\n }\n\n setText({\n ...text,\n stylings: result,\n revert: [selectionStart, selectionEnd],\n })\n }\n\n // Get stylings encompassing an index within it's range\n const getIntersectStylings = (\n stylings,\n index,\n startOffset = 0,\n finishOffset = 0\n ) => {\n // Find all stylings with encompassing range\n let matches = stylings.filter(\n ({ start, finish }) =>\n index >= start + startOffset && index < finish + finishOffset\n )\n\n return matches\n }\n\n const getStylingsInRange = (stylings, startIndex, endIndex) => {\n // Get all intersecting stylings within range\n let result = stylings.filter(\n ({ start, finish }) =>\n (finish > startIndex && start < endIndex) ||\n (start < endIndex && finish > startIndex)\n )\n\n // Clamp start and end values, and offset by start index to reach the relative minimum\n result = result.map((styling) => {\n return {\n ...styling,\n start: getMaximum([styling.start, startIndex]) - startIndex,\n finish: getMinimum([styling.finish, endIndex]) - startIndex,\n }\n })\n\n return result\n }\n\n const splitStyling = (styling, index, offset = 0) => {\n // Get first split\n let first = {\n ...styling,\n start: styling.start,\n finish: index,\n }\n\n // Get second split\n let second = {\n ...styling,\n start: index + offset,\n finish: styling.finish + offset,\n }\n\n return [first, second]\n }\n\n const additionTo = (stylings, startIndex, length, defaultBehavior = true) => {\n // console.log(`Adding text of length ${length} at index ${startIndex}`)\n\n // Required operations:\n // Offset succeeding stylings\n // Split intersecting stylings\n // Styling continuation at end (only for normal addition)\n\n stylings = stylings.map((styling) => {\n // A succeeding styling\n if (styling.start >= startIndex && styling.finish > startIndex) {\n console.log(\"succeeding\")\n return {\n ...styling,\n start: styling.start + length,\n finish: styling.finish + length,\n }\n }\n\n // An intersecting styling\n if (styling.start < startIndex && styling.finish > startIndex) {\n // Normal addition (non-drop & non-paste), adds to the length of the styling\n if (defaultBehavior) {\n return {\n ...styling,\n finish: styling.finish + length,\n }\n } else {\n // Special addition (drop & paste), splits the styling and offsets the second half by length of addition\n return splitStyling(styling, startIndex, length)\n }\n }\n\n // A connected styling at the end\n if (styling.finish == startIndex) {\n // Normal addition (non-drop & non-paste), continues the styling by addition length\n if (defaultBehavior) {\n return {\n ...styling,\n finish: styling.finish + length,\n }\n }\n }\n\n return styling\n })\n\n return stylings.flat()\n }\n\n const deletionOf = (stylings, startIndex, endIndex) => {\n // console.log(`Removing text from ${startIndex} to ${endIndex}`)\n\n let length = Math.abs(endIndex - startIndex)\n\n // Required operations:\n // Offset succeeding stylings\n // Remove stylings completely within range\n // Shrink stylings surrounding range\n // Clamp left resumptions and offset\n // Clamp right resumptions\n\n stylings = stylings.map((styling) => {\n // A succeeding styling, but not a right resumption\n if (\n styling.start >= startIndex &&\n styling.start >= endIndex &&\n styling.finish >= startIndex &&\n styling.finish >= endIndex\n ) {\n return {\n ...styling,\n start: styling.start - length,\n finish: styling.finish - length,\n }\n }\n\n // A styling completely within deletion range\n if (styling.start >= startIndex && styling.finish <= endIndex) {\n return null\n }\n\n // A styling surrounding deletion range\n if (styling.start <= startIndex && styling.finish >= endIndex) {\n return {\n ...styling,\n finish: styling.finish - length,\n }\n }\n\n // A styling not fully within deletion range, while the range exceeds to the left\n if (styling.start > startIndex && styling.start < endIndex) {\n return {\n ...styling,\n start: getMaximum([styling.start, endIndex]) - length,\n finish: styling.finish - length,\n }\n }\n\n // A styling not full within deletion range, while the range exceeds to the right\n if (styling.finish > startIndex && styling.finish < endIndex) {\n return {\n ...styling,\n finish: getMinimum([styling.finish, startIndex]),\n }\n }\n\n return styling\n })\n\n return stylings.flat().filter((styling) => styling)\n }\n\n const processNormal = (\n stylings,\n difference,\n selectionStart,\n selectionEnd\n ) => {\n if (difference == 0) return stylings\n\n if (difference > 0) {\n stylings = additionTo(stylings, selectionStart - difference, difference)\n } else {\n stylings = deletionOf(\n stylings,\n selectionStart,\n selectionEnd + Math.abs(difference)\n )\n }\n\n return stylings\n }\n\n const processPaste = (stylings, difference, selectionStart, selectionEnd) => {\n let pasteLength = _text.current.events.paste.length\n\n // console.log(\n // `Pasting for length ${pasteLength} at [${selectionStart}, ${selectionEnd}]`\n // )\n // console.log(\n // `Accompanied stylings: ${JSON.stringify(\n // _text.current.clipboard,\n // null,\n // 2\n // )}`\n // )\n\n // Get addition start index\n let additionStart = selectionStart - pasteLength\n\n // Get removal range\n let removalStart = additionStart\n let removalEnd = additionStart + pasteLength - difference\n\n // Compute deletion\n stylings = deletionOf(stylings, removalStart, removalEnd)\n\n // Compute addition\n stylings = additionTo(stylings, additionStart, pasteLength, false)\n\n // Add rich copied stylings offset by paste start index\n stylings = stylings.concat(\n _text.current.clipboard.map((styling) => {\n return {\n ...styling,\n start: styling.start + additionStart,\n finish: styling.finish + additionStart,\n }\n })\n )\n\n // console.log(`End result: ${JSON.stringify(stylings, null, 2)}`)\n\n return stylings\n }\n\n const processDrop = (stylings, difference, dropStart, dropEnd) => {\n console.log(`Dropped at: ${[dropStart, dropEnd]}`)\n\n let dropLength = _text.current.events.drop.text.length\n\n let [dragStart, dragEnd] = _text.current.events.drop.drag\n\n let dropDifference = dropStart - dragStart\n\n // Get stylings at drag range\n let dragStylings = getStylingsInRange(stylings, dragStart, dragEnd)\n\n // Removal range\n let removalStart = dragStart\n let removalEnd = dragEnd\n\n // If the drag precedes the drop (positive difference)\n if (dropDifference > 0) {\n // Addition start index\n let additionStart = dropEnd\n\n // Compute addition first\n stylings = additionTo(stylings, additionStart, dropLength, false)\n\n // Compute removal second\n stylings = deletionOf(stylings, removalStart, removalEnd)\n }\n\n // If the drop precedes the drag (negative difference)\n if (dropDifference < 0) {\n // Addition start index\n let additionStart = dropStart\n\n // Compute removal first\n stylings = deletionOf(stylings, removalStart, removalEnd)\n\n // Compute addition second\n stylings = additionTo(stylings, additionStart, dropLength, false)\n }\n\n // Add rich dragged stylings offset\n stylings = stylings.concat(\n dragStylings.map((styling) => {\n return {\n ...styling,\n start: styling.start + dropStart,\n finish: styling.finish + dropStart,\n }\n })\n )\n\n return stylings\n }\n\n const onChange = (value, selectionStart, selectionEnd) => {\n // Since drop events cause onChange to invoke twice, ignore the first incomplete event\n if (\n _text.current.events.drop.is &&\n value.length != _text.current.content.length\n )\n return\n\n console.log(`Changed at: ${[selectionStart, selectionEnd]}`)\n\n setTimeout(function () {\n // let [selectionStart, selectionEnd] = getFieldSelection()\n let difference = value.length - _text.current.content.length\n let stylings = _text.current.stylings\n\n // Paste event\n if (_text.current.events.paste.is) {\n stylings = processPaste(\n stylings,\n difference,\n selectionStart,\n selectionEnd\n )\n } else if (_text.current.events.drop.is) {\n stylings = processDrop(\n stylings,\n difference,\n selectionStart,\n selectionEnd\n )\n } else {\n stylings = processNormal(\n stylings,\n difference,\n selectionStart,\n selectionEnd\n )\n }\n\n setText({\n ..._text.current,\n content: value,\n stylings: stylings,\n revert: [selectionStart, selectionEnd],\n events: {\n paste: { is: false, length: null },\n drop: { is: false, text: null, drag: null },\n },\n })\n }, 0)\n }\n\n const getContent = () => {\n // console.clear()\n let content = _text.current.content\n let stylings = [..._text.current.stylings]\n\n let result = []\n\n // Get line indices\n let lineIndices = content\n .split(\"\")\n .map((character, index) => {\n if (character == lineBreakIdentifier) return index\n return null\n })\n .filter((item) => item)\n\n // Add end point\n lineIndices.unshift(0)\n lineIndices.push(content.length)\n\n // Ignore last element\n for (let i = 0; i < lineIndices.length - 1; i++) {\n let lineStart = lineIndices[i]\n let lineEnd = lineIndices[i + 1]\n\n let lineContent = content.slice(lineStart, lineEnd)\n\n // console.log(\n // `Line: ${lineStart} -> ${lineEnd}, with content: ${lineContent}`\n // )\n\n // Get all stylings within line\n let lineStylings = getStylingsInRange(stylings, lineStart, lineEnd)\n\n // Collect all spans relative to stylings within line\n let spans = []\n\n // Acquire all flattened unique indices\n let indices = lineStylings\n .map(({ start, finish }) => [start, finish])\n .flat()\n .sort((a, b) => a - b)\n\n indices = indices.filter(\n (element, index) => indices.indexOf(element) == index\n )\n\n // Add first index if not present\n if (indices[0] != 0) indices.unshift(0)\n\n // Add last index if not present\n let last = lineContent.length\n if (indices[indices.length - 1] != last) indices.push(last)\n\n // Iterate through all indices except the last\n for (let i = 0; i < indices.length - 1; i++) {\n let startIndex = indices[i]\n let endIndex = indices[i + 1]\n\n spans.push({\n content: lineContent.substring(startIndex, endIndex),\n types: getIntersectStylings(lineStylings, startIndex).map(\n (styling) => styling.type\n ),\n })\n }\n\n result.push(spans)\n }\n\n // // Get all styling indices\n // let indices = _text.current.stylings\n // .map(({ start, finish }) => [start, finish])\n // .flat()\n\n // // Sort ascendingly\n // indices = indices.sort((a, b) => a - b)\n\n // // Remove duplicates\n // indices = indices.filter(\n // (element, index) => indices.indexOf(element) == index\n // )\n\n // // Add first index if not present\n // if (indices[0] != 0) indices.unshift(0)\n\n // // Add last index if not present\n // let last = content.length\n // if (indices[indices.length - 1] != last) indices.push(last)\n\n // // let result = []\n\n // for (let i = 0; i < indices.length - 1; i++) {\n // result.push([indices[i], content.substring(indices[i], indices[i + 1])])\n // }\n\n return result\n }\n\n // dangerouslySetInnerHTML incorrectly renders when the entire text is highlighted, copied, and then pasted in succession\n useEffect(() => {\n let html = getContent()\n .map((line, index) => {\n return `<div class=\"line\" data-line-index=\"${index}\">${line\n .map((span, _index) => {\n return `<span class=\"${span.types\n .map((type) => stylers[type].css)\n .join(\" \")}\" data-child-index=\"${_index}\">${span.content}</span>`\n })\n .join(\"\")}</div>`\n })\n .join(\"\")\n\n // let html = getContent()\n // .map((_data, index) => {\n // let [start, data] = _data\n\n // // Get stylings encompassing an index within it's range\n // let stylings = getIntersectStylings(_text.current.stylings, start)\n // return `<span class=\"${stylings\n // .map((styling) => stylers[styling.type].css)\n // .join(\" \")}\" data-child-index=\"${index}\">${data}</span>`\n // })\n // .join(\"\")\n\n field.current.innerHTML = html\n }, [text.content, text.stylings, text.revert])\n\n const getTextDirection = () => {\n let value = props.rtl || \"disabled\"\n\n switch (value) {\n case \"enabled\":\n return \"rtl\"\n case \"disabled\":\n return \"ltr\"\n case \"auto\":\n return \"ltr\"\n }\n }\n\n return (\n <div className=\"align-center box-border flex h-min w-[400px] flex-col items-center justify-center rounded shadow-md\">\n <div className={clsx(\"flex w-full flex-row justify-start p-2\")}>\n {Object.entries(stylers).map(([id, data]) => {\n return (\n <Property\n name={data.content}\n key={`property-${id}`}\n onMouseDown={(event) => {\n event.preventDefault()\n perform(id)\n }}\n />\n )\n })}\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n {/* <div className=\"selection-ignore rtl h-[150px] w-full resize-none overflow-auto overflow-x-hidden border-none font-['Arial'] text-[16px] outline-none\">\n <div className=\"line\" data-line-index=\"0\">\n <span className=\"\" data-child-index=\"0\">\n asd\n </span>\n </div>\n <div className=\"line\" data-line-index=\"1\">\n <br />\n </div>\n </div>\n */}\n <div className=\"selection-ignore box-border w-full p-2\">\n <div\n ref={field}\n contentEditable=\"true\"\n className=\"selection-ignore rtl h-[150px] w-full resize-none overflow-auto overflow-x-hidden border-none font-['Arial'] text-[16px] outline-none\"\n style={{\n direction: getTextDirection(),\n }}\n onPaste={(event) => {\n // pastes all copied text from the content editable as plain text\n event.preventDefault()\n let data = event.clipboardData.getData(\"text/plain\")\n data = data.replaceAll(\"\\n\", \"\")\n data = data.replaceAll(\"\\r\", \"\")\n\n document.execCommand(\"insertHTML\", false, data)\n\n // selection.anchorOffset <= 1 &&\n // selection.focusOffset <= 1\n // ) {\n // let lineIndex = getChildIndex(anchorNode.parentNode.parentNode)\n\n // let _content = content\n // if (content.startsWith(lineBreakIdentifier)) {\n // _content = _content.slice(1)\n // }\n\n // let originalLine: any =\n // _content.split(lineBreakIdentifier)[lineIndex]\n\n // console.log(_content.split(lineBreakIdentifier))\n\n // originalLine = originalLine.split(\"\")\n // originalLine.splice(0, 0, eventData)\n // originalLine = originalLine.join(\"\")\n\n // let lines = _content.split(lineBreakIdentifier)\n\n // lines[lineIndex] = originalLine\n\n // textContent = lines.join(lineBreakIdentifier)\n\n // if (content.startsWith(lineBreakIdentifier)) {\n // textContent = lineBreakIdentifier + textContent\n // }\n\n // start += 1\n // end += 1\n // }\n\n setText({\n ..._text.current,\n events: {\n ..._text.current.events,\n paste: { is: true, length: data.length },\n },\n })\n }}\n onInput={(event: any) => {\n // console.log(event)\n // console.log(event.target.textContent)\n // console.log(event.target.textContent.split(\"\"))\n\n let [start, end] = getFieldSelection()\n let textContent = event.target.textContent\n let content = _text.current.content\n // Try creating twice the lines if the index is at 0,0\n // if (!textContent.startsWith(lineBreakIdentifier)) {\n // textContent = lineBreakIdentifier + textContent\n // }\n\n let eventType = event.nativeEvent.inputType\n\n if (eventType == \"insertParagraph\") {\n console.log(`Inserted new line at [${start}, ${end}]`)\n\n let split = textContent.split(\"\")\n\n split.splice(start, 0, lineBreakIdentifier)\n if (start == 0 && !content.startsWith(lineBreakIdentifier)) {\n split.splice(start, 0, lineBreakIdentifier)\n start += 1\n end += 1\n }\n\n textContent = split.join(\"\")\n\n // Increase selection by one to accomodate for the new line\n start += 1\n end += 1\n } else {\n let selection = window.getSelection()\n let { anchorNode, focusNode } = selection\n\n let eventData = event.nativeEvent.data\n\n // Handle typing behind lines\n if (\n anchorNode.parentNode == focusNode.parentNode &&\n anchorNode.parentNode.nodeName == \"SPAN\" &&\n selection.anchorOffset <= 1 &&\n selection.focusOffset <= 1 &&\n eventType == \"insertText\"\n ) {\n let lineIndex = getChildIndex(anchorNode.parentNode.parentNode)\n\n let _content = content\n if (content.startsWith(lineBreakIdentifier)) {\n _content = _content.slice(1)\n }\n\n let originalLine: any =\n _content.split(lineBreakIdentifier)[lineIndex]\n\n console.log(_content.split(lineBreakIdentifier))\n\n originalLine = originalLine.split(\"\")\n originalLine.splice(0, 0, eventData)\n originalLine = originalLine.join(\"\")\n\n let lines = _content.split(lineBreakIdentifier)\n\n lines[lineIndex] = originalLine\n\n textContent = lines.join(lineBreakIdentifier)\n\n if (content.startsWith(lineBreakIdentifier)) {\n textContent = lineBreakIdentifier + textContent\n }\n\n start += 1\n end += 1\n }\n }\n\n // if (\n // eventData != null &&\n // start - eventData.length == 0 &&\n // end - eventData.length == 0 &&\n // content.startsWith(lineBreakIdentifier)\n // ) {\n // console.log(\"STOP\")\n // }\n\n // console.log(event.nativeEvent.inputType)\n\n onChange(textContent, start, end)\n }}\n onCopy={() => {\n let [start, end] = getFieldSelection()\n\n let stylings = _text.current.stylings.slice()\n stylings = getStylingsInRange(stylings, start, end)\n\n setText({\n ...text,\n clipboard: stylings,\n })\n }}\n onDrop={(event) => {\n let text = event.dataTransfer.getData(\"text\")\n\n if (text.trim() == \"\") return\n\n setText({\n ..._text.current,\n events: {\n ..._text.current.events,\n drop: { is: true, text: text, drag: getFieldSelection() },\n },\n })\n }}\n ></div>\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n <button\n className=\"my-1 rounded bg-cyan-800 p-2 py-1 text-white\"\n onClick={() => {\n let onSubmit = props.onSubmit || (() => {})\n\n onSubmit(text.content, text.stylings)\n }}\n >\n Submit\n </button>\n </div>\n )\n}\n","// Import React dependencies.\nimport React, { useState, useCallback } from \"react\"\n// Import the Slate editor factory.\nimport { Editor, Transforms, Element, createEditor } from \"slate\"\n// Import the Slate components and React plugin.\nimport { Slate, Editable, withReact } from \"slate-react\"\n// TypeScript users only add this code\nimport { BaseEditor, Descendant } from \"slate\"\nimport { ReactEditor } from \"slate-react\"\n\ntype CustomElement = { type: \"paragraph\"; children: CustomText[] }\ntype CustomText = { text: string }\n\ndeclare module \"slate\" {\n interface CustomTypes {\n Editor: BaseEditor & ReactEditor\n Element: CustomElement\n Text: CustomText\n }\n}\n\nconst initialValue: Descendant[] = [\n {\n type: \"paragraph\",\n children: [{ text: \"\" }],\n },\n]\n\nlet styles = {\n bold: { fontWeight: \"bold\" },\n italic: { fontStyle: \"italic\" },\n underline: { textDecoration: \"underline\" },\n strikethrough: { textDecoration: \"line-through\" },\n}\n\nconst Leaf = (props) => {\n let data = Object.assign({}, props.leaf)\n delete data.text\n\n let keys = Object.entries(data)\n .filter(([key, value]) => value)\n .map(([key, _]) => key)\n\n let types = {}\n\n if (keys.length != 0) {\n keys.map((type) => {\n Object.entries(styles[type]).map(([key, value]) => {\n types[key] = value\n })\n })\n }\n\n return (\n <span {...props.attributes} style={types}>\n {props.children}\n </span>\n )\n}\n\nconst Property = (props) => {\n return (\n <div\n className=\"border-box mr-[5px] flex h-[32px] w-[32px] items-center justify-center rounded bg-gray-400 p-2\"\n onMouseDown={props.onMouseDown}\n >\n {props.name}\n </div>\n )\n}\n\nexport const FloatingCommentSlate = () => {\n const [editor] = useState(() => withReact(createEditor()))\n\n // Define a leaf rendering function that is memoized with `useCallback`.\n const renderLeaf = useCallback((props) => {\n return <Leaf {...props} />\n }, [])\n\n const perform = (event, type) => {\n event.preventDefault() // This does not take focus away from field which allows the function to retrieve the current selection data\n\n let current = Editor.marks(editor)[type] || false\n console.log(Editor.marks(editor))\n // if (!types.includes(type)) types.push(type)\n\n Editor.addMark(editor, type, !current)\n }\n\n return (\n <div className=\"align-center box-border flex h-min w-[400px] flex-col items-center justify-center rounded bg-blue-300 shadow-md\">\n <div className={\"flex w-full flex-row justify-start p-2\"}>\n <Property\n name=\"B\"\n onMouseDown={(event) => {\n perform(event, \"bold\")\n }}\n />\n <Property\n name=\"I\"\n onMouseDown={(event) => {\n perform(event, \"italic\")\n }}\n />\n <Property\n name=\"U\"\n onMouseDown={(event) => {\n perform(event, \"underline\")\n }}\n />\n <Property\n name=\"S\"\n onMouseDown={(event) => {\n perform(event, \"strikethrough\")\n }}\n />\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n <div className=\"w-full\">\n <Slate editor={editor} initialValue={initialValue}>\n <Editable\n renderLeaf={renderLeaf}\n className=\"h-[150px] p-2\"\n onKeyDown={(event) => {\n if (!event.ctrlKey) {\n return\n }\n\n switch (event.key) {\n // When \"B\" is pressed, bold the text in the selection.\n case \"b\": {\n event.preventDefault()\n Editor.addMark(editor, \"bold\", true)\n break\n }\n }\n }}\n />\n </Slate>\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n <button className=\"my-1 rounded bg-cyan-800 p-2 py-1 text-white\">\n Submit\n </button>\n </div>\n )\n}\n","import React from \"react\"\nimport ReactDOMServer from \"react-dom/server\"\n\nlet base64 =\n \"iVBORw0KGgoAAAANSUhEUgAAANUAAABhCAYAAABBG+TgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACEgSURBVHhe7Z0HWFRXFsfPG1SaFKWDgBUsWLH3lthN1cQYY5ItiellN9mYxGQ3m2rcbDYxuiamJ2qqaa4NK/aOFaWIIgqKIE1Rmbf3f+eNvJl5b2DgDWK8v++bj3nDlDdw/++ce+4550pl5ZdlEggEhmFSfgoEAoMQohIIDEaISiAwGCEqgcBghKgEAoMRohIIDEaISiAwGCEqgcBg6p2oZJmowkx0qULmN9wXCK4l6lVGRckFmbIKJcotluliheWxhh5EjT0tP70bSOTbiP1sKJOfp0SeDWSSJMnyRIGgnlBvRFVWTrQqXaYf98qUUyRzi2XFxHTjw8QU6CVRkC9RMLuF+xGF+UsU5idRqK9MIY0laiCcWUE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UQGIwQlUBgMEJUAoHBCFEJBIZC9H8N2KynRYkKgQAAAABJRU5ErkJggg==\"\n\ntype ComponentTypes = {}\nconst Property = (props) => {\n return (\n <div\n className=\"border-box mr-[10px] flex h-[32px] w-fit min-w-[32px] items-center justify-center rounded bg-gray-300 p-2 transition-all hover:opacity-50\"\n onMouseDown={props.onMouseDown}\n >\n {props.name}\n </div>\n )\n}\n\nconst Image = (props) => {\n return (\n <div className=\"group relative w-fit\">\n <img src={`data:image/pngg;charset=utf-8;base64,${base64}`} />\n <div className=\"absolute right-0 top-0 text-red-900 opacity-0 transition-all hover:opacity-50 group-hover:opacity-100\">\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"h-4 w-4\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </div>\n </div>\n )\n}\n\nconst styles = {\n bold: \"B\",\n italic: \"I\",\n underline: \"U\",\n strikeThrough: \"S\",\n subscript: \"SubS\",\n superscript: \"SuperS\",\n removeFormat: \"Plain\",\n}\n\nexport const FloatingCommentExec: React.FC<ComponentTypes> = (props) => {\n return (\n <div className=\"align-center box-border flex h-min w-[400px] flex-col items-center justify-center rounded shadow-md\">\n <div className={\"flex w-full flex-row justify-start p-2\"}>\n {Object.entries(styles).map(([id, acronym]) => {\n return (\n <Property\n name={acronym}\n key={`property-${id}`}\n onMouseDown={(event) => {\n event.preventDefault()\n document.execCommand(id, false, null)\n console.log(`Executing ${id}`)\n // perform(id)\n }}\n />\n )\n })}\n <Property\n name=\"Image\"\n key={`property-insertImage`}\n onMouseDown={(event) => {\n event.preventDefault()\n let html = ReactDOMServer.renderToString(<Image />)\n document.execCommand(\"insertHTML\", false, html)\n\n // const byteCharacters = atob(base64)\n // const byteNumbers = new Array(byteCharacters.length)\n // for (let i = 0; i < byteCharacters.length; i++) {\n // byteNumbers[i] = byteCharacters.charCodeAt(i)\n // }\n // const byteArray = new Uint8Array(byteNumbers)\n // const blob = new Blob([byteArray], { type: \"image/png\" })\n\n // let url = URL.createObjectURL(blob)\n\n // document.execCommand(\"insertImage\", false, url)\n }}\n />\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n\n <div className=\" box-border w-full p-2\">\n <div\n contentEditable=\"true\"\n className=\"rtl h-[150px] w-full resize-none overflow-auto overflow-x-hidden border-none font-['Arial'] text-[16px] outline-none\"\n\n // onKeyDown={(event) => {\n // if (event.key == \"Tab\") {\n // event.preventDefault()\n // document.execCommand(\"indent\", false, null)\n // return\n // }\n // }}\n ></div>\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n <button\n className=\"my-1 rounded bg-cyan-800 p-2 py-1 text-white\"\n onClick={() => {}}\n >\n Submit\n </button>\n </div>\n )\n}\n","import React, { FC, RefObject, useState, useEffect, useRef } from \"react\"\nimport { clsx } from \"clsx\"\nimport { Button } from \"./Button\"\nimport { cn } from \"../util\"\n\ntype BackToTopTypes = {\n paddingX?: number // Horizontal padding relative to the attached corner\n paddingY?: number // Vertical padding relative to the attached corner\n paddingThreshold?: number // Increase to the threshold of the scroll value that has to be passed for the button to appear\n corner?: \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\"\n anchor: RefObject<HTMLInputElement>\n}\n\nexport const BackToTop: FC<BackToTopTypes> = ({ ...props }) => {\n const [visible, setVisible] = useState<boolean>(false)\n const [rect, _setRect] = useState<DOMRect>(null)\n const _rect = useRef(rect)\n const setRect = (data) => {\n _rect.current = data\n _setRect(data)\n }\n\n const self = useRef(null)\n\n const getCoords = () => {\n let anchor = props.anchor.current\n return [anchor.scrollTop, anchor.scrollLeft]\n }\n\n const onScroll = () => {\n let [scrollTop, scrollLeft] = getCoords()\n\n let rect = props.anchor.current.getBoundingClientRect()\n\n setVisible(scrollTop >= rect.height + (props.paddingThreshold || 100))\n }\n\n const backToTop = () => {\n props.anchor.current.scrollTo({ top: 0, behavior: \"smooth\" })\n }\n\n // FIXME: Observers and listeners run twice\n useEffect(() => {\n if (!props.anchor.current) return\n\n props.anchor.current.addEventListener(\"scroll\", onScroll)\n\n // Listens to rect changes. Alternatives like ResizeObserver & IntersectionObserver fail to detect positional changes consistently\n let interval = setInterval(() => {\n if (!props.anchor.current) return\n\n let newRect = props.anchor.current.getBoundingClientRect()\n if (_rect.current == null) return setRect(newRect)\n\n if (\n !(\n _rect.current.top == newRect.top &&\n _rect.current.left == newRect.left &&\n _rect.current.width == newRect.width &&\n _rect.current.height == newRect.height\n )\n ) {\n setRect(newRect)\n }\n }, 1)\n\n return () => {\n props.anchor.current?.removeEventListener(\"scroll\", onScroll)\n clearInterval(interval)\n }\n }, [])\n\n const getStyles = () => {\n if (!props.anchor.current) return {}\n\n let corner = props.corner || \"bottom-right\"\n let [vertical, horizontal] = corner.split(\"-\")\n\n let anchorRect = props.anchor.current.getBoundingClientRect()\n let selfRect = self.current.getBoundingClientRect()\n\n let width = horizontal == \"right\" ? anchorRect.width - selfRect.width : 0\n let height = vertical == \"bottom\" ? anchorRect.height - selfRect.height : 0\n\n let style = {\n top:\n anchorRect.y +\n height +\n (vertical == \"bottom\" ? -1 : 1) * (props.paddingX || 10),\n left:\n anchorRect.x +\n width +\n (horizontal == \"right\" ? -1 : 1) * (props.paddingX || 25),\n }\n\n return style\n }\n\n return (\n <Button\n className={cn(\n \"fixed cursor-pointer rounded transition-all\",\n visible\n ? \"pointer-events-all opacity-100\"\n : \"pointer-events-none opacity-0\"\n )}\n onClick={backToTop}\n style={{\n ...getStyles(),\n transitionProperty: \"opacity, background-color\",\n }}\n ref={self}\n size=\"icon\"\n >\n <svg\n className={clsx(\n \"h-6 w-6 shrink-0 rotate-180 transition-all disabled:bg-gray-200\"\n )}\n aria-label=\"Arrow Icon\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"></path>\n </svg>\n </Button>\n )\n}\n","import React, { FC } from \"react\"\n\ntype InlineCodeTypes = {\n text: string\n}\n\nexport const HawaInlineCode: FC<InlineCodeTypes> = (props) => {\n return <code className=\"inline-code\">{props.text}</code>\n}\n","import React, { FC } from \"react\"\n\ntype TimelineTypes = {\n title: any\n steps: StepTypes[]\n}\ntype StepTypes = {\n date: string\n title: string\n description?: string\n actions?: any\n}\nexport const Timeline: FC<TimelineTypes> = (props) => {\n return (\n <div>\n <ol className=\"relative border-l border-gray-200 dark:border-gray-700\">\n {props.steps.map((step) => (\n <li className=\"mb-10 ml-4\">\n <div className=\"absolute -left-1.5 mt-1.5 h-3 w-3 rounded-full border border-white bg-gray-200 dark:border-gray-900 dark:bg-gray-700\"></div>\n <time className=\"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500\">\n {step.date}\n </time>\n <h3 className=\"text-lg font-semibold text-gray-900 dark:text-white\">\n {step.title}\n </h3>\n <p className=\"mb-4 text-base font-normal text-gray-500 dark:text-gray-400\">\n {step.description}\n </p>\n {step.actions}\n </li>\n ))}\n </ol>\n </div>\n )\n}\n","import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype PinInputTypes = {\n label?: string\n icon?: JSX.Element\n digits: number\n width?: \"normal\" | \"full\"\n getPins?: any\n}\nexport const HawaPinInput: FC<PinInputTypes> = ({\n label,\n icon,\n digits,\n width = \"normal\",\n getPins,\n ...props\n}) => {\n const [pin, setPin] = useState(Array.from(Array(digits)))\n\n const handleKeyDown = (e, index) => {\n let backTo = 0\n if (e.key === \"Backspace\") {\n e.target.value.length === 0 ? (backTo = index - 1) : (backTo = index)\n const previousInput = document.getElementById(`input-${backTo}`)\n previousInput?.focus()\n }\n }\n useEffect(() => {\n let unfilled = pin.includes(undefined)\n if (!unfilled) {\n getPins(pin)\n }\n })\n const handleChange = (e, index) => {\n if (!/^\\d*$/.test(e.target.value)) {\n const newPin = [...pin]\n newPin[index] = \"\"\n setPin(newPin)\n return\n } else {\n const newPin = [...pin]\n newPin[index] = e.target.value\n setPin(newPin)\n\n if (e.target.value.length === 1) {\n const nextInput = document.getElementById(`input-${index + 1}`)\n nextInput?.focus()\n } else if (e.target.value.length === 0) {\n const previousInput = document.getElementById(`input-${index - 1}`)\n previousInput?.focus()\n }\n }\n }\n\n return (\n <div className=\"flex w-full flex-row justify-center gap-2\">\n {pin.map((value, index) => (\n <input\n key={index}\n type=\"text\"\n maxLength={1}\n value={value}\n id={`input-${index}`}\n pattern=\"[0-9]*\"\n className={clsx(\n \"h-10 rounded border bg-background text-center\",\n width === \"full\" ? \"w-full\" : \"w-10\"\n )}\n onChange={(e) => handleChange(e, index)}\n onKeyDown={(e) => handleKeyDown(e, index)}\n onFocus={(e) => e.target.select()}\n {...props}\n />\n ))}\n </div>\n )\n}\n","import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\nimport { DropdownMenu, MenuItemType } from \"./DropdownMenu\"\n\ninterface ItemCardTypes {\n headerActions?: MenuItemType[]\n // headerActions?: THeaderActions[]\n header?: any\n content?: any\n /** a URL for the image of the card */\n cardImage?: string\n /** a function that fires when the card is clicked anywhere */\n onCardClick?: any\n /** a React node with HawaIconCount children to have counters at the bottom of the card */\n counts?: JSX.Element\n /** The action buttons on the bottom right of the card */\n actions?: JSX.Element\n /** The orientation of the card */\n orientation?: \"horizontal\" | \"vertical\"\n /** Enabling this blurs the image on hover and shows an action button */\n clickableImage?: boolean\n /** The function of the action button on the image of the card */\n clickableImageAction?: () => void\n /** The text of the action button on the image of the card */\n clickableImageActionText: string\n /** The icon of the action button on the image of the card */\n clickableImageActionIcon?: any\n}\n\ntype THeaderActions = {\n icon?: JSX.Element\n value?: string\n label: string\n action?: (e: any) => void\n isButton?: boolean\n}\nexport const HawaItemCard: FC<ItemCardTypes> = ({\n actions,\n counts,\n content,\n headerActions,\n clickableImage,\n clickableImageAction,\n clickableImageActionText,\n clickableImageActionIcon,\n header,\n cardImage,\n orientation = \"vertical\",\n ...props\n}) => {\n let defaultStyle =\n \"block rounded border border-gray-200 bg-white shadow-sm hover:shadow-lg transition-all dark:border-gray-700 dark:bg-gray-800 \"\n\n let orientationStyles = {\n vertical: \"max-w-sm\",\n horizontal: \"flex flex-row w-full\",\n }\n let imageStyles = {\n vertical: \"h-auto max-h-56 w-full rounded-t-lg object-cover\",\n horizontal:\n // \"h-auto w-full rounded-l-lg object-cover md:h-auto md:w-48 md:rounded-none md:rounded-l-lg\",\n // \"h-full w-full rounded-l-lg object-cover md:w-48 md:rounded-none md:rounded-l-lg\",\n \"h-full w-48 rounded-l object-cover\",\n }\n let headerActionsButtonStyle =\n \"inline-block rounded p-1 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700\"\n\n const [openActionHeader, setOpenActionHeader] = useState(false)\n\n function handleOpenActionHeader() {\n setOpenActionHeader(!openActionHeader)\n }\n\n useEffect((): any => {\n window.onclick = () => {\n if (openActionHeader) {\n setOpenActionHeader(false)\n }\n }\n return () => (window.onclick = null)\n }, [openActionHeader])\n\n return (\n <div\n className={clsx(defaultStyle, orientationStyles[orientation])}\n {...props}\n >\n {cardImage && (\n <div className=\"group relative overflow-clip\">\n <img\n src={\"https://via.placeholder.com/50\"}\n className={clsx(\n imageStyles[orientation],\n clickableImage\n ? \"overflow-clip transition-all group-hover:blur-lg\"\n : \"\"\n )}\n />\n {clickableImage && (\n <div className=\"absolute left-0 top-0 flex h-full w-full items-center justify-center opacity-0 transition-all group-hover:opacity-100 \">\n <Button\n // startIcon={clickableImageActionIcon}\n variant=\"secondary\"\n onClick={clickableImageAction}\n className=\"flex flex-row gap-2\"\n >\n {clickableImageActionIcon}\n {clickableImageActionText}\n </Button>\n </div>\n )}\n </div>\n )}\n <div className=\"relative w-full p-6\">\n {headerActions && (\n <div className=\"max-h- bg-red absolute right-0 top-0 flex justify-end pr-3 pt-3\">\n <DropdownMenu\n items={headerActions}\n trigger={\n <div\n className={clsx(headerActionsButtonStyle)}\n onClick={handleOpenActionHeader}\n >\n <span className=\"sr-only\">Open dropdown</span>\n <svg\n className=\"h-6 w-6\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path d=\"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z\"></path>\n </svg>\n </div>\n }\n />\n </div>\n )}\n\n {header && (\n <h5 className=\"mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white\">\n {header}\n </h5>\n )}\n {content && (\n <span className=\"w-full font-normal text-gray-700 dark:text-gray-400\">\n {content}\n </span>\n )}\n {actions || counts ? (\n <div\n className={clsx(\n \"mt-3 flex items-center rounded-b-lg dark:text-white \",\n actions && counts ? \"justify-between\" : \"justify-end\"\n )}\n >\n {counts}\n {actions}\n </div>\n ) : null}\n </div>\n </div>\n )\n}\n","import clsx from \"clsx\"\nimport React, { FC } from \"react\"\nimport { Button } from \"./Button\"\n\n// TODO: if feature.excluded is false, show gray and x\n// TODO: add badge to feature if soon\n// TODO: add a discount element\n\ntype PricingCardTypes = {\n direction?: \"rtl\" | \"ltr\"\n features: [{ included: boolean; text: string }]\n price: number\n texts: {\n title: string\n subtitle: string\n buttonText: string\n cycleText: string\n currencyText: string\n }\n onPlanClicked?: () => void\n currentPlan?: boolean\n size: \"small\" | \"medium\" | \"large\"\n}\n\nexport const HawaPricingCard: FC<PricingCardTypes> = ({\n size = \"medium\",\n direction = \"ltr\",\n currentPlan = false,\n ...props\n}) => {\n let isArabic = direction === \"rtl\"\n let cardSizes = {\n small:\n \"mx-1 w-full max-w-sm rounded border dark:border-gray-700 bg-background \",\n medium:\n \"mx-1 w-full rounded min-w-fit border dark:border-gray-700 bg-background \",\n large:\n \"mx-1 w-full max-w-lg rounded border dark:border-gray-700 bg-background \",\n }\n return (\n <div\n dir={isArabic ? \"rtl\" : \"ltr\"}\n className={clsx(\n currentPlan ? \"border-primary\" : \"bg-background\",\n cardSizes[size],\n \"flex flex-col gap-4 rounded border-2 p-4\"\n )}\n >\n <h5 className=\"text-md 0 font-bold text-primary/70\">\n {props.texts.title}\n </h5>\n <div className=\" text-primary/ flex items-baseline\">\n <>\n <span className=\"text-5xl font-extrabold tracking-tight\">\n {props.price}\n </span>\n <span className=\"mx-1 text-sm font-semibold\">\n {props.texts.currencyText}\n </span>\n </>\n <span className=\"ml-1 text-xl font-normal text-primary/70\">\n / {props.texts.cycleText}\n </span>\n </div>\n <h5 className=\"text-md font-normal text-primary/70\">\n {props.texts.subtitle}\n </h5>\n\n {props.features && (\n <ul role=\"list\" className=\"space-y-0 \">\n {props.features?.map((feature, o) => {\n return (\n <li key={o} className=\"flex \">\n <svg\n aria-label=\"Check Icon\"\n aria-hidden=\"true\"\n className=\"m-2 h-5 w-5 flex-shrink-0 text-primary\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"flex items-center text-center font-normal leading-tight text-primary/70 \">\n {feature.text}\n </span>\n </li>\n )\n })}\n </ul>\n )}\n <Button\n onClick={props.onPlanClicked}\n disabled={currentPlan}\n className=\"w-full\"\n >\n {props.texts.buttonText}\n </Button>\n </div>\n )\n}\n","import clsx from \"clsx\"\nimport React, { FC, useState, useEffect, useRef } from \"react\"\n\ntype AdCardTypes = {\n orientation: \"vertical\" | \"horizontal\"\n title: string\n description: string\n imageURL: string\n handleHide?: any\n handleCantHide?: () => void\n canHide: boolean\n}\nexport const HawaAdCard: FC<AdCardTypes> = ({ orientation, ...props }) => {\n const adRef = useRef(null)\n const [closed, setClosed] = useState(false)\n\n let duration = 0\n\n useEffect(() => {\n if (duration) {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n setClosed(true)\n }, duration)\n //To destroy the component after hiding it\n const timeoutDestroy = setTimeout(() => {\n setClosed(true)\n adRef.current.removeChild(adRef.current.children[0])\n }, duration + 1000)\n\n return () => {\n clearTimeout(timeoutHide)\n clearTimeout(timeoutDestroy)\n }\n }\n }, [duration])\n\n let cardStyles = {\n horizontal:\n \"flex flex-row max-w-xl rounded border-gray-200 bg-gray-100 shadow-md p-2 gap-2 items-center relative dark:border-gray-700 dark:bg-gray-800 \",\n vertical:\n \"flex flex-col max-w-[200px] justify-start rounded border-gray-200 bg-gray-100 gap-2 shadow-md p-2 relative dark:border-gray-700 dark:bg-gray-800 \",\n }\n\n let imageStyles = {\n horizontal: \"w-auto h-full bg-blue-500 rounded-inner\",\n vertical: \"bg-blue-500 rounded-inner w-auto \",\n }\n\n return (\n <div ref={adRef}>\n <div\n className={clsx(cardStyles[orientation], \"dark:text-white\")}\n {...props}\n >\n <div className=\"flex aspect-square w-full max-w-fit items-start \">\n <img\n src={\n props.imageURL ? props.imageURL : \"https://via.placeholder.com/50\"\n }\n className={imageStyles[orientation]}\n />\n </div>\n <div className=\"w-full text-xs\">\n <div className=\"font-bold\">{props.title}</div>\n <div className=\"text-[12px]\">{props.description}</div>\n </div>\n <span\n // onClick={props.handleHide}\n onClick={() => {\n if (props.canHide) {\n setClosed(true)\n setTimeout(() => {\n adRef.current.removeChild(adRef.current.children[0])\n }, 200)\n } else {\n props.handleCantHide()\n }\n }}\n className=\"absolute right-0 top-0 h-fit cursor-pointer select-none rounded-bl-lg rounded-tr-lg bg-blue-100 px-2.5 py-0.5 text-[10px] font-semibold text-blue-800 dark:bg-blue-200 dark:text-blue-800\"\n >\n Hide\n </span>\n </div>\n </div>\n )\n}\n","import clsx from \"clsx\"\nimport React, { FC } from \"react\"\n\ntype LandingCardTypes = {\n orientation: \"vertical\" | \"horizontal\"\n title: string\n description: string\n imageURL: string\n handleHide: any\n texts?: {\n titleTip?: string\n title?: string\n description?: string\n linkText?: string\n }\n buttonLink?: string\n className?: any\n}\nexport const HawaLandingCard: FC<LandingCardTypes> = ({\n orientation = \"horizontal\",\n ...props\n}) => {\n let cardStyles = {\n horizontal:\n \"flex max-w-xl rounded border-gray-200 bg-gray-100 shadow-md dark:border-gray-700 dark:bg-gray-800 \",\n vertical:\n \"flex max-w-xs rounded border-gray-200 bg-gray-100 shadow-md dark:border-gray-700 dark:bg-gray-800 \",\n }\n\n let imageStyles = {\n horizontal: \"w-8 h-8 rounded\",\n vertical: \"w-14 h-14 rounded\",\n }\n\n return (\n <div\n className={clsx(\n cardStyles[orientation],\n \"flex flex-col p-10\",\n \"relative overflow-hidden dark:text-white\",\n props.className\n )}\n {...props}\n >\n {props.texts?.titleTip && (\n <div className=\"text-sm text-red-600\">{props.texts?.titleTip}</div>\n )}\n {props.imageURL && (\n <img\n className=\"absolute -bottom-10 -right-10 h-40 w-auto \"\n src={props.imageURL}\n />\n )}\n\n {props.texts?.title && (\n <div className=\"mt-2 text-lg font-medium\">{props.texts?.title} </div>\n )}\n {props.texts?.description && (\n <div className=\"z-10 mt-4 text-sm\">{props.texts?.description}</div>\n )}\n {props.texts?.linkText && (\n <div className=\"z-10 mt-6 text-sm underline underline-offset-8\">\n {props.texts?.linkText}\n </div>\n )}\n </div>\n )\n}\n","import React, { FC, ButtonHTMLAttributes, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { HawaLoading } from \"./HawaLoading\"\n\ninterface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: \"contained\" | \"outlined\"\n feedback?: string\n tooltipDirection?: \"rtl\" | \"ltr\"\n color?: \"default\" | \"primary\" | \"secondary\" | \"light\" | \"dark\"\n width?: \"full\" | \"normal\" | \"half\"\n size?: \"xs\" | \"small\" | \"medium\" | \"large\" | \"noPadding\" | \"full\" | \"icon\"\n margins?: \"none\" | \"1\" | \"2\" | \"3\" | \"4\"\n tooltip?: string\n tooltipSize?: \"normal\" | \"small\" | \"large\"\n tooltipPosition?:\n | \"left-top\"\n | \"left-bottom\"\n | \"right-top\"\n | \"right-bottom\"\n | \"top-right\"\n | \"top-left\"\n | \"bottom-right\"\n | \"bottom-left\"\n startIcon?: any\n endIcon?: any\n isLoading?: boolean\n badge?: any\n edgeCorner?: any\n disabled?: boolean\n}\n\nconst disabledSyles = \"cursor-default pointer-events-none\"\nconst disabledVariantSyles = {\n contained: \"text-gray-300 bg-gray-100\",\n outlined: \"text-gray-300 border-gray-300\",\n}\nconst baseStyles =\n \"cursor-pointer justify-center items-center text-center font-medium transition-all \"\nconst sizeStyles = {\n icon: \"h-10 w-10\",\n xs: \"px-1.5 py-2 text-[9px] h-fit\",\n small: \"text-xs px-2.5 py-1.5\",\n medium: \"text-sm leading-4 px-3 py-2\",\n default: \"h-10 px-4 py-2\",\n large: \"text-sm px-4 py-2\",\n noPadding: \"p-0\",\n full: \"h-full max-h-full p-2\",\n}\nconst widthStyles = {\n full: \"w-full flex justify-center px-5 py-2.5 text-center inline-flex items-center\",\n half: \"w-full text-center flex items-center justify-center h-full\",\n normal:\n \"w-fit dark:bg-buttonPrimary-dark dark:hover:bg-buttonPrimary-700 dark:hover:brightness-90 dark:focus:ring-buttonPrimary-500\",\n}\nconst containerWidthStyles = {\n full: \"w-full flex justify-center text-center inline-flex items-center\",\n half: \"w-1/2\",\n normal: \"w-fit\",\n}\nconst variantStyles = {\n contained: \"border-transparent\",\n // outlined: \"bg-transparent border\",\n outlined:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n}\nconst colorStyles = {\n contained: {\n default:\n \"text-neutral-900 bg-buttonPrimary-500 hover:bg-buttonPrimary-700 bg-buttonPrimary-500 text-white\",\n primary:\n \"text-white bg-buttonPrimary-500 hover:bg-buttonPrimary-700 transition-all\",\n secondary:\n \"bg-buttonSecondary-500 hover:text-white hover:bg-buttonSecondary-700\",\n gray: \"text-neutral-900 bg-gray-200 hover:bg-gray-300\",\n dark: \"text-neutral-900 bg-gray-200 hover:bg-gray-300\",\n },\n outlined: {\n default:\n \"text-gray-600 border-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800 dark:text-white\",\n primary: \"text-black hover:bg-gray-50 dark:text-white\",\n secondary:\n \" dark:text-white text-secondary-800 border-secondary-800 hover:bg-buttonSecondary-700 hover:text-white\",\n gray: \"border-gray-300 hover:bg-gray-200\",\n dark: \"border-gray-900 hover:bg-gray-700\",\n },\n}\n\nexport const HawaButton: FC<ButtonProps> = ({\n className,\n variant = \"contained\",\n color = \"default\",\n size = \"default\",\n width = \"normal\",\n disabled = false,\n isLoading = false,\n tooltip,\n tooltipSize = \"normal\",\n tooltipPosition = \"top-left\",\n tooltipDirection = \"ltr\",\n margins = \"2\",\n children,\n badge,\n edgeCorner = false,\n feedback,\n ...props\n}) => {\n const [isClicked, setIsClicked] = useState(false)\n const [buttonText, setButtonText] = useState(children)\n\n const handleClick = (event) => {\n if (props.onClick) {\n props.onClick(event)\n }\n if (feedback && !isClicked) {\n setButtonText(feedback)\n setIsClicked(true)\n setTimeout(() => {\n setButtonText(children)\n setIsClicked(false)\n }, 2000)\n }\n }\n\n return (\n <div\n className={clsx(\n \"relative\",\n margins !== \"none\" ? `my-${margins}` : \"m-0\",\n containerWidthStyles[width]\n )}\n >\n <button\n className={\n disabled\n ? clsx(\n className,\n baseStyles,\n edgeCorner ? \"rounded-inner\" : \"rounded\",\n\n variantStyles[variant],\n sizeStyles[size],\n widthStyles[width],\n disabledSyles,\n disabledVariantSyles[variant]\n )\n : clsx(\n className,\n \"overflow-x-clip\",\n baseStyles,\n edgeCorner ? \"rounded-inner\" : \"rounded\",\n variantStyles[variant],\n sizeStyles[size],\n colorStyles[variant][color],\n widthStyles[width]\n )\n }\n disabled={disabled}\n // onClick={props.onClick}\n onClick={handleClick}\n >\n {!isLoading ? (\n <div\n className={clsx(\n \" s flex flex-col-reverse items-start justify-center gap-4 transition-all\",\n isClicked && feedback\n ? \" -translate-y-8 pb-1 pt-1\"\n : \"translate-y-0\"\n )}\n >\n {isClicked && feedback ? (\n <div className=\"w-full text-center\">{buttonText}</div>\n ) : null}\n <div className=\"flex w-full select-none flex-row items-center justify-center gap-2 whitespace-nowrap\">\n {props.startIcon && props.startIcon}\n {children}\n {props.endIcon && props.endIcon}\n </div>\n </div>\n ) : (\n <HawaLoading design=\"dots-pulse\" color={\"bg-white\"} size=\"button\" />\n )}\n </button>\n\n {badge && (\n <div\n className={clsx(\n typeof badge === \"boolean\"\n ? \"h-5 w-5\"\n : typeof badge === \"string\"\n ? \"h-5 w-7\"\n : \"h-6 w-6\",\n \"absolute -right-2 -top-2 inline-flex select-none items-center justify-center rounded-full border-2 border-white bg-red-500 text-[9px] font-bold text-white dark:border-gray-900\"\n )}\n >\n {typeof badge === \"number\" && badge > 100 ? \"+99\" : badge}\n </div>\n )}\n </div>\n )\n}\n","import React, { FC } from \"react\"\n\ntype StoreButtonsTypes = {\n store: \"apple\" | \"google\"\n mode: \"dark\" | \"light\"\n}\nexport const HawaStoreButtons: FC<StoreButtonsTypes> = (props) => {\n return (\n <div className=\"flex justify-center\">\n <div>\n {/* <!-- https://developer.apple.com/app-store/marketing/guidelines/#section-badges --> */}\n {props.store === \"apple\" ? (\n props.mode === \"dark\" ? (\n <div className=\"mt-3 flex h-14 w-48 items-center justify-center rounded-lg bg-black text-white\">\n <div className=\"mr-3\">\n <svg viewBox=\"0 0 384 512\" width=\"30\">\n <path\n fill=\"currentColor\"\n d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">Download on the</div>\n <div className=\"font-sans -mt-1 text-2xl font-semibold\">\n App Store\n </div>\n </div>\n </div>\n ) : (\n <div className=\"mt-3 flex h-14 w-48 items-center justify-center rounded-lg border border-black bg-transparent text-black\">\n <div className=\"mr-3\">\n <svg viewBox=\"0 0 384 512\" width=\"30\">\n <path\n fill=\"currentColor\"\n d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">Download on the</div>\n <div className=\"font-sans -mt-1 text-2xl font-semibold\">\n App Store\n </div>\n </div>\n </div>\n )\n ) : props.mode === \"dark\" ? (\n <div className=\"mt-3 flex h-14 w-48 items-center justify-center rounded-lg bg-black text-white\">\n <div className=\"mr-3\">\n <svg viewBox=\"30 336.7 120.9 129.2\" width=\"30\">\n <path\n fill=\"#FFD400\"\n d=\"M119.2,421.2c15.3-8.4,27-14.8,28-15.3c3.2-1.7,6.5-6.2,0-9.7 c-2.1-1.1-13.4-7.3-28-15.3l-20.1,20.2L119.2,421.2z\"\n />\n <path\n fill=\"#FF3333\"\n d=\"M99.1,401.1l-64.2,64.7c1.5,0.2,3.2-0.2,5.2-1.3 c4.2-2.3,48.8-26.7,79.1-43.3L99.1,401.1L99.1,401.1z\"\n />\n <path\n fill=\"#48FF48\"\n d=\"M99.1,401.1l20.1-20.2c0,0-74.6-40.7-79.1-43.1 c-1.7-1-3.6-1.3-5.3-1L99.1,401.1z\"\n />\n <path\n fill=\"#3BCCFF\"\n d=\"M99.1,401.1l-64.3-64.3c-2.6,0.6-4.8,2.9-4.8,7.6 c0,7.5,0,107.5,0,113.8c0,4.3,1.7,7.4,4.9,7.7L99.1,401.1z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">GET IT ON</div>\n <div className=\"font-sans -mt-1 text-xl font-semibold\">\n Google Play\n </div>\n </div>\n </div>\n ) : (\n <div className=\"mt-3 flex h-14 w-48 items-center justify-center rounded-lg border border-black bg-white text-black\">\n <div className=\"mr-3\">\n <svg viewBox=\"30 336.7 120.9 129.2\" width=\"30\">\n <path\n fill=\"#FFD400\"\n d=\"M119.2,421.2c15.3-8.4,27-14.8,28-15.3c3.2-1.7,6.5-6.2,0-9.7 c-2.1-1.1-13.4-7.3-28-15.3l-20.1,20.2L119.2,421.2z\"\n />\n <path\n fill=\"#FF3333\"\n d=\"M99.1,401.1l-64.2,64.7c1.5,0.2,3.2-0.2,5.2-1.3 c4.2-2.3,48.8-26.7,79.1-43.3L99.1,401.1L99.1,401.1z\"\n />\n <path\n fill=\"#48FF48\"\n d=\"M99.1,401.1l20.1-20.2c0,0-74.6-40.7-79.1-43.1 c-1.7-1-3.6-1.3-5.3-1L99.1,401.1z\"\n />\n <path\n fill=\"#3BCCFF\"\n d=\"M99.1,401.1l-64.3-64.3c-2.6,0.6-4.8,2.9-4.8,7.6 c0,7.5,0,107.5,0,113.8c0,4.3,1.7,7.4,4.9,7.7L99.1,401.1z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">GET IT ON</div>\n <div className=\"font-sans -mt-1 text-xl font-semibold\">\n Google Play\n </div>\n </div>\n </div>\n )}\n\n {/* <div className=\"mt-3 flex h-14 w-60 items-center justify-center rounded-xl bg-black text-white\">\n <div className=\"mr-3\">\n <svg viewBox=\"0 0 384 512\" width=\"30\">\n <path\n fill=\"currentColor\"\n d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">Download on the</div>\n <div className=\"font-sans -mt-1 text-2xl font-semibold\">\n Mac App Store\n </div>\n </div>\n </div> */}\n\n {/* <!-- https://play.google.com/intl/en_us/badges/ --> */}\n </div>\n </div>\n )\n}\n","import React, { FC, useState } from \"react\"\n\ntype ImageCardTypes = {\n children: any\n align?: any\n bottomElement?: any\n inCardActions?: any\n cardImage?: string\n title?: string\n subtitle?: string\n blank?: boolean\n}\nexport const ActionCard: FC<ImageCardTypes> = (props) => {\n const [hovered, setHovered] = useState(false)\n\n return (\n <div className=\"flex h-full w-full flex-col gap-1 \">\n <div\n className=\"group relative h-full w-full rounded border bg-background bg-cover bg-center transition-all duration-500 hover:drop-shadow-2xl\"\n style={{\n backgroundImage: `url(${props.blank ? \"\" : props.cardImage})`,\n }}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n >\n {props.blank ? (\n <div className=\"flex h-full flex-col items-center justify-center \">\n <svg\n className=\"h-10 w-10 text-foreground\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n stroke-width=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z\"></path>\n </svg>\n </div>\n ) : (\n <div className=\"absolute inset-0 rounded bg-black opacity-50\"></div>\n )}\n <div className=\"absolute bottom-2 right-2 z-10 opacity-0 transition-all duration-200 group-hover:opacity-100\">\n {props.inCardActions}\n </div>\n {!props.blank && (\n <div className=\"relative p-4\">\n <h1 className=\"text-white\">{props.title}</h1>\n <p className=\"text-white\">{props.subtitle}</p>\n </div>\n )}\n </div>\n <div\n className={`flex flex-row justify-between text-sm transition-all duration-200 ${\n hovered ? \"opacity-100\" : \"opacity-0\"\n }`}\n >\n {props.bottomElement}\n </div>\n </div>\n )\n}\n","import React from \"react\"\n\ninterface Feature {\n icon: React.ReactNode\n title: string\n description: string\n}\n\ntype StickyFeaturesType = {\n features?: Feature[]\n tag?: string\n title?: string\n description?: string\n}\n\nexport const StickyFeatures: React.FC<StickyFeaturesType> = (props) => {\n return (\n <div className=\"bg-white py-24 sm:py-32\">\n\n <div className=\"mx-auto flex max-w-5xl flex-col items-start gap-10 px-6 md:flex-row lg:px-8\">\n <div className=\"w-full md:sticky md:top-10 md:w-[28rem]\">\n <h2 className=\"text-lg font-semibold leading-8 tracking-tight text-indigo-600\">\n {props.tag}\n </h2>\n <p className=\"mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl\">\n {props.title}\n </p>\n <p className=\"mb-2 mt-6 text-base leading-7 text-gray-600\">\n {props.description}\n </p>\n </div>\n <div className=\"mt-5 w-full min-w-0 flex-1 md:mt-0\">\n <dl className=\"grid grid-cols-1 gap-x-8 gap-y-10 md:max-w-xl lg:max-w-none lg:gap-y-16\">\n {props.features.map((f) => (\n <div className=\"relative rounded-lg bg-gray-50 p-10\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-lg bg-indigo-600\">\n {f.icon}\n </div>\n\n <dt className=\"mt-4 text-lg font-semibold leading-7 text-gray-900\">\n {f.title}\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-600\">\n {f.description}\n </dd>\n </div>\n ))}\n </dl>\n </div>\n </div>\n </div>\n )\n}\n","import React, { FC, useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\nimport { HawaRadio } from \"./HawaRadio\"\nimport { Card, CardContent } from \"./Card\"\nimport { Textarea } from \"./Textarea\"\n\ntype ComponentTypes = {\n title?: string\n question: string\n options?: []\n texts?: {\n least: string\n most: string\n }\n position?: \"bottom-right\" | \"bottom-left\"\n onOptionClicked?: (option) => void\n}\nexport const UserReferralSource: FC<ComponentTypes> = ({\n position = \"bottom-right\",\n ...props\n}) => {\n const [closed, setClosed] = useState(false)\n const [answered, setAnswered] = useState(false)\n const [clickedOption, setClickedOption] = useState(null)\n const [closingTimer, setClosingTimer] = useState(5)\n const popUpRef = useRef(null)\n\n const boxPosition = {\n \"bottom-right\": \"right-4\",\n \"bottom-left\": \"left-4\",\n }\n useEffect(() => {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n if (closingTimer >= 0) {\n setClosingTimer(closingTimer - 1)\n }\n }, 1000)\n\n return () => {\n clearTimeout(timeoutHide)\n }\n }, [closingTimer])\n\n const slowClose = () => {\n setClosed(true)\n setTimeout(() => {\n popUpRef.current.removeChild(popUpRef.current.children[0])\n }, 200)\n }\n return (\n <Card\n ref={popUpRef}\n className={clsx(\"fixed bottom-4 p-4 \", boxPosition[position])}\n >\n <button\n type=\"button\"\n className=\"absolute right-2 top-2 inline-flex h-8 w-8 rounded p-1.5 text-gray-400 transition-all hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white\"\n data-dismiss-target=\"#toast-default\"\n aria-label=\"Close\"\n onClick={() => slowClose()}\n >\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n <CardContent headless>\n <div\n className={clsx(\n \"flex flex-col gap-4\", // \"relative flex w-full max-w-sm flex-col gap-2 rounded border bg-background p-4 shadow-md transition-all\",\n closed ? \"opacity-0\" : \"opacity-100\"\n )}\n >\n <div className=\"mt-4 font-bold\">{props.question}</div>\n <div className=\"flex w-full flex-row gap-1 rounded \">\n <HawaRadio\n orientation=\"vertical\"\n options={props.options}\n ></HawaRadio>\n </div>\n <div>\n <Textarea />\n </div>\n </div>\n <Button className=\"mt-4 w-full\">Submit</Button>\n </CardContent>\n </Card>\n )\n}\n","import * as React from \"react\"\nimport { cn } from \"../util\"\nimport { Label } from \"./Label\"\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n label?: string\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, label, ...props }, ref) => {\n return (\n <>\n {label && <Label htmlFor={props.id}>{label}</Label>}\n <textarea\n className={cn(\n \"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n </>\n )\n }\n)\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n","import React from \"react\"\n\ntype IconProps = React.HTMLAttributes<SVGElement>\n\nexport const Icons = {\n logo: (props: IconProps) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\" {...props}>\n <rect width=\"256\" height=\"256\" fill=\"none\" />\n <line\n x1=\"208\"\n y1=\"128\"\n x2=\"128\"\n y2=\"208\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"16\"\n />\n <line\n x1=\"192\"\n y1=\"40\"\n x2=\"40\"\n y2=\"192\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"16\"\n />\n </svg>\n ),\n mail: (props: IconProps) => (\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"></path>\n <polyline points=\"22,6 12,13 2,6\"></polyline>\n </svg>\n ),\n phone: (props: IconProps) => (\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3\"\n ></path>\n </svg>\n ),\n twitter: (props: IconProps) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M21.543 7.104c.015.211.015.423.015.636 0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041 4.93 4.93 0 0 1-4.6-3.42 4.916 4.916 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.887 4.887 0 0 0 2.235.616A4.928 4.928 0 0 1 1.67 3.148a13.98 13.98 0 0 0 10.15 5.144 4.929 4.929 0 0 1 8.39-4.49 9.868 9.868 0 0 0 3.128-1.196 4.941 4.941 0 0 1-2.165 2.724A9.828 9.828 0 0 0 24 4.555a10.019 10.019 0 0 1-2.457 2.549z\"\n />\n </svg>\n ),\n microsoft: (props: IconProps) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M7.462 0H0v7.19h7.462V0zM16 0H8.538v7.19H16V0zM7.462 8.211H0V16h7.462V8.211zm8.538 0H8.538V16H16V8.211z\"\n ></path>\n </svg>\n ),\n gitHub: (props: IconProps) => (\n <svg viewBox=\"0 0 438.549 438.549\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z\"\n ></path>\n </svg>\n ),\n radix: (props: IconProps) => (\n <svg viewBox=\"0 0 25 25\" fill=\"none\" {...props}>\n <path\n d=\"M12 25C7.58173 25 4 21.4183 4 17C4 12.5817 7.58173 9 12 9V25Z\"\n fill=\"currentcolor\"\n ></path>\n <path d=\"M12 0H4V8H12V0Z\" fill=\"currentcolor\"></path>\n <path\n d=\"M17 8C19.2091 8 21 6.20914 21 4C21 1.79086 19.2091 0 17 0C14.7909 0 13 1.79086 13 4C13 6.20914 14.7909 8 17 8Z\"\n fill=\"currentcolor\"\n ></path>\n </svg>\n ),\n aria: (props: IconProps) => (\n <svg role=\"img\" viewBox=\"0 0 24 24\" fill=\"currentColor\" {...props}>\n <path d=\"M13.966 22.624l-1.69-4.281H8.122l3.892-9.144 5.662 13.425zM8.884 1.376H0v21.248zm15.116 0h-8.884L24 22.624Z\" />\n </svg>\n ),\n npm: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n yarn: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n pnpm: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n react: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n tailwind: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M12.001,4.8c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 C13.666,10.618,15.027,12,18.001,12c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C16.337,6.182,14.976,4.8,12.001,4.8z M6.001,12c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 c1.177,1.194,2.538,2.576,5.512,2.576c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C10.337,13.382,8.976,12,6.001,12z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n google: (props: IconProps) => (\n <svg role=\"img\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z\"\n />\n </svg>\n ),\n apple: (props: IconProps) => (\n <svg role=\"img\" viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n paypal: (props: IconProps) => (\n <svg role=\"img\" viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n spinner: (props: IconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...props}\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n ),\n}\n","import React from \"react\"\nimport useCarousel from \"../hooks/useCarousel\"\n\ninterface CarouselProps {\n images: string[]\n}\n\nexport const Carousel: React.FC<CarouselProps> = ({ images }) => {\n const imageWidth = 1000 + 16 // Adjust according to your image width\n const {\n containerRef,\n handleMouseDown,\n handleMouseLeave,\n handleMouseUp,\n handleMouseMove,\n } = useCarousel(imageWidth)\n\n return (\n <div\n className=\"flex cursor-pointer snap-x items-center justify-center gap-4 overflow-x-hidden\"\n onMouseDown={handleMouseDown}\n onMouseLeave={handleMouseLeave}\n onMouseUp={handleMouseUp}\n onMouseMove={handleMouseMove}\n ref={containerRef}\n >\n {images.map((image, index) => (\n <div key={index} className=\"h-96 w-[1000px] flex-shrink-0\">\n {/* <div key={index} className=\"h-40 w-60 flex-shrink-0\"> */}\n <img\n src={image}\n alt={`Carousel Image ${index}`}\n width={imageWidth}\n className=\"h-full w-full rounded-lg object-cover\"\n />\n </div>\n ))}\n </div>\n )\n}\n","import { useState, useRef } from 'react';\n\nconst useCarousel = (imageWidth: number) => {\n const [isDragging, setIsDragging] = useState(false);\n const [startDragX, setStartDragX] = useState(0);\n const [scrollLeft, setScrollLeft] = useState(0);\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n const findClosestSnapPoint = (scrollLeft: number): number => {\n return Math.round(scrollLeft / imageWidth) * imageWidth;\n };\n\n const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {\n setIsDragging(true);\n setStartDragX(e.pageX - containerRef.current!.offsetLeft);\n setScrollLeft(containerRef.current!.scrollLeft);\n };\n\n const handleMouseLeave = () => {\n if (isDragging) {\n handleDragEnd();\n }\n };\n\n const handleMouseUp = () => {\n if (isDragging) {\n handleDragEnd();\n }\n };\n\n const handleDragEnd = () => {\n setIsDragging(false);\n const closestSnapPoint = findClosestSnapPoint(containerRef.current!.scrollLeft);\n containerRef.current!.scrollTo({\n left: closestSnapPoint,\n behavior: 'smooth',\n });\n };\n\n const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isDragging) return;\n e.preventDefault();\n const x = e.pageX - containerRef.current!.offsetLeft;\n const walk = x - startDragX;\n containerRef.current!.scrollLeft = scrollLeft - walk;\n };\n\n return {\n containerRef,\n handleMouseDown,\n handleMouseLeave,\n handleMouseUp,\n handleMouseMove,\n };\n};\n\nexport default useCarousel;\n","import * as React from \"react\"\nimport { cn } from \"../util\"\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n preview?: boolean\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, preview, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n preview &&\n \" disabled:cursor-default disabled:opacity-100 border-opacity-25 \"\n )}\n disabled={preview}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import React, { FC, useState } from \"react\"\nimport { HawaRadio } from \"./HawaRadio\"\nimport { cn } from \"../util\"\n\ntype TypographyTypes = {\n handleLanguage: (e) => void\n currentLanguage: any\n handleColorMode: (e) => void\n currentColorMode: any\n orientation?: \"vertical\" | \"horizontal\"\n width?: \"default\" | \"full\"\n}\nexport const InterfaceSettings: FC<TypographyTypes> = ({\n orientation = \"horizontal\",\n width = \"default\",\n ...props\n}) => {\n const [color, setColor] = useState(props.currentColorMode)\n const [language, setLanguage] = useState(props.currentLanguage)\n let orientationStyle = {\n horizontal: \"flex flex-row justify-between\",\n vertical: \"flex flex-col items-center gap-2\",\n }\n return (\n <div className={cn(orientationStyle[orientation])}>\n <HawaRadio\n width={width}\n defaultValue={language}\n onChangeTab={(e) => {\n props.handleLanguage(e)\n setLanguage(e)\n }}\n design=\"tabs\"\n options={[\n { value: \"ar\", label: \"عربي\" },\n { value: \"en\", label: \"English\" },\n ]}\n />\n <HawaRadio\n width={width}\n defaultValue={color}\n onChangeTab={(e) => {\n props.handleColorMode(e)\n setColor(e)\n }}\n design=\"tabs\"\n options={[\n {\n value: \"light\",\n label: (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90\"\n >\n <path\n d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n fill=\"currentColor\"\n ></path>\n </svg>\n ),\n },\n {\n value: \"dark\",\n label: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n className=\"h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100\"\n >\n <path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"></path>\n </svg>\n ),\n },\n ]}\n />\n </div>\n )\n}\n","import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\nimport { cn } from \"../util\"\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 rounded border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:shadow-dark\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\ninterface PopoverProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n trigger: React.ReactNode\n children: React.ReactNode\n className?: string\n sideOffset?: number\n}\n\nconst Popover: React.FC<PopoverProps> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n}) => (\n <PopoverPrimitive.Root>\n <PopoverPrimitive.Trigger>{trigger}</PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n)\n\nexport { Popover }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\nimport { cn } from \"../util\"\n\nconst TabsContext = React.createContext<{\n orientation?: \"vertical\" | \"horizontal\"\n}>({ orientation: \"vertical\" })\n\ntype TabsRootProps = React.ComponentPropsWithoutRef<\n typeof TabsPrimitive.Root\n> & { orientation?: \"vertical\" | \"horizontal\" }\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n TabsRootProps\n>(({ className, orientation, ...props }, ref) => (\n <TabsPrimitive.Root\n ref={ref}\n className={cn(\n \"flex gap-2\",\n orientation === \"horizontal\" ? \"flex-row\" : \"flex-col\",\n className\n )}\n {...props}\n >\n <TabsContext.Provider value={{ orientation }}>\n {props.children}\n </TabsContext.Provider>\n </TabsPrimitive.Root>\n))\nTabs.displayName = TabsPrimitive.Root.displayName\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const { orientation } = React.useContext(TabsContext)\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"flex w-fit flex-wrap items-center justify-start gap-1 rounded border bg-muted p-1 text-muted-foreground dark:border-primary/10 \",\n orientation === \"horizontal\" ? \"flex-col\" : \"flex-row\",\n className\n )}\n {...props}\n />\n )\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex w-full flex-1 select-none items-center justify-center whitespace-nowrap rounded border px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm dark:border-primary/10\",\n className\n )}\n {...props}\n />\n )\n})\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"w-full ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n","import * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\nimport { cn } from \"../util\"\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n )\n)\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n","import * as React from \"react\"\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../util\"\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n },\n severity: {\n info: \"info group text-info-foreground bg-info\",\n warning: \"warning group text-warning-foreground bg-warning\",\n error: \"error group border-error bg-error text-error-foreground\",\n success: \"success group text-success-foreground bg-success\",\n none: \"\",\n },\n },\n\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst ToastProvider = ToastPrimitives.Provider\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants> & {\n severity?: \"info\" | \"warning\" | \"error\" | \"success\" | \"none\"\n direction?: \"rtl\" | \"ltr\"\n }\n>(({ className, variant, severity = \"none\", direction, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(\n toastVariants({ variant, severity }),\n className,\n direction === \"rtl\"\n ? \"p-6 pl-0 pr-10 data-[state=closed]:slide-out-to-left-full\"\n : \"p-6 pr-8 data-[state=closed]:slide-out-to-right-full\"\n )}\n dir={direction}\n {...props}\n />\n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => {\n return (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n \"group-[.info]:border-muted/40 group-[.info]:hover:border-info/30 group-[.info]:hover:bg-info group-[.info]:hover:text-info-foreground group-[.info]:focus:ring-info\",\n \"group-[.error]:border-muted/40 group-[.error]:hover:border-error/30 group-[.error]:hover:bg-error group-[.error]:hover:text-error-foreground group-[.error]:focus:ring-error\",\n \"group-[.success]:border-muted/40 group-[.success]:hover:border-success/30 group-[.success]:hover:bg-success group-[.success]:hover:text-success-foreground group-[.success]:focus:ring-success\",\n \"group-[.warning]:border-muted/40 group-[.warning]:hover:border-warning/30 group-[.warning]:hover:bg-warning group-[.warning]:hover:text-warning-foreground group-[.warning]:focus:ring-warning\",\n className\n )}\n {...props}\n />\n )\n})\nToastAction.displayName = ToastPrimitives.Action.displayName\n\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"h-4 w-4\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </ToastPrimitives.Close>\n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>\ntype ToastActionElement = React.ReactElement<typeof ToastAction>\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n}\n","import React from \"react\"\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"./Toast\"\nimport { useToast } from \"../hooks/useToast\"\nimport { cn } from \"../util\"\n\nexport function Toaster(props) {\n const { toasts } = useToast()\n let isRTL = props.direction === \"rtl\"\n return (\n <ToastProvider swipeDirection={isRTL ? \"left\" : \"right\"}>\n {toasts.map(function ({ id, title, description, action, ...toastProps }) {\n return (\n <Toast direction={props.direction} key={id} {...toastProps}>\n <div className={\"grid gap-1 text-start\"}>\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && (\n <ToastDescription>{description}</ToastDescription>\n )}\n </div>\n {action}\n <ToastClose />\n </Toast>\n )\n })}\n <ToastViewport className={cn(\"gap-2\", isRTL && \"fixed left-0\")} />\n </ToastProvider>\n )\n}\n","// Inspired by react-hot-toast library\nimport * as React from \"react\"\n\nimport type { ToastActionElement, ToastProps } from \"../elements/Toast\"\n\nconst TOAST_LIMIT = 5\nconst TOAST_REMOVE_DELAY = 100000\n\ntype ToasterToast = ToastProps & {\n id: string\n title?: React.ReactNode\n description?: React.ReactNode\n severity?: \"info\" | \"warning\" | \"error\" | \"success\" | \"none\"\n action?: ToastActionElement\n}\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const\n\nlet count = 0\n\nfunction genId() {\n count = (count + 1) % Number.MAX_VALUE\n return count.toString()\n}\n\ntype ActionType = typeof actionTypes\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"]\n toast: ToasterToast\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"]\n toast: Partial<ToasterToast>\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n\ninterface State {\n toasts: ToasterToast[]\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>()\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n })\n }, TOAST_REMOVE_DELAY)\n\n toastTimeouts.set(toastId, timeout)\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n }\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n }\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId)\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id)\n })\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined ? { ...t, open: false } : t\n ),\n }\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return { ...state, toasts: [] }\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n }\n }\n}\n\nconst listeners: Array<(state: State) => void> = []\n\nlet memoryState: State = { toasts: [] }\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((listener) => {\n listener(memoryState)\n })\n}\n\ntype Toast = Omit<ToasterToast, \"id\">\n\nfunction toast({ ...props }: Toast) {\n const id = genId()\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss()\n },\n },\n })\n\n return {\n id: id,\n dismiss,\n update,\n }\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) {\n listeners.splice(index, 1)\n }\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n }\n}\n\nexport { useToast, toast }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { cn } from \"../util\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = ({\n className,\n ...props\n}: DialogPrimitive.DialogPortalProps) => (\n <DialogPrimitive.Portal className={cn(className)} {...props} />\n)\nDialogPortal.displayName = DialogPrimitive.Portal.displayName\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n {/* <X className=\"h-4 w-4\" /> */}\n\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n","import React from \"react\"\n\nexport const Box = (props: any) => {\n return <div>{props.children}</div>\n}\n","import React from \"react\"\n\ntype BottomAppBarTypes = {\n sx: any\n color: any\n appBarContent: any\n}\nexport const HawaBottomAppBar: React.FunctionComponent<BottomAppBarTypes> = (\n props\n) => {\n return (\n <div className=\"fixed bottom-0 top-auto left-0 m-0 w-full max-w-full p-1\">\n <div\n // elevation={3}\n // style={{\n // width: \"100%\",\n // display: \"flex\",\n // flexDirection: \"row\",\n // justifyContent: \"space-evenly\",\n // borderRadius: 10,\n // alignContent: \"center\",\n // padding: 10,\n // }}\n className=\"flex w-full flex-row items-center justify-evenly rounded bg-gray-200\"\n // variant=\"outlined\"\n >\n {props.appBarContent.map((singleContent: any, i) => (\n <div\n key={i}\n className=\"m-1 flex h-full w-full flex-col items-center justify-center rounded p-2 transition-all hover:cursor-pointer hover:bg-buttonPrimary-700 hover:text-white\"\n onClick={singleContent.action}\n >\n <div\n // sx={{\n // ml: 1,\n // \"&.MuiButtonBase-root:hover\": {\n // color: \"blue\",\n // bgcolor: \"transparent\",\n // },\n // }}\n >\n {singleContent.icon}\n </div>\n <div\n // sx={{ display: { xs: \"none\", sm: \"none\", md: \"block\" } }}\n className=\"mt-2 text-sm\"\n >\n {singleContent.label}\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n}\n","import React, { useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport useDiscloser from \"../hooks/useDiscloser\"\nimport useBreakpoint from \"../hooks/useBreakpoint\"\n\ntype HawaSiteLayoutTypes = {\n navItems: {\n label: string\n icon: any\n slug: string\n action: () => void\n subItems?: any\n }[]\n direction?: \"rtl\" | \"ltr\"\n currentPage: string\n pageTitle?: string\n logoSymbol?: any\n logoLink?: string\n logoText?: any\n children?: any\n stickyNav?: boolean\n topBar?: boolean\n navigationSize?: \"sm\" | \"md\" | \"lg\"\n floating?: boolean\n}\n\nexport const HawaSiteLayout: React.FunctionComponent<HawaSiteLayoutTypes> = ({\n direction = \"rtl\",\n navigationSize = \"md\",\n ...props\n}) => {\n const [openSideMenu, setOpenSideMenu] = useState(false)\n const [openSubItem, setOpenSubItem] = useState(false)\n const { isOpen, onClose, onOpen } = useDiscloser(false)\n const ref = useRef(null)\n const drawerItemRef = useRef(null)\n\n let size\n if (typeof window !== \"undefined\") {\n size = useBreakpoint()\n } else {\n size = 1200\n }\n const [keepOpen, setKeepOpen] = useState(false)\n useEffect(() => {\n const handleClickOutside = (event) => {\n if (ref.current && !ref.current.contains(event.target) && !keepOpen) {\n // onClickOutside && onClickOutside()\n\n setOpenSideMenu(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [keepOpen])\n\n //States of the side menu\n //larger than 600\n //as a bar and expands when hover\n //less than 600\n //as nothing and expands as button is clicked\n let ltrDrawerStyle = [\n \" fixed top-0 left-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-layoutPrimary-500 transition-all\",\n size > 600 ? \"w-14 hover:w-40\" : \"w-0\",\n openSideMenu ? \"w-40\" : \"w-14\",\n ]\n let rtlDrawerStyle = [\n \"fixed top-0 right-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-layoutPrimary-500 transition-all\",\n size > 600 ? \"w-14 hover:w-40\" : \"w-0\",\n openSideMenu ? \"w-40\" : \"w-14\",\n ]\n\n let navigationSizeStyles = {\n sm: \"h-10\",\n md: \"\",\n lg: \"h-24\",\n }\n let ltrChildrenStyle = [\n // \"w-full overflow-y-auto\",\n // \"top-14 h-[calc(100%-3.5rem)]\",\n ]\n let rtlChildrenStyle = [\n // \"overflow-y-auto\",\n // \"w-full\",\n // \"top-14 h-[calc(100%-3.5rem)]\",\n ]\n return (\n <div className=\"h-full w-full\">\n <div\n className={clsx(\n \"z-30 flex w-auto select-none flex-row items-start justify-between bg-layoutPrimary-500 transition-all\",\n navigationSizeStyles[navigationSize],\n \"rounded p-3 \",\n openSideMenu ? \"h-44\" : \"h-14\",\n // props.floating ? \"rounded-[30px]\" : \"rounded\",\n props.stickyNav ? \"fixed left-4 right-4 top-4\" : \"\",\n direction === \"rtl\" ? \"flex-row\" : \"flex-row-reverse\"\n )}\n >\n {size > 600 ? (\n <div className=\"flex flex-row h-8 items-center gap-4 px-3\">\n {props.navItems?.map(({ label }, i) => (\n <div\n onClick={() => setOpenSideMenu(!openSideMenu)}\n key={i}\n className=\"cursor-pointer rounded bg-none text-gray-600 transition-all hover:text-black\"\n >\n {label}\n </div>\n ))}\n </div>\n ) : (\n <div className=\"flex items-center justify-center\">\n <div\n onClick={() => setOpenSideMenu(!openSideMenu)}\n className=\"cursor-pointer rounded p-1 transition-all hover:bg-gray-100\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>{\" \"}\n </div>\n {props.pageTitle ? <div>{props.pageTitle}</div> : <div></div>}\n </div>\n )}\n <div className=\"h-full\">\n <img\n className=\"h-full max-h-8 \"\n src={`https://sikka-images.s3.ap-southeast-1.amazonaws.com/seera/seera-horizontal-wordmark-${\n direction === \"rtl\" ? \"ar\" : \"en\"\n }-white.svg`}\n />\n </div>\n </div>\n\n <div\n className={clsx(\" relative top-14\")}\n // className={clsx(\n // direction === \"rtl\" ? rtlChildrenStyle : ltrChildrenStyle\n // )}\n >\n {props.children}\n </div>\n </div>\n )\n}\n","import React, { useState } from \"react\"\n\ntype TUseDiscloser = {\n isOpen: boolean\n onOpen: () => void\n onClose: () => void\n}\n\nconst useDiscloser = (value: boolean = false): TUseDiscloser => {\n const [open, setOpen] = useState<boolean>(value)\n const onOpen = () => setOpen(true)\n const onClose = () => setOpen(false)\n\n return {\n isOpen: open,\n onOpen: onOpen,\n onClose: onClose,\n }\n}\n\nexport default useDiscloser\n","import React, { useState, useEffect } from \"react\"\n\nconst useBreakpoint = () => {\n const [breakpoint, setBreakpoint] = useState(window?.innerWidth)\n const resize = () => {\n setBreakpoint(window?.innerWidth)\n }\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n // Client-side-only code\n\n window?.addEventListener(\"resize\", resize)\n\n return () => {\n window?.removeEventListener(\"resize\", resize)\n }\n }\n }, [])\n\n return breakpoint\n}\n\nexport default useBreakpoint\n","import React, { useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport useDiscloser from \"../hooks/useDiscloser\"\nimport useBreakpoint from \"../hooks/useBreakpoint\"\nimport { Button, DropdownMenu, MenuItemType, Tooltip } from \"../elements\"\nimport { SidebarGroup } from \"./Sidebar\"\n\ntype AppLayoutTypes = {\n design?: \"default\" | \"bubbles\" | \"floating\"\n /** The pages of the side drawer */\n drawerItems: Item[]\n // The direction of the layout\n direction?: \"rtl\" | \"ltr\"\n // The title of the current selected page, make sure it's the same as the drawerItem slug\n currentPage: string\n pageTitle?: string\n logoSymbol?: any\n logoLink?: string\n logoText?: any\n children?: any\n topBar?: boolean\n username?: string\n email?: string\n avatarImage?: any\n drawerSize?: \"sm\" | \"md\" | \"large\"\n profileMenuItems?: MenuItemType[]\n profileMenuWidth: \"default\" | \"sm\" | \"lg\" | \"parent\"\n onSettingsClick?: () => void\n onDrawerExpand?: (e) => void\n DrawerFooterActions?: any\n clickedItem?: any\n texts?: {\n expandSidebar?: string\n collapseSidebar?: string\n }\n}\ntype Item = {\n value: string\n label: string\n icon?: any\n subitems?: SubItem[]\n onClick?: () => void\n}\ntype SubItem = {\n value: string\n label: string\n icon?: any\n onClick?: () => void\n}\n\nexport const AppLayout: React.FunctionComponent<AppLayoutTypes> = ({\n direction = \"ltr\",\n drawerSize = \"md\",\n onSettingsClick,\n DrawerFooterActions,\n currentPage,\n clickedItem,\n design = \"default\",\n ...props\n}) => {\n let closeDrawerWidth = 56\n let openDrawerWidth = 200\n let drawerSizeStyle = {\n opened: {\n sm: \"100\",\n md: openDrawerWidth,\n lg: \"250\",\n },\n closed: {\n sm: closeDrawerWidth,\n md: closeDrawerWidth,\n lg: closeDrawerWidth,\n },\n }\n\n const ref = useRef(null)\n const isRTL = direction === \"rtl\"\n\n const [openedSidebarItem, setOpenedSidebarItem] = useState(\"\")\n const [selectedItem, setSelectedItem] = useState(currentPage)\n\n let size\n if (typeof window !== \"undefined\") {\n size = useBreakpoint()\n } else {\n size = 1200\n }\n const [keepOpen, setKeepOpen] = useState(size > 600 ? true : false)\n const [openSideMenu, setOpenSideMenu] = useState(size > 600 ? true : false)\n\n let drawerSizeCondition =\n size > 600 ? drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][drawerSize] : 0\n\n useEffect(() => {\n const handleClickOutside = (event) => {\n if (ref.current && !ref.current.contains(event.target) && !keepOpen) {\n setOpenSideMenu(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [keepOpen])\n\n return (\n <div className=\"fixed left-0\">\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Top Bar\n * ----------------------------------------------------------------------------------------------------\n */}\n {props.topBar && (\n <div\n className={clsx(\n \"fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* Nav Side Of Navbar */}\n {size > 600 ? (\n <div\n className={clsx(\n \"dark:text-white\",\n isRTL\n ? [size > 600 ? \"mr-14\" : \"mr-2\", keepOpen ? \"mr-40\" : \"\"]\n : [size > 600 ? \"ml-14\" : \"ml-2\", keepOpen ? \"ml-40\" : \"\"]\n )}\n style={\n isRTL\n ? {\n marginRight: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n : {\n marginLeft: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n }\n >\n {props.pageTitle}\n </div>\n ) : (\n // Mobile Drawer Menu Button\n <div\n dir={direction}\n className=\"flex items-center justify-center gap-0.5\"\n >\n <div\n onClick={() => setOpenSideMenu(true)}\n className=\"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth={0}\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n ></path>\n </svg>\n </div>\n {/* Mobile Page Title */}\n {props.pageTitle ? (\n <div className=\"text-sm\">{props.pageTitle}</div>\n ) : (\n <div></div>\n )}\n </div>\n )}\n\n <div\n className={clsx(\n \"flex gap-2 dark:text-white\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* User Info */}\n {size > 600 ? (\n <div\n className={isRTL ? \"text-left text-xs\" : \"text-right text-xs\"}\n >\n <div className=\"font-bold\">{props.username}</div>{\" \"}\n <div>{props.email}</div>\n </div>\n ) : null}\n {/* Profile Icon & Menu */}\n <DropdownMenu\n triggerClassname=\"mx-2\"\n align=\"end\"\n alignOffset={8}\n side={\"bottom\"}\n sideOffset={5}\n width={props.profileMenuWidth}\n direction={isRTL ? \"rtl\" : \"ltr\"}\n items={props.profileMenuItems}\n onItemSelect={(e) => console.log(\"selecting item \", e)}\n trigger={\n <div className=\"relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600\">\n {props.avatarImage ? (\n <img src={props.avatarImage} alt=\"User Avatar\" />\n ) : (\n <svg\n aria-label=\"Avatar Icon\"\n className=\"absolute -left-1 h-10 w-10 text-gray-400\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )}\n </div>\n }\n />\n </div>\n </div>\n )}\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed z-40 flex flex-col justify-between overflow-x-clip transition-all\",\n design === \"floating\"\n ? isRTL\n ? \"right-5 top-5\"\n : \"bottom-5 left-5 top-5\"\n : isRTL\n ? \"right-0 top-0 h-full\"\n : \"left-0 top-0 h-full\"\n )}\n style={{\n width:\n size > 600\n ? openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : `${drawerSizeStyle[\"closed\"][drawerSize]}px`\n : openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : \"0px\",\n }}\n onMouseEnter={() => {\n setOpenSideMenu(true)\n }}\n onMouseLeave={() => {\n if (keepOpen) {\n setOpenSideMenu(true)\n } else {\n setOpenedSidebarItem(\"\")\n setOpenSideMenu(false)\n }\n // keepOpen ? setOpenSideMenu(true) : setOpenSideMenu(false)\n }}\n ref={ref}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Header\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n dir={direction}\n className={\n \"fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all\"\n }\n style={{\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Full Logo\n * ----------------------------------------------------------------------------------------------------\n */}\n <img\n className={clsx(\n \"h-9 opacity-0 transition-all\",\n !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n )}\n src={props.logoLink}\n />\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Logo Symbol\n * ----------------------------------------------------------------------------------------------------\n */}\n {size > 600 ? (\n <img\n className={clsx(\n \"fixed h-9 transition-all\",\n // isRTL ? \"right-2.5\" : \"left-2.5\",\n\n design === \"floating\"\n ? isRTL\n ? \"right-7.5 top-7\"\n : \"left-7.5 top-7\"\n : isRTL\n ? \"right-2.5 top-2.5\"\n : \"left-2.5 top-2.5\",\n\n openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n )}\n src={props.logoSymbol}\n />\n ) : null}\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Content Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed bottom-14 bg-primary-foreground p-2 py-2 transition-all\",\n design === \"floating\" ? \"top-[76px]\" : \"top-14\",\n openSideMenu ? \"overflow-auto\" : \"overflow-hidden\"\n )}\n style={{\n height:\n design === \"floating\"\n ? \"calc(100% - 152px)\"\n : \"calc(100% - 112px)\",\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Items\n * ----------------------------------------------------------------------------------------------------\n */}\n <SidebarGroup\n direction={direction}\n onItemClick={(values) => {\n // console.log(\"vals \", values)\n // setSelectedItem(values)\n if (clickedItem) {\n clickedItem(values)\n }\n }}\n onSubItemClick={(values) => {\n // setSelectedItem(values)\n if (clickedItem) {\n clickedItem(values)\n }\n }}\n selectedItem={currentPage}\n openedItem={openedSidebarItem}\n setOpenedItem={(e) => setOpenedSidebarItem(e)}\n isOpen={openSideMenu}\n items={props.drawerItems}\n />\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Footer\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all\",\n direction === \"rtl\" ? \"flex-row-reverse\" : \"flex-row\",\n design === \"floating\" ? \"bottom-5\" : \"bottom-0\"\n )}\n style={{\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {DrawerFooterActions && openSideMenu ? (\n <>{DrawerFooterActions}</>\n ) : null}\n\n {/* Expand Button */}\n {size > 600 && openSideMenu ? (\n <Tooltip\n side={\"left\"}\n delayDuration={500}\n content={\n keepOpen\n ? props.texts?.collapseSidebar || \"Collapse Sidebar\"\n : props.texts?.expandSidebar || \"Expand Sidebar\"\n }\n >\n <Button\n variant=\"light\"\n onClick={() => {\n setKeepOpen(!keepOpen)\n if (props.onDrawerExpand) {\n props.onDrawerExpand(keepOpen)\n }\n }}\n size=\"smallIcon\"\n >\n <svg\n className={clsx(\n \"h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 \",\n keepOpen\n ? isRTL\n ? \"-rotate-90\"\n : \"rotate-90\"\n : isRTL\n ? \"rotate-90\"\n : \"-rotate-90\"\n )}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </Button>\n </Tooltip>\n ) : null}\n </div>\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Children Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className=\"fixed overflow-y-auto transition-all\"\n style={\n design === \"floating\"\n ? isRTL\n ? {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition + 20}px)`,\n left: \"0px\",\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition + 20}px)`,\n left: `${drawerSizeCondition + 20}px`,\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : isRTL\n ? {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: \"0px\",\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: `${drawerSizeCondition}px`,\n top: props.topBar ? \"56px\" : \"0px\",\n }\n }\n >\n {props.children}\n </div>\n </div>\n )\n}\n","import * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { cn } from \"../util\"\n\nconst Accordion = AccordionPrimitive.Root\n\nlet triggerStyles =\n \"flex flex-1 items-center select-none cursor-pointer bg-primary-foreground rounded justify-between p-2 px-3 font-medium transition-all [&[data-state=open]>svg]:-rotate-90\"\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item ref={ref} className={cn(className)} {...props} />\n))\nAccordionItem.displayName = \"AccordionItem\"\n\ntype AccordionTriggerProps = React.ComponentPropsWithoutRef<\n typeof AccordionPrimitive.Trigger\n> & {\n showArrow?: any\n}\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n AccordionTriggerProps\n>(({ className, showArrow, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(triggerStyles, className)}\n {...props}\n >\n {children}\n {showArrow && (\n <svg\n aria-label=\"Chevron Right Icon\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n className=\"h-4 w-4 shrink-0 rotate-90 transition-transform duration-200\"\n >\n <path d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"></path>\n </svg>\n )}\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className={cn(\n \"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\",\n className\n )}\n {...props}\n >\n <div>{children}</div>\n </AccordionPrimitive.Content>\n))\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\ntype Item = {\n value: string\n label: string\n icon?: any\n subitems?: SubItem[]\n onClick?: () => void\n}\ntype SubItem = {\n value: string\n label: string\n icon?: any\n onClick?: () => void\n}\ninterface SidebarGroupProps {\n title?: string\n items: Item[]\n openedItem?: any\n setOpenedItem?: any\n selectedItem?: any\n isOpen?: boolean\n onItemClick?: (value: string[]) => void\n onSubItemClick?: (values: string[]) => void\n direction?: \"rtl\" | \"ltr\"\n}\n\nconst SidebarGroup: React.FC<SidebarGroupProps> = ({\n title,\n items,\n selectedItem,\n openedItem,\n setOpenedItem,\n onItemClick,\n onSubItemClick,\n direction,\n isOpen,\n}) => {\n // console.log(\"selected item is \", selectedItem)\n return (\n <div>\n {title && <h3 className=\"mb-1 font-bold\">{title}</h3>}\n <ul className=\"flex flex-col gap-2\">\n <Accordion\n value={openedItem}\n type=\"single\"\n onValueChange={(e) => {\n setOpenedItem(e)\n }}\n collapsible\n className=\"flex flex-col gap-1\"\n >\n {items.map((item, idx) => (\n <SidebarItem\n isOpen={isOpen}\n selectedItem={selectedItem}\n key={idx}\n direction={direction}\n item={item}\n onItemClick={onItemClick}\n onSubItemClick={onSubItemClick}\n />\n ))}\n </Accordion>\n </ul>\n </div>\n )\n}\nconst SidebarItem: React.FC<{\n item: Item\n selectedItem?: any\n direction?: \"rtl\" | \"ltr\"\n onItemClick?: (value: string[]) => void\n onSubItemClick?: (values: string[]) => void\n isOpen?: boolean\n}> = ({\n item,\n onItemClick,\n onSubItemClick,\n direction,\n isOpen = true,\n ...props\n}) => {\n const getSelectedStyle = (value: string) => {\n return props.selectedItem === value\n ? \"bg-primary text-primary-foreground cursor-default\"\n : \"hover:bg-primary/10\"\n }\n if (item.subitems) {\n return (\n <AccordionItem\n value={item.value}\n className=\"overflow-x-clip\"\n dir={direction}\n >\n <AccordionTrigger\n className={cn(\n \"overflow-x-clip\",\n props.selectedItem === item.value\n ? \"cursor-default bg-primary text-primary-foreground\"\n : \"hover:bg-primary/10\",\n item.subitems &&\n item.subitems.some(\n (subitem) => props.selectedItem === subitem.value\n )\n ? \"bg-primary text-primary-foreground hover:bg-primary\"\n : \"\"\n )}\n showArrow={isOpen}\n >\n <div\n className={cn(\n !isOpen && \"py-1\",\n \"flex w-fit flex-row items-center gap-2\"\n )}\n >\n {item.icon}\n {isOpen && (\n <span\n className={cn(\n \"transition-all \",\n isOpen ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {item.label}\n </span>\n )}\n </div>\n </AccordionTrigger>\n {item.subitems && (\n <AccordionContent className=\" mt-1 h-full rounded \">\n <div\n className={cn(\"flex h-full flex-col gap-2 bg-foreground/5 p-1\")}\n >\n {item.subitems.map((subitem, idx) => (\n <li\n key={idx}\n onClick={(e) => {\n e.stopPropagation()\n subitem.onClick()\n if (onSubItemClick) {\n onSubItemClick([item.value, subitem.value])\n }\n }}\n className={cn(\n \"flex h-full cursor-pointer flex-row items-center gap-2 rounded p-2 transition-all\",\n // bg-foreground/10\n getSelectedStyle(subitem.value)\n )}\n >\n {subitem.icon}\n {subitem.label}\n </li>\n ))}\n </div>\n </AccordionContent>\n )}\n </AccordionItem>\n )\n } else {\n return (\n <div\n dir={direction}\n onClick={() => {\n item.onClick()\n if (onItemClick) {\n onItemClick([item.value])\n }\n }}\n className={cn(\n triggerStyles,\n getSelectedStyle(item.value),\n \"overflow-x-clip \"\n )}\n >\n <div className={\"flex flex-row items-center gap-2 \"}>\n {item.icon}\n <span\n className={cn(\n \"whitespace-nowrap transition-all\",\n isOpen ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {item.label}\n </span>\n </div>\n </div>\n )\n }\n}\nexport { SidebarGroup, SidebarItem }\n","import React, { useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { FaChevronRight } from \"react-icons/fa\"\nimport useDiscloser from \"../hooks/useDiscloser\"\nimport useBreakpoint from \"../hooks/useBreakpoint\"\nimport { HawaMenu } from \"../elements\"\n\n// TODO: when no pagetitle, navbar gets messy\n\ntype HawaAppLayoutTypes = {\n drawerItems: {\n label: string\n icon: any\n slug: string\n action: () => void\n subItems?: any\n }[][]\n direction?: \"rtl\" | \"ltr\"\n currentPage: string\n pageTitle?: string\n logoSymbol?: any\n logoLink?: string\n logoText?: any\n children?: any\n topBar?: boolean\n username?: string\n email?: string\n drawerSize?: \"sm\" | \"md\" | \"large\"\n profileMenuItems?: MenuItems[][]\n onSettingsClick?: () => void\n}\n\ntype MenuItems = {\n icon?: JSX.Element\n label: string\n action?: (e: any) => void\n isButton?: boolean\n}\nexport const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = ({\n direction = \"rtl\",\n drawerSize = \"md\",\n onSettingsClick,\n ...props\n}) => {\n const [openSideMenu, setOpenSideMenu] = useState(false)\n const [openSubItem, setOpenSubitem] = useState(\"\")\n const { isOpen, onClose, onOpen } = useDiscloser(false)\n const [keepOpen, setKeepOpen] = useState(false)\n const ref = useRef(null)\n const isRTL = direction === \"rtl\"\n let size\n if (typeof window !== \"undefined\") {\n size = useBreakpoint()\n } else {\n size = 1200\n }\n useEffect(() => {\n const handleClickOutside = (event) => {\n if (ref.current && !ref.current.contains(event.target) && !keepOpen) {\n setOpenSideMenu(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [keepOpen])\n\n let drawerDefaultStyle =\n \"fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-layoutPrimary-500 transition-all\"\n\n let drawerSizeStyle = {\n opened: {\n sm: \"100\",\n md: \"160\",\n lg: \"250\",\n },\n closed: {\n sm: \"56\",\n md: \"56\",\n lg: \"56\",\n },\n }\n let drawerSizeCondition =\n size > 600 ? drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][drawerSize] : 0\n return (\n <div className=\"fixed\">\n {/* Top Bar Component */}\n {props.topBar && (\n <div\n className={clsx(\n \"fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-layoutPrimary-500 p-2\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* Nav Side Of Navbar */}\n {size > 600 ? (\n props.pageTitle ? (\n // Title of the page\n <div\n className={clsx(\n isRTL\n ? [size > 600 ? \"mr-14\" : \"mr-2\", keepOpen ? \"mr-40\" : \"\"]\n : [size > 600 ? \"ml-14\" : \"ml-2\", keepOpen ? \"ml-40\" : \"\"]\n )}\n style={\n isRTL\n ? {\n marginRight: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n : {\n marginLeft: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n }\n >\n {props.pageTitle}\n </div>\n ) : null\n ) : (\n // Mobile Drawer Menu Button\n <div\n dir={direction}\n className=\"flex items-center justify-center gap-0.5 \"\n >\n <div\n onClick={() => setOpenSideMenu(true)}\n className=\"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>{\" \"}\n </div>\n {/* Mobile Page Title */}\n {props.pageTitle ? (\n <div className=\"text-sm\">{props.pageTitle}</div>\n ) : (\n <div></div>\n )}\n </div>\n )}\n\n <div\n className={clsx(\n \"flex gap-2\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n // dir={direction}\n >\n {/* User Info */}\n {size > 600 ? (\n <div\n className={clsx(\n isRTL ? \"text-left text-xs\" : \"text-right text-xs\"\n )}\n >\n <div className=\"font-bold\">{props.username}</div>{\" \"}\n <div>{props.email}</div>\n </div>\n ) : null}\n\n {/* Profile Icon & Menu */}\n <HawaMenu\n direction={direction}\n // buttonPosition={isRTL ? \"top-left\" : \"top-right\"}\n withHeader={size > 600 ? false : true}\n headerTitle={size > 600 ? \"\" : props.username}\n headerSubtitle={size > 600 ? \"\" : props.email}\n menuItems={props.profileMenuItems}\n // handleClose={onClose}\n // handleOpen={onOpen}\n // open={isOpen}\n position={\"bottom-left\"}\n // position={isRTL ? \"bottom-left\" : \"bottom-left\"}\n // position={isRTL ? \"right-bottom\" : \"bottom-left\"}\n >\n <div className=\"relative h-8 w-8 cursor-pointer overflow-hidden rounded-full ring-1 ring-buttonPrimary-500 dark:bg-gray-600\">\n <svg\n className=\"absolute -left-1 h-10 w-10 text-gray-400\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </div>\n </HawaMenu>\n </div>\n </div>\n )}\n\n {/* Drawer Container */}\n <div\n onMouseEnter={() => {\n setOpenSideMenu(true)\n }}\n onMouseLeave={() =>\n keepOpen ? setOpenSideMenu(true) : setOpenSideMenu(false)\n }\n ref={ref}\n className={clsx(\n drawerDefaultStyle,\n drawerSizeStyle[drawerSize],\n isRTL ? \"right-0\" : \"left-0\"\n )}\n style={{\n width:\n size > 600\n ? openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : `${drawerSizeStyle[\"closed\"][drawerSize]}px`\n : openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : \"0px\",\n }}\n >\n {/* Drawer Content Container */}\n <div\n className={clsx(\n \"no-scrollbar\",\n\n props.topBar ? \"\" : \"mt-2\",\n openSideMenu ? \"overflow-auto\" : \"overflow-hidden\"\n )}\n >\n {/* Drawer Header */}\n <div\n dir={direction}\n className={clsx(\n \"fixed z-50 mb-2 flex h-14 flex-row items-center transition-all \",\n size > 600 || openSideMenu\n ? \"bg-layoutPrimary-500\"\n : \"w-0 bg-transparent\"\n )}\n style={{\n width:\n size > 600\n ? `${\n drawerSizeStyle[openSideMenu ? \"opened\" : \"closed\"][\n drawerSize\n ] - 16\n }px`\n : \"full\",\n }}\n >\n {/* Full Logo */}\n <img\n className={clsx(\n \"fixed top-2.5 h-9 opacity-0 transition-all\",\n isRTL ? \"right-2.5\" : \"left-2.5\",\n !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n // size > 600 ? \"\" : \"right-4\"\n )}\n // className={clsx(\n // \"fixed top-2.5 h-9 transition-all\",\n // isRTL ? \"right-2.5\" : \"left-2.5\",\n // !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n // )}\n src={props.logoLink}\n />\n\n {/* Logo Symbol */}\n {size > 600 ? (\n <img\n className={clsx(\n \"fixed top-2.5 h-9 transition-all\",\n isRTL ? \"right-2.5\" : \"left-2.5\",\n openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n )}\n src={props.logoSymbol}\n />\n ) : null}\n </div>\n {/* Drawer Items */}\n <div className=\"mb-10 mt-14\">\n {props.drawerItems?.map((dSection, dIndex) => (\n <div\n key={dIndex}\n className={clsx(\"flex flex-col items-stretch justify-center\")}\n >\n {dSection?.map((dItem, i) => {\n return (\n <div key={i} id={\"test\"} className=\"flex flex-col\">\n <div\n onClick={() => {\n dItem.subItems\n ? openSubItem === dItem.slug\n ? // ||\n // dItem.subItems.find(\n // (e) => e.slug === props.currentPage\n // )\n setOpenSubitem(\"\")\n : setOpenSubitem(dItem.slug)\n : dItem.action()\n }}\n className={clsx(\n props.currentPage === dItem.slug ||\n dItem.subItems?.find(\n (e) => e.slug === props.currentPage\n )\n ? \"bg-buttonPrimary-500 text-white\"\n : \"hover:bg-layoutPrimary-300\",\n \"m-2 my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all \",\n isRTL ? \"flex-row-reverse pr-3\" : \"\"\n )}\n >\n <div className=\"flex flex-row\" dir={direction}>\n <div className=\"flex items-center justify-center\">\n {dItem.icon}\n </div>\n <div\n className={clsx(\n \"mx-2 whitespace-nowrap text-sm transition-all\",\n openSideMenu ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {dItem.label}\n </div>\n </div>\n {dItem.subItems && (\n <div\n className={clsx(\n openSubItem && dItem.slug === openSubItem\n ? \"-rotate-90\"\n : \"rotate-90\"\n )}\n >\n <FaChevronRight fontSize={11} />\n </div>\n )}\n </div>\n\n {dItem.subItems && (\n <div\n className={clsx(\n \"m-1 flex cursor-pointer flex-col gap-0 overflow-clip whitespace-nowrap rounded bg-layoutPrimary-300 p-1 transition-all\",\n openSubItem == dItem.slug && openSideMenu\n ? \"\"\n : \"my-0 py-0\",\n isRTL ? \"text-right\" : \"text-left\"\n )}\n style={{\n height:\n openSubItem == dItem.slug && openSideMenu\n ? 6 + 33 * dItem.subItems?.length\n : 0,\n }}\n >\n {dItem.subItems?.map((subIt, s) => (\n <div\n key={s}\n className={clsx(\n \"flex flex-row gap-2 overflow-x-clip rounded p-2 px-2 text-xs\",\n isRTL ? \"text-right\" : \"text-left\",\n props.currentPage === subIt.slug\n ? \"bg-buttonPrimary-500 text-white hover:bg-buttonPrimary-500\"\n : \"hover:bg-layoutPrimary-500\"\n )}\n dir={direction}\n onClick={() => {\n subIt.action()\n // setOpenSubitem(dItem.slug)\n }}\n >\n <div className=\"flex items-center justify-center\">\n {subIt.icon}\n </div>\n <div className=\"flex flex-row justify-between\">\n {subIt.label}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n )\n })}\n {dIndex !== props.drawerItems.length - 1 && (\n <div className=\"my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 text-center \"></div>\n )}\n </div>\n ))}\n </div>\n {/* Drawer Footer */}\n {openSideMenu && (\n <div\n className={clsx(\n \"fixed bottom-0 flex flex-row items-center bg-layoutPrimary-500 p-4 transition-all\",\n openSideMenu ? \"bg-layoutPrimary-500 \" : \"bg-red-500\",\n onSettingsClick ? \"justify-between\" : \"justify-end\",\n direction === \"rtl\" ? \"right-0\" : \"left-0\"\n )}\n style={{\n width: `${\n drawerSizeStyle[openSideMenu ? \"opened\" : \"closed\"][\n drawerSize\n ] - 16\n }px`,\n }}\n >\n {onSettingsClick && (\n <div\n className=\" cursor-pointer rounded p-2 transition-all hover:bg-layoutPrimary-700\"\n onClick={() => onSettingsClick()}\n >\n {/* <FiSettings /> */}\n <svg\n aria-label=\"Settings Icon\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1em\"\n width=\"1em\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n </div>\n )}\n {/* Expand Button */}\n {size > 600 ? (\n <div\n className={clsx(\"w-fit transition-all\")}\n // style={isRTL ? {} : {left: }}\n style={\n isRTL\n ? {\n right: `${\n drawerSizeStyle[openSideMenu ? \"opened\" : \"closed\"][\n drawerSize\n ] - 35\n }px`,\n }\n : {\n left: `${\n drawerSizeStyle[openSideMenu ? \"opened\" : \"closed\"][\n drawerSize\n ] - 35\n }px`,\n }\n }\n >\n <div\n dir={direction}\n className={clsx(\n \"relative left-0 top-0 transition-all\",\n openSideMenu ? \" opacity-100\" : \" opacity-0\"\n )}\n >\n <div\n onClick={() => setKeepOpen(!keepOpen)}\n className={\n \"w-fit cursor-pointer rounded bg-gray-300 p-2 transition-all hover:bg-gray-400\"\n }\n >\n <FaChevronRight\n fontSize={14}\n className={clsx(\n \"transition-all\",\n isRTL\n ? keepOpen\n ? \"rotate-0\"\n : \"rotate-180\"\n : keepOpen\n ? \"rotate-180\"\n : \"rotate-0\"\n )}\n />\n </div>\n </div>\n </div>\n ) : null}\n </div>\n )}\n </div>\n </div>\n {/* \n \n {/* Children Container */}\n <div\n className=\"fixed overflow-y-auto\"\n style={\n isRTL\n ? {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: \"0px\",\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: `${drawerSizeCondition}px`,\n top: props.topBar ? \"56px\" : \"0px\",\n }\n }\n >\n {props.children}\n </div>\n </div>\n )\n}\n","import React, { useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport useDiscloser from \"../hooks/useDiscloser\"\nimport useBreakpoint from \"../hooks/useBreakpoint\"\nimport { Button, DropdownMenu, MenuItemType, Tooltip } from \"../elements\"\n\ntype HawaAppLayoutTypes = {\n /** The pages of the side drawer */\n drawerItems: {\n label: string\n icon: any\n slug: string\n action: () => void\n subItems?: any\n }[][]\n // The direction of the layout\n direction?: \"rtl\" | \"ltr\"\n // The title of the current selected page, make sure it's the same as the drawerItem slug\n currentPage: string\n pageTitle?: string\n logoSymbol?: any\n logoLink?: string\n logoText?: any\n children?: any\n topBar?: boolean\n username?: string\n email?: string\n drawerSize?: \"sm\" | \"md\" | \"large\"\n profileMenuItems?: MenuItemType[]\n onSettingsClick?: () => void\n DrawerFooterActions?: any\n texts?: {\n expandSidebar?: string\n collapseSidebar?: string\n }\n}\n\nexport const HawaAppLayoutSimplified: React.FunctionComponent<\n HawaAppLayoutTypes\n> = ({\n direction = \"rtl\",\n drawerSize = \"md\",\n onSettingsClick,\n DrawerFooterActions,\n ...props\n}) => {\n const [openSideMenu, setOpenSideMenu] = useState(false)\n const [openSubItem, setOpenSubitem] = useState(\"\")\n const { isOpen, onClose, onOpen } = useDiscloser(false)\n const [keepOpen, setKeepOpen] = useState(false)\n const ref = useRef(null)\n const isRTL = direction === \"rtl\"\n let size\n if (typeof window !== \"undefined\") {\n size = useBreakpoint()\n } else {\n size = 1200\n }\n useEffect(() => {\n const handleClickOutside = (event) => {\n if (ref.current && !ref.current.contains(event.target) && !keepOpen) {\n setOpenSideMenu(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [keepOpen])\n\n let drawerDefaultStyle =\n \"fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-card transition-all\"\n //The width of the drawer when closed\n let closeDrawerWidth = 56\n //The width of the drawer when opened\n let openDrawerWidth = 200\n let drawerSizeStyle = {\n opened: {\n sm: \"100\",\n md: openDrawerWidth,\n lg: \"250\",\n },\n closed: {\n sm: \"56\",\n md: \"56\",\n lg: \"56\",\n },\n }\n\n let drawerSizeCondition =\n size > 600 ? drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][drawerSize] : 0\n return (\n <div className=\"fixed left-0\">\n {props.topBar && (\n <div\n className={clsx(\n \"fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* Nav Side Of Navbar */}\n {size > 600 ? (\n <div\n className={clsx(\n \"dark:text-white\",\n isRTL\n ? [size > 600 ? \"mr-14\" : \"mr-2\", keepOpen ? \"mr-40\" : \"\"]\n : [size > 600 ? \"ml-14\" : \"ml-2\", keepOpen ? \"ml-40\" : \"\"]\n )}\n style={\n isRTL\n ? {\n marginRight: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n : {\n marginLeft: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n }\n >\n {props.pageTitle}\n </div>\n ) : (\n // Mobile Drawer Menu Button\n <div\n dir={direction}\n className=\"flex items-center justify-center gap-0.5\"\n >\n <div\n onClick={() => setOpenSideMenu(true)}\n className=\"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </div>\n {/* Mobile Page Title */}\n {props.pageTitle ? (\n <div className=\"text-sm\">{props.pageTitle}</div>\n ) : (\n <div></div>\n )}\n </div>\n )}\n\n <div\n className={clsx(\n \"flex gap-2 dark:text-white\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* User Info */}\n {size > 600 ? (\n <div\n className={isRTL ? \"text-left text-xs\" : \"text-right text-xs\"}\n >\n <div className=\"font-bold\">{props.username}</div>{\" \"}\n <div>{props.email}</div>\n </div>\n ) : null}\n {/* Profile Icon & Menu */}\n <DropdownMenu\n triggerClassname=\"mx-2\"\n align=\"end\"\n alignOffset={8}\n side={\"bottom\"}\n sideOffset={5}\n direction={isRTL ? \"rtl\" : \"ltr\"}\n trigger={\n <div className=\"relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600\">\n <AvatarIcon />\n </div>\n }\n items={props.profileMenuItems}\n onItemSelect={(e) => console.log(\"selecting item \", e)}\n />\n </div>\n </div>\n )}\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip transition-all\",\n isRTL ? \"right-0\" : \"left-0\"\n )}\n style={{\n width:\n size > 600\n ? openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : `${drawerSizeStyle[\"closed\"][drawerSize]}px`\n : openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : \"0px\",\n }}\n onMouseEnter={() => {\n setOpenSideMenu(true)\n }}\n onMouseLeave={() =>\n keepOpen ? setOpenSideMenu(true) : setOpenSideMenu(false)\n }\n ref={ref}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Header\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n dir={direction}\n className={clsx(\n \"fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all\"\n )}\n style={{\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Full Logo\n * ----------------------------------------------------------------------------------------------------\n */}\n <img\n className={clsx(\n \"h-9 opacity-0 transition-all\",\n // isRTL ? \"right-2.5\" : \"left-2.5\",\n !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n // size > 600 ? \"\" : \"right-4\"\n )}\n // className={clsx(\n // \"fixed top-2.5 h-9 transition-all\",\n // isRTL ? \"right-2.5\" : \"left-2.5\",\n // !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n // )}\n src={props.logoLink}\n />\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Logo Symbol\n * ----------------------------------------------------------------------------------------------------\n */}\n {size > 600 ? (\n <img\n className={clsx(\n \"fixed top-2.5 h-9 transition-all\",\n isRTL ? \"right-2.5\" : \"left-2.5\",\n openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n )}\n src={props.logoSymbol}\n />\n ) : null}\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Content Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n // \"no-scrollbar\", TODO: make this optional to hide scrollbar or not\n \"fixed bottom-14 top-14 bg-primary-foreground py-2 transition-all\",\n // bg-yellow-400\n openSideMenu ? \"overflow-auto\" : \"overflow-hidden\"\n )}\n style={{\n height: \"calc(100% - 112px)\",\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Items\n * ----------------------------------------------------------------------------------------------------\n */}\n\n {props.drawerItems?.map((dSection, dIndex) => (\n <div\n key={dIndex}\n className={clsx(\n \"flex select-none flex-col items-stretch justify-center transition-all\"\n )}\n >\n {dSection?.map((dItem, i) => {\n return (\n <div key={i} id={\"test\"} className=\"flex flex-col\">\n <div\n onClick={() => {\n dItem.subItems\n ? openSubItem === dItem.slug\n ? // ||\n // dItem.subItems.find(\n // (e) => e.slug === props.currentPage\n // )\n setOpenSubitem(\"\")\n : setOpenSubitem(dItem.slug)\n : dItem.action()\n }}\n className={clsx(\n props.currentPage === dItem.slug ||\n dItem.subItems?.find(\n (e) => e.slug === props.currentPage\n )\n ? \"bg-primary text-primary-foreground \"\n : \"hover:bg-primary/20\",\n \"my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all \",\n isRTL ? \"flex-row-reverse pr-3\" : \"\",\n openSideMenu ? \"m-2\" : \"m-2\"\n )}\n >\n <div className=\"flex flex-row\" dir={direction}>\n <div className=\"flex items-center justify-center \">\n {dItem.icon}\n </div>\n <div\n className={clsx(\n \"mx-2 whitespace-nowrap text-sm transition-all\",\n openSideMenu ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {dItem.label}\n </div>\n </div>\n {dItem.subItems && (\n <ArrowIcon\n // color={\n // props.currentPage === dItem.slug ||\n // dItem.subItems?.find(\n // (e) => e.slug === props.currentPage\n // )\n // ? \"white\"\n // : \"black\"\n // }\n pointing={\n openSubItem && dItem.slug === openSubItem\n ? \"up\"\n : \"down\"\n }\n />\n )}\n </div>\n\n {dItem.subItems && (\n <div\n className={clsx(\n \"m-1 mx-2 flex cursor-pointer flex-col gap-[2px] overflow-clip whitespace-nowrap rounded bg-primary/10 p-1 transition-all\",\n openSubItem == dItem.slug && openSideMenu\n ? \"\"\n : \"my-0 py-0\",\n isRTL ? \"text-right\" : \"text-left\"\n )}\n style={{\n height:\n openSubItem == dItem.slug && openSideMenu\n ? 6 + 35 * dItem.subItems?.length\n : 0,\n }}\n >\n {dItem.subItems?.map((subIt, s) => (\n <div\n key={s}\n className={clsx(\n \"flex flex-row gap-2 overflow-x-clip rounded-inner p-2 px-2 text-xs\",\n isRTL ? \"text-right\" : \"text-left\",\n props.currentPage === subIt.slug\n ? \"bg-primary text-white\"\n : \"hover:bg-primary-foreground hover:text-primary \"\n )}\n dir={direction}\n onClick={() => {\n subIt.action()\n // setOpenSubitem(dItem.slug)\n }}\n >\n <div className=\"flex items-center justify-center\">\n {subIt.icon}\n </div>\n <div className=\"flex flex-row justify-between\">\n {subIt.label}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n )\n })}\n {dIndex !== props.drawerItems.length - 1 && (\n <div className=\"my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 bg-red-500 text-center \"></div>\n )}\n </div>\n ))}\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Footer\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed bottom-0 flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all\",\n direction === \"rtl\" ? \"flex-row-reverse\" : \"flex-row\"\n )}\n style={{\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {DrawerFooterActions && openSideMenu ? (\n <>{DrawerFooterActions}</>\n ) : null}\n\n {/* Expand Button */}\n {size > 600 && openSideMenu ? (\n <Tooltip\n side={\"left\"}\n delayDuration={500}\n content={\n keepOpen\n ? props.texts?.collapseSidebar || \"Collapse Sidebar\"\n : props.texts?.expandSidebar || \"Expand Sidebar\"\n }\n >\n <Button\n variant=\"light\"\n onClick={() => setKeepOpen(!keepOpen)}\n size=\"smallIcon\"\n >\n <svg\n className={clsx(\n \"h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 \",\n keepOpen\n ? isRTL\n ? \"-rotate-90\"\n : \"rotate-90\"\n : isRTL\n ? \"rotate-90\"\n : \"-rotate-90\"\n )}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </Button>\n </Tooltip>\n ) : null}\n </div>\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Children Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className=\"fixed overflow-y-auto\"\n style={\n isRTL\n ? {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: \"0px\",\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: `${drawerSizeCondition}px`,\n top: props.topBar ? \"56px\" : \"0px\",\n }\n }\n >\n {props.children}\n </div>\n </div>\n )\n}\n\nconst AvatarIcon = () => (\n <svg\n className=\"absolute -left-1 h-10 w-10 text-gray-400\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n)\n\nconst ArrowIcon = ({ pointing }) => {\n let directionStyle\n switch (pointing) {\n case \"right\":\n directionStyle = \"-rotate-90\"\n break\n case \"left\":\n directionStyle = \"rotate-90\"\n break\n case \"up\":\n directionStyle = \"-rotate-180\"\n break\n case \"down\":\n directionStyle = \"rotate-0\"\n break\n\n default:\n break\n }\n return (\n <svg\n className={clsx(\n \"h-6 w-6 shrink-0 text-primary-foreground transition-all disabled:bg-gray-200 \",\n directionStyle\n )}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )\n}\n\nconst SettingsIcon = () => (\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1em\"\n width=\"1em\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n)\n","import React from \"react\"\nimport clsx from \"clsx\"\n\ntype ContainerTypes = {\n maxWidth?: \"full\" | \"small\" | \"normal\"\n children: React.ReactNode\n variant?: \"contained\" | \"outlined\" | \"neobrutalism\"\n direction?: \"rtl\" | \"ltr\"\n centered?: boolean\n}\nexport const HawaContainer: React.FunctionComponent<ContainerTypes> = ({\n maxWidth = \"normal\",\n variant = \"contained\",\n centered = false,\n direction = \"ltr\",\n ...props\n}) => {\n let defaultStyle = \"flex w-full flex-col rounded p-4\"\n let maxWidthStyles: any = {\n full: \"md:max-w-xl\",\n small: \"md:max-w-sm w-1/3 min-w-min\",\n normal: \"max-w-sm md:max-w-md\",\n }\n let variantStyles = {\n contained: \"bg-background border\",\n outlined: \"bg-transparent border border-black w-fit\",\n neobrutalism: \"shadow-neobrutalism border-4 border-black bg-white\",\n }\n\n return (\n <div\n className={clsx(\n defaultStyle,\n maxWidthStyles[maxWidth],\n variantStyles[variant],\n centered ? \"flex items-center text-center\" : \"\"\n )}\n dir={direction}\n >\n {props.children}\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype GridTypes = {\n children?: any\n}\n\nexport const HawaGrid: FC<GridTypes> = (props) => {\n return (\n // [&>*:not(:first-child)]:mt-8\n <div className=\" columns-1 gap-5 sm:columns-2 sm:gap-8 md:columns-3 lg:columns-4 [&>*:not(:first-child)]:mt-8\">\n {props.children}\n </div>\n )\n}\n","import React from \"react\"\n\ninterface Props {\n isOpen: boolean\n onClose: () => void\n items: { label: string; onClick: () => void }[]\n}\n\nexport const AppSidebar: React.FC<Props> = ({ isOpen, onClose, items }) => {\n if (!isOpen) {\n return null\n }\n\n return (\n <div className=\"fixed inset-0 z-40 flex bg-gray-600 bg-opacity-75\">\n <div className=\"w-1/3 rounded-l-lg bg-gray-800 shadow-2xl\">\n <button\n onClick={onClose}\n className=\"p-4 text-gray-400 hover:text-white focus:text-white focus:outline-none\"\n >\n Close\n </button>\n <nav>\n {items.map((item, i) => (\n <a\n key={i}\n href=\"#\"\n onClick={item.onClick}\n className=\"block p-4 font-bold text-white hover:bg-gray-700 hover:text-gray-400\"\n >\n {item.label}\n </a>\n ))}\n </nav>\n </div>\n <div className=\"w-2/3 bg-gray-50\"></div>\n </div>\n )\n}\n","import { BsInstagram, BsTwitter } from \"react-icons/bs\"\nimport { FaSnapchatGhost, FaTiktok } from \"react-icons/fa\"\nimport { Button } from \"../elements\"\nimport { cn } from \"../util\"\n\ntype FooterTypes = {\n logoText?: string\n logoURL?: string\n copyRights?: string\n variation?: \"default\" | \"minimal\"\n socialLinks?: {\n twitter?: string\n instagram?: string\n tiktok?: string\n snapchat?: string\n }\n footerLinks?: {\n title: string\n pages: {\n label: string\n link: string\n }[]\n }[]\n}\n\nexport const Footer: React.FunctionComponent<FooterTypes> = ({\n variation = \"default\",\n ...props\n}) => {\n let variationStyles = {\n default: \"rounded border\",\n minimal: \"border-t\",\n }\n return (\n <div\n className={cn(\n \"flex w-full flex-row items-center justify-between gap-8 rounded bg-background p-4\",\n variationStyles[variation]\n )}\n >\n <div className=\"flex flex-col items-center gap-2\">\n <div className=\"flex flex-row items-center gap-2\">\n {props.logoURL && (\n <div>\n <img className=\"h-8\" src={props.logoURL} />\n </div>\n )}\n {props.logoText && (\n <div>\n <div className=\"text-2xl font-bold text-primary\">\n {props.logoText}\n </div>\n </div>\n )}\n </div>\n {props.copyRights && props.footerLinks && (\n <div className=\"text-xs text-muted-foreground\">\n © {props.copyRights} {new Date().getFullYear()}\n </div>\n )}\n </div>\n {props.copyRights && !props.footerLinks && (\n <div className=\"text-xs text-muted-foreground\">\n © {props.copyRights} {new Date().getFullYear()}\n </div>\n )}\n {props.footerLinks?.map((pagesSection) => (\n <div className=\"flex w-32 flex-col gap-2\">\n <div className=\"text-lg font-bold\">{pagesSection.title}</div>\n <div className=\"flex flex-col gap-1\">\n {pagesSection.pages.map((singlePage) => (\n <a\n className=\"transition-all hover:font-bold\"\n href={singlePage.link}\n >\n {singlePage.label}\n </a>\n ))}\n </div>\n </div>\n ))}\n {props.socialLinks && (\n <div className=\"flex flex-row gap-2\">\n {props.socialLinks.twitter && (\n <Button size=\"smallIcon\" variant=\"ghost\">\n <BsTwitter />\n </Button>\n )}\n {props.socialLinks.instagram && (\n <Button size=\"smallIcon\" variant=\"ghost\">\n <BsInstagram />\n </Button>\n )}\n {props.socialLinks.tiktok && (\n <Button size=\"smallIcon\" variant=\"ghost\">\n <FaTiktok />\n </Button>\n )}\n {props.socialLinks.snapchat && (\n <Button size=\"smallIcon\" variant=\"ghost\">\n <FaSnapchatGhost />\n </Button>\n )}\n </div>\n )}\n </div>\n )\n}\n","import React, { FC, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"../elements\"\n\ntype BannerTypes = {\n showBanner?: boolean\n direction?: \"rtl\" | \"ltr\"\n logoURL?: string\n title?: string\n text?: string\n actionText?: string\n onActionClick?: () => void\n position?: \"top\" | \"bottom\"\n design: \"default\" | \"floating\"\n}\n\nexport const HawaBanner: FC<BannerTypes> = ({\n design = \"floating\",\n ...props\n}) => {\n const bannerRef = useRef(null)\n const [closed, setClosed] = useState(false)\n let bannerStyle = {\n floating:\n \"left-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 lg:max-w-7xl p-4 rounded\",\n default: \"w-[calc(100%)] left-0 z-50 right-0 rounded-none p-2\",\n }\n return (\n <div ref={bannerRef}>\n <div\n dir={props.direction}\n className={clsx(\n bannerStyle[design],\n \"fixed flex flex-col justify-between border border-gray-100 bg-white shadow-sm transition-all dark:border-gray-600 dark:bg-gray-700 md:flex-row md:gap-4 \",\n props.position === \"top\"\n ? design === \"floating\"\n ? \"top-6\"\n : \"top-0\"\n : design === \"floating\"\n ? \"bottom-6\"\n : \"bottom-0\",\n closed ? \"opacity-0\" : \"opacity-100\"\n )}\n >\n <div className=\"mb-3 flex w-full flex-col items-center justify-start md:mb-0 md:flex-row md:items-center\">\n <div\n className={clsx(\n props.direction === \"rtl\"\n ? \"md:ml-4 md:border-l md:pl-4\"\n : \"md:mr-4 md:border-r md:pr-4\",\n \"mb-2 flex items-center border-gray-200 dark:border-gray-600 md:mb-0 md:mr-4 md:pr-4\"\n )}\n >\n {props.logoURL && (\n <img\n src={props.logoURL}\n className=\"mr-2 h-6\"\n alt=\"Flowbite Logo\"\n />\n )}\n {props.title && (\n <span className=\"self-center whitespace-nowrap text-lg font-semibold dark:text-white\">\n {props.title}\n </span>\n )}\n </div>\n {props.text && (\n <p\n className={clsx(\n \"m-0 flex items-center text-center text-sm font-normal text-gray-500 dark:text-gray-400 \",\n props.direction === \"rtl\" ? \"md:text-right\" : \"md:text-left\"\n )}\n >\n {props.text}\n </p>\n )}\n </div>\n {props.actionText && (\n <div\n className={clsx(\n \"flex flex-shrink-0 items-center justify-center \",\n props.direction === \"rtl\" ? \"ml-0 md:ml-10\" : \"mr-0 md:mr-10\"\n )}\n >\n <Button onClick={props.onActionClick}>{props.actionText}</Button>\n </div>\n )}\n <button\n type=\"button\"\n className={clsx(\n \"absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white\",\n props.direction === \"rtl\" ? \"left-2\" : \"right-2\"\n )}\n data-dismiss-target=\"#alert-default\"\n aria-label=\"Close\"\n onClick={() => {\n setClosed(true)\n setTimeout(() => {\n bannerRef.current.removeChild(bannerRef.current.children[0])\n }, 200)\n }}\n >\n <span className=\"sr-only\">Close</span>\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n </div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport { HawaPhoneInput, HawaTextField } from \"../../elements\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype UserProfileFormTypes = {\n inputs: any\n texts: any\n handleUpdateProfile: any\n}\n\nexport const UserProfileForm: FC<UserProfileFormTypes> = (props) => {\n const methods = useForm()\n const { inputs } = props\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n return (\n <Card>\n <form onSubmit={handleSubmit((e) => props.handleUpdateProfile(e))}>\n <CardContent headless>\n <FormProvider {...methods}>\n <Controller\n control={control}\n name=\"fullName\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts.fullNameLabel}\n placeholder={props.texts.fullNamePlaceholder}\n helpertext={errors.fullName?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n <Controller\n control={control}\n name=\"phoneNumber\"\n render={({ field }) => <HawaPhoneInput label=\"Phone number\" />}\n />\n <Controller\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts.emailLabel}\n helpertext={errors.email?.message}\n placeholder={props.texts.emailPlaceholder}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts.emailInvalidText,\n },\n }}\n />\n <Controller\n control={control}\n name=\"password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n label={props.texts.passwordLabel}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.passwordRequiredText,\n }}\n />\n\n <Controller\n control={control}\n name=\"confirmPassword\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n label={props.texts.confirmPasswordLabel}\n placeholder={props.texts.confirmPasswordPlaceholder}\n helpertext={errors.confirmPassword?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.confirmPasswordRequiredText,\n }}\n />\n </FormProvider>\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\" type=\"submit\">\n {props.texts.updateProfile}\n </Button>\n </CardFooter>\n </form>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\n\ntype UserSettingsFormTypes = {\n children: any\n handleSaveSettings?: any\n saveSettingsText?: string\n blockTitle?: string\n}\n\nexport const UserSettingsForm: FC<UserSettingsFormTypes> = (props) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"mb-2 text-sm font-bold\">{props.blockTitle}</div>\n <div className=\"flex flex-col gap-4 rounded p-2\">{props.children}</div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaRadio } from \"../../elements\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\nimport { Icons } from \"../../elements/Icons\"\n\ntype AppLandingTypes = {\n texts?: {\n newUserText?: string\n createAccount?: string\n continueWithGoogle?: string\n continueWithTwitter?: string\n continueWithApple?: string\n continueWithMicrosoft?: string\n continueWithGithub?: string\n continueWithEmail?: string\n continueWithPhone?: string\n }\n viaGoogle?: boolean\n viaTwitter?: boolean\n viaGithub?: boolean\n viaMicrosoft?: boolean\n viaEmail?: boolean\n viaPhone?: boolean\n viaApple?: boolean\n\n withoutSignUp?: boolean\n size: \"small\" | \"normal\" | \"full\"\n direction: \"rtl\" | \"ltr\"\n handleSignIn: () => void\n handleSignUp: () => void\n handleLanguage: () => void\n handleColorMode: () => void\n handleRouteToSignUp?: () => void\n handleGoogle?: () => void\n handleTwitter?: () => void\n handleApple?: () => void\n handleMicrosoft?: () => void\n handleGithub?: () => void\n handleEmail?: () => void\n handlePhone?: () => void\n}\n\nexport const AppLanding: FC<AppLandingTypes> = (props) => {\n return (\n <div dir={props.direction}>\n <Card>\n <CardContent headless className=\"flex flex-col gap-6\">\n {props.viaGoogle && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGoogle}\n >\n <Icons.google className=\"h-4 w-4\" />\n {props.texts?.continueWithGoogle ?? \"Continue With Google\"}\n </Button>\n )}\n {props.viaGithub && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGithub}\n >\n <Icons.gitHub className=\"h-4 w-4\" />\n {props.texts?.continueWithGithub ?? \"Continue With Github\"}\n </Button>\n )}\n {props.viaTwitter && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleTwitter}\n >\n <Icons.twitter className=\"h-4 w-4\" />\n {props.texts?.continueWithTwitter ?? \"Continue With Twitter\"}\n </Button>\n )}\n {props.viaApple && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleApple}\n >\n <Icons.apple className=\"h-4 w-4\" />\n {props.texts?.continueWithApple ?? \"Continue With Apple\"}\n </Button>\n )}\n {props.viaMicrosoft && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleMicrosoft}\n >\n <Icons.microsoft className=\"h-4 w-4\" />\n {props.texts?.continueWithMicrosoft ?? \"Continue With Microsoft\"}\n </Button>\n )}\n {props.viaEmail && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleEmail}\n >\n <Icons.mail className=\"h-4 w-4\" />\n {props.texts?.continueWithEmail ?? \"Continue With Email\"}\n </Button>\n )}\n {props.viaPhone && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handlePhone}\n >\n <Icons.phone className=\"h-4 w-4\" />\n {props.texts?.continueWithPhone ?? \"Continue With Phone\"}\n </Button>\n )}\n\n {!props.withoutSignUp && (\n <div className=\"p-3 text-center text-sm font-normal dark:text-gray-300\">\n {props.texts.newUserText}\n <span\n onClick={props.handleRouteToSignUp}\n className=\"clickable-link\"\n >\n {props.texts.createAccount}\n </span>\n </div>\n )}\n </CardContent>\n </Card>\n <div className=\"mt-6 flex flex-row justify-between\">\n <HawaRadio\n onChangeTab={props.handleLanguage}\n design=\"tabs\"\n options={[\n { value: \"ar\", label: \"عربي\" },\n { value: \"en\", label: \"English\" },\n ]}\n />\n <HawaRadio\n onChangeTab={props.handleColorMode}\n design=\"tabs\"\n options={[\n {\n value: \"light\",\n label: (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90\"\n >\n <path\n d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n ),\n },\n {\n value: \"dark\",\n label: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100\"\n >\n <path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"></path>\n </svg>\n ),\n },\n ]}\n />\n </div>\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { Controller, useForm } from \"react-hook-form\"\nimport { HawaPhoneInput } from \"../../elements\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype SignInPhoneTypes = {\n value: any\n onSubmit: any\n country: any\n label: any\n handlePhoneChange: any\n phoneRequiredText: any\n SignInButtonText: any\n handleSignIn: any\n}\n\nexport const SignInPhone: FC<SignInPhoneTypes> = (props) => {\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n const [userPhone, setUserPhone] = useState(\"\")\n return (\n <Card>\n <CardContent headless>\n <form\n onSubmit={(e) => {\n e.preventDefault()\n props.handleSignIn(userPhone)\n }}\n >\n <Controller\n control={control}\n name=\"phone\"\n render={({ field }) => (\n <HawaPhoneInput\n country={props.country ?? \"\"}\n label={props.label ?? \"\"}\n handleChange={(e: any) => setUserPhone(e.target.value)}\n {...field}\n />\n )}\n rules={{\n required: props.phoneRequiredText,\n }}\n />\n <div className=\"mt-2\"></div>\n <Button className=\"w-full\">{props.SignInButtonText}</Button>\n </form>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Controller, useForm } from \"react-hook-form\"\nimport {\n HawaTextField,\n HawaAlert,\n HawaPhoneInput,\n InterfaceSettings,\n} from \"../../elements\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\nimport { Icons } from \"../../elements/Icons\"\nimport { cn } from \"../../util\"\n\nexport const SignInForm: FC<SignInFormTypes> = (props) => {\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = useForm()\n\n return (\n <div className=\"flex flex-col gap-4\">\n <Card dir={props.direction}>\n <CardContent headless>\n <form onSubmit={handleSubmit((e) => props.handleSignIn(e))}>\n {/* an attempt to animate the alert showing */}\n {/* <div\n className={clsx(\n \"h-0 overflow-clip bg-blue-500 transition-all\",\n props.showError ? \"h-auto\" : \"\"\n )}\n >\n <HawaAlert\n title={props.errorTitle}\n text={props.errorText}\n severity=\"error\"\n />\n </div> */}\n {props.showError && (\n <HawaAlert\n title={props.errorTitle}\n text={props.errorText}\n severity=\"error\"\n />\n )}\n {props.signInType === \"email\" ? (\n <Controller\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n autoComplete=\"email\"\n label={props.texts.emailLabel}\n helpertext={errors.email?.message}\n placeholder={props.texts.emailPlaceholder}\n value={field.value ?? \"\"}\n onChange={field.onChange}\n />\n )}\n rules={{\n required: props.texts.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts.emailInvalidText,\n },\n }}\n />\n ) : props.signInType === \"username\" ? (\n <Controller\n control={control}\n name=\"username\"\n render={({ field }) => {\n return (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n autoComplete=\"username\"\n label={props.texts.usernameLabel}\n helpertext={errors.username?.message}\n placeholder={props.texts.usernamePlaceholder}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )\n }}\n rules={{\n required: props.texts.usernameRequired,\n }}\n />\n ) : (\n <Controller\n control={control}\n name=\"phone\"\n render={({ field }) => <HawaPhoneInput label=\"Phone number\" />}\n rules={{ required: props.texts.phoneRequiredText }}\n />\n )}\n {props.signInType !== \"phone\" && (\n <>\n <Controller\n control={control}\n name=\"password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n autoComplete=\"current-password\"\n type=\"password\"\n label={props.texts.passwordLabel}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.passwordRequiredText,\n minLength: 5,\n }}\n />\n {!props.withoutResetPassword && (\n <div\n onClick={props.handleForgotPassword}\n className=\"mb-3 w-fit cursor-pointer text-xs dark:text-gray-300\"\n >\n {props.texts.forgotPasswordText}\n </div>\n )}\n </>\n )}\n\n <Button className=\"mt-4 w-full\" isLoading={props.isLoading}>\n {props.texts.signInText}\n </Button>\n {!props.withoutSignUp && (\n <div className=\"p-3 text-center text-sm font-normal dark:text-gray-300\">\n {props.texts.newUserText}{\" \"}\n <span\n onClick={props.handleRouteToSignUp}\n className=\"clickable-link\"\n >\n {props.texts.createAccount}\n </span>\n </div>\n )}\n </form>\n </CardContent>\n\n {/* 3rd Party Sign Auth Buttons */}\n {props.viaGithub || props.viaGoogle || props.viaTwitter ? (\n <CardFooter\n className={cn(\n props.logosOnly ? \"flex flex-row gap-2 justify-center\" : \"grid grid-cols-1 gap-2\"\n )}\n >\n {props.viaGoogle && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGoogleSignIn}\n >\n <Icons.google className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signInViaGoogleLabel}\n </Button>\n )}\n {props.viaGithub && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGithubSignIn}\n >\n <Icons.gitHub className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signInViaGithubLabel}\n </Button>\n )}\n {props.viaTwitter && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleTwitterSignIn}\n >\n <Icons.twitter className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signInViaTwitterLabel}\n </Button>\n )}\n </CardFooter>\n ) : null}\n </Card>\n <InterfaceSettings\n currentColorMode={props.currentColorMode}\n currentLanguage={props.currentLanguage}\n handleColorMode={props.handleColorMode}\n handleLanguage={props.handleLanguage}\n />\n </div>\n )\n}\n\ntype SignInFormTypes = {\n handleLanguage?: () => void\n currentLanguage?: any\n handleColorMode?: () => void\n currentColorMode?: any\n logosOnly?: boolean\n direction?: \"rtl\" | \"ltr\"\n showError?: any\n errorTitle?: string\n errorText?: string\n signInType?: \"email\" | \"username\" | \"phone\"\n texts?: {\n emailLabel?: string\n emailPlaceholder?: string\n emailRequiredText?: string\n emailInvalidText?: string\n usernameLabel?: string\n usernamePlaceholder?: string\n usernameRequired?: string\n phoneRequiredText?: string\n passwordLabel?: string\n passwordPlaceholder?: string\n passwordRequiredText?: string\n forgotPasswordText?: string\n newUserText?: string\n createAccount?: string\n signInText?: string\n signInViaGoogleLabel?: string\n signInViaGithubLabel?: string\n signInViaTwitterLabel?: string\n }\n withoutResetPassword?: boolean\n withoutSignUp?: boolean\n /**\n *show spinner if true\n */\n isLoading?: any\n viaGoogle?: boolean\n viaGithub?: boolean\n viaTwitter?: boolean\n /**\n * Handle the sign in .\n */\n handleSignIn?: (e: any) => void\n /**\n * Handle routing to sign up page\n */\n handleRouteToSignUp?: () => void\n handleForgotPassword?: () => void\n handleGoogleSignIn?: () => void\n handleGithubSignIn?: () => void\n handleTwitterSignIn?: () => void\n}\n","import { Icons } from \"../../elements/Icons\"\nimport { Button } from \"../../elements/Button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { Input } from \"../../elements/Input\"\nimport { Label } from \"../../elements/Label\"\n\nexport function SignInBlock() {\n return (\n <Card>\n <CardHeader className=\"space-y-1\">\n <CardTitle className=\"text-2xl\">Create an account</CardTitle>\n <CardDescription>\n Enter your email below to create your account\n </CardDescription>\n </CardHeader>\n <CardContent className=\"grid gap-4\">\n <div className=\"grid grid-cols-2 gap-6\">\n <Button variant=\"outline\">\n <Icons.gitHub className=\"mr-2 h-4 w-4\" />\n Github\n </Button>\n <Button variant=\"outline\">\n <Icons.google className=\"mr-2 h-4 w-4\" />\n Google\n </Button>\n </div>\n <div className=\"relative\">\n <div className=\"absolute inset-0 flex items-center\">\n <span className=\"w-full border-t\" />\n </div>\n <div className=\"relative flex justify-center text-xs uppercase\">\n <span className=\"bg-background px-2 text-muted-foreground\">\n Or continue with\n </span>\n </div>\n </div>\n <div className=\"grid gap-2\">\n <Label htmlFor=\"email\">Email</Label>\n <Input id=\"email\" type=\"email\" placeholder=\"m@example.com\" />\n </div>\n <div className=\"grid gap-2\">\n <Label htmlFor=\"password\">Password</Label>\n <Input id=\"password\" type=\"password\" />\n </div>\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\">Create account</Button>\n </CardFooter>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport {\n HawaTextField,\n InterfaceSettings,\n HawaAlert,\n HawaCheckbox,\n HawaSelect,\n} from \"../../elements\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\nimport { Icons } from \"../../elements/Icons\"\nimport { cn } from \"../../util\"\n\ntype SignUpFormTypes = {\n handleLanguage?: () => void\n currentLanguage?: any\n handleColorMode?: () => void\n currentColorMode?: any\n direction?: \"rtl\" | \"ltr\"\n logosOnly?: boolean\n texts: {\n fullNameLabel: string\n fullNamePlaceholder: string\n fullNameRequiredText: string\n emailLabel: string\n emailPlaceholder: string\n emailRequiredText: string\n emailInvalidText: string\n usernameLabel: string\n usernamePlaceholder: string\n usernameRequired: string\n passwordLabel: string\n passwordPlaceholder: string\n passwordRequiredText: string\n passwordTooShortText: string\n confirmPasswordLabel: string\n confirmPasswordPlaceholder: string\n subscribeToNewsletter: string\n forgotPasswordText: string\n termsText: string\n iAcceptText: string\n termsRequiredText: string\n newUserText: string\n signUpText: string\n signInText: string\n existingUserText: string\n signUpViaGoogleLabel: string\n signUpViaGithubLabel: string\n signUpViaTwitterLabel: string\n refCode: string\n }\n showUserSource: any\n viaGoogle: boolean\n viaGithub: boolean\n viaTwitter: boolean\n showNewsletterOption: boolean\n showRefCode: boolean\n showTermsOption: boolean\n handleSignUp: (e: any) => void\n handleRouteToSignIn: () => void\n handleGoogleSignUp: () => void\n handleGithubSignUp: () => void\n handleTwitterSignUp: () => void\n handleRouteToTOS: () => void\n showError: any\n errorTitle: any\n errorText: any\n signUpFields: any[]\n isLoading?: boolean\n}\n\nexport const SignUpForm: FC<SignUpFormTypes> = (props) => {\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n return (\n <div className=\"flex flex-col gap-4\">\n <Card dir={props.direction}>\n <CardContent headless>\n <div>\n {props.showError && (\n <HawaAlert\n title={props.errorTitle}\n text={props.errorText}\n severity=\"error\"\n />\n )}\n <FormProvider {...methods}>\n <form onSubmit={handleSubmit((e) => props.handleSignUp(e))}>\n <div>\n {props.signUpFields.map((fld, i) => {\n if (fld === \"fullname\") {\n return (\n <Controller\n key={i}\n control={control}\n name=\"fullName\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts.fullNameLabel}\n placeholder={props.texts.fullNamePlaceholder}\n helpertext={errors.fullName?.message}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.fullNameRequiredText,\n }}\n />\n )\n }\n if (fld === \"email\") {\n return (\n <Controller\n key={i}\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n autoComplete=\"email\"\n label={props.texts.emailLabel}\n helpertext={errors.email?.message}\n placeholder={props.texts.emailPlaceholder}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts.emailInvalidText,\n },\n }}\n />\n )\n }\n if (fld === \"username\") {\n return (\n <Controller\n key={i}\n control={control}\n name=\"username\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n autoComplete=\"username\"\n label={props.texts.usernameLabel}\n helpertext={errors.username?.message}\n placeholder={props.texts.usernamePlaceholder}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.usernameRequired,\n }}\n />\n )\n }\n })}\n </div>\n <Controller\n control={control}\n name=\"password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n autoComplete=\"new-password\"\n // defaultValue={field.value ?? \"\"}\n label={props.texts.passwordLabel}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{ required: props.texts.passwordRequiredText }}\n />\n <Controller\n control={control}\n name=\"confirm_password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n autoComplete=\"new-password\"\n // defaultValue={field.value ?? \"\"}\n label={props.texts.confirmPasswordLabel}\n placeholder={props.texts.confirmPasswordPlaceholder}\n helpertext={errors.confirm_password?.message}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{ required: props.texts.passwordRequiredText }}\n />\n {props.showRefCode && (\n <Controller\n control={control}\n name=\"refCode\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n // defaultValue={field.value ?? \"\"}\n label={props.texts.refCode}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n value={field.value ?? \"\"}\n onChange={field.onChange}\n />\n )}\n />\n )}\n {props.showUserSource && (\n <div>\n <Controller\n control={control}\n name=\"reference\"\n render={({ field }) => (\n <HawaSelect\n label=\"How did you learn about us?\"\n isCreatable={false}\n isMulti={false ?? false}\n isSearchable={false}\n isClearable={false ?? false}\n options={[\n { value: \"friend\", label: \"From a friend\" },\n { value: \"ad\", label: \"Advertisement\" },\n { value: \"other\", label: \"Other\" },\n ]}\n onChange={(e: any) => {\n field.onChange(e.value)\n }}\n />\n )}\n />\n </div>\n )}\n {props.showTermsOption && (\n <Controller\n control={control}\n name=\"terms_accepted\"\n render={({ field }) => (\n <HawaCheckbox\n id=\"terms_accepted\"\n helperText={errors.terms_accepted?.message}\n onChange={(e) => field.onChange(e)}\n label={\n <span>\n {props.texts.iAcceptText}{\" \"}\n <a\n onClick={props.handleRouteToTOS}\n className=\"clickable-link\"\n >\n {props.texts.termsText}\n </a>\n </span>\n }\n />\n )}\n rules={{ required: props.texts.termsRequiredText }}\n />\n )}\n {props.showNewsletterOption && (\n <Controller\n control={control}\n name=\"newsletter_accepted\"\n render={({ field }) => (\n <HawaCheckbox\n id=\"newsletter_accepted\"\n label={props.texts.subscribeToNewsletter}\n onChange={field.onChange}\n />\n )}\n />\n )}\n\n <Button className=\"w-full\" isLoading={props.isLoading}>\n {props.texts.signUpText}\n </Button>\n </form>\n </FormProvider>\n <div className=\"flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-normal dark:text-white\">\n <span>{props.texts.existingUserText}</span>\n <span\n onClick={props.handleRouteToSignIn}\n className=\"clickable-link\"\n >\n {props.texts.signInText}\n </span>\n </div>\n </div>\n </CardContent>\n\n {props.viaGithub || props.viaGoogle || props.viaTwitter ? (\n <CardFooter\n className={cn(\n props.logosOnly\n ? \"flex flex-row justify-center gap-2\"\n : \"grid grid-cols-1 gap-2\"\n )}\n >\n {props.viaGoogle && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGoogleSignUp}\n >\n <Icons.google className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signUpViaGoogleLabel}\n </Button>\n )}\n {props.viaGithub && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGithubSignUp}\n >\n <Icons.gitHub className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signUpViaGithubLabel}\n </Button>\n )}\n {props.viaTwitter && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleTwitterSignUp}\n >\n <Icons.twitter className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signUpViaTwitterLabel}\n </Button>\n )}\n </CardFooter>\n ) : null}\n </Card>\n <InterfaceSettings\n currentColorMode={props.currentColorMode}\n currentLanguage={props.currentLanguage}\n handleColorMode={props.handleColorMode}\n handleLanguage={props.handleLanguage}\n />\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { HawaTextField, HawaAlert } from \"../../elements\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype NewPasswordTypes = {\n handleNewPassword: () => void\n direction?: \"rtl\" | \"ltr\"\n headless?: boolean\n passwordChanged: any\n texts: {\n passwordPlaceholder: string\n updatePassword: string\n passwordRequiredText: string\n passwordLabel: string\n confirmPasswordPlaceholder: string\n confirmPasswordLabel: string\n confirmPasswordRequiredText: string\n passwordMatchError: string\n passwordChanged: string\n }\n}\n\nexport const NewPasswordForm: FC<NewPasswordTypes> = (props) => {\n const [matchError, setMatchError] = useState(false)\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n const handleSubmission = (e: any) => {\n if (e.password === e.confirmPassword) {\n props.handleNewPassword()\n } else {\n setMatchError(true)\n }\n }\n\n return (\n <Card dir={props.direction}>\n {matchError && (\n <HawaAlert text={props.texts.passwordMatchError} severity=\"error\" />\n )}\n {props.passwordChanged ? (\n <CardContent headless>\n <div className=\"text-center\">{props.texts.passwordChanged}</div>\n </CardContent>\n ) : (\n <FormProvider {...methods}>\n <form onSubmit={handleSubmit(handleSubmission)}>\n {!props.headless && (\n <CardHeader>\n <CardTitle>Create Password</CardTitle>\n <CardDescription>\n Set a new password for your account\n </CardDescription>\n </CardHeader>\n )}\n <CardContent headless={props.headless}>\n <Controller\n control={control}\n name=\"password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n autoComplete=\"new-password\"\n label={props.texts.passwordLabel}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.passwordRequiredText,\n }}\n />\n <Controller\n control={control}\n name=\"confirmPassword\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n autoComplete=\"new-password\"\n label={props.texts.confirmPasswordLabel}\n placeholder={props.texts.confirmPasswordPlaceholder}\n helpertext={errors.confirmPassword?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.confirmPasswordRequiredText,\n }}\n />\n </CardContent>\n\n <CardFooter>\n <Button className=\"w-full\" type=\"submit\">\n {props.texts.updatePassword}\n </Button>\n </CardFooter>\n </form>\n </FormProvider>\n )}\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Controller, useForm } from \"react-hook-form\"\nimport { HawaTextField } from \"../../elements\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype ResetPasswordType = {\n handleResetPassword: () => void\n handleRouteToSignUp: () => void\n sent: any\n texts?: {\n emailLabel: string\n emailPlaceholder: string\n emailRequiredText: string\n emailInvalidText: string\n emailSentText: string\n resetPassword: string\n signUpText: string\n dontHaveAccount: string\n }\n headless?: boolean\n direction?: \"rtl\" | \"ltr\"\n}\n\nexport const ResetPasswordForm: FC<ResetPasswordType> = (props) => {\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n register,\n control,\n } = methods\n return (\n <Card dir={props.direction}>\n {!props.sent ? (\n <>\n {!props.headless && (\n <CardHeader>\n <CardTitle>Reset Password</CardTitle>\n <CardDescription>\n Enter your email to reset your account password\n </CardDescription>\n </CardHeader>\n )}\n <form onSubmit={handleSubmit(props.handleResetPassword)}>\n <CardContent headless={props.headless}>\n <Controller\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.emailLabel}\n helpertext={errors.email?.message}\n placeholder={props.texts?.emailPlaceholder}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts?.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts?.emailInvalidText,\n },\n }}\n />\n <div className=\"pb-2 text-start text-sm dark:text-gray-300\">\n {props.texts?.dontHaveAccount ?? \"Don't have an account? \"}\n <span\n onClick={props.handleRouteToSignUp}\n className=\"clickable-link\"\n >\n {props.texts?.signUpText ?? \"Sign Up\"}\n </span>\n </div>\n </CardContent>\n <CardFooter>\n <Button type=\"submit\" className=\"w-full\">\n {props.texts?.resetPassword}\n </Button>\n </CardFooter>\n </form>\n </>\n ) : (\n <CardContent headless>\n <div className=\"text-center\">{props.texts?.emailSentText}</div>\n </CardContent>\n )}\n </Card>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { HawaAlert, HawaPinInput } from \"../../elements\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype TConfirmation = {\n showError?: any\n errorTitle?: any\n errorText?: any\n texts?: {\n checkYourPhone: string\n weSentCode: string\n didntGetCode: string\n resendCode: string\n codeLabel: string\n codePlaceholder: string\n codeRequiredText: string\n confirm: string\n cancel: string\n }\n phoneNumber?: string\n submitConfirmation?: any\n handleSignIn?: any\n}\n\nexport const CodeConfirmation: FC<TConfirmation> = (props) => {\n const [pins, setPins] = useState(null)\n return (\n <Card>\n <CardContent headless>\n {props.showError && (\n <HawaAlert\n title={props.errorTitle}\n text={props.errorText}\n severity=\"error\"\n />\n )}\n <div className=\"mb-4 dark:text-white\">\n <div className=\"text-lg font-bold\">\n {props.texts.checkYourPhone ?? \"Please check your phone\"}\n </div>\n <div className=\"text-muted-foreground\">\n <span>{props.texts.weSentCode ?? \"We've sent a code to \"}</span>\n <span>{props.phoneNumber}</span>\n </div>{\" \"}\n </div>\n <form\n onSubmit={(e) => {\n e.preventDefault()\n if (pins) {\n props.submitConfirmation(pins)\n }\n }}\n >\n <HawaPinInput width=\"full\" digits={6} getPins={(e) => setPins(e)} />\n <div className=\" py-2 text-center text-xs text-muted-foreground\">\n <span>{props.texts.didntGetCode ?? \"Didn't get the code?\"}</span>{\" \"}\n <span className=\"clickable-link\">\n {props.texts.resendCode ?? \"Click to resend\"}\n </span>\n </div>\n <div className=\"mt-4 grid grid-cols-2 gap-2\">\n <Button variant=\"secondary\">\n {props.texts.cancel ?? \"Cancel\"}\n </Button>\n <Button>{props.texts.confirm ?? \"Confirm\"}</Button>\n </div>\n </form>\n </CardContent>\n </Card>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { HawaAlert, HawaPinInput } from \"../../elements\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype CheckEmailBlocks = {\n texts?: {\n checkEmail: string\n resendEmail: string\n pleaseVerify: string\n }\n handleResend?: () => void\n}\n\nexport const CheckEmail: FC<CheckEmailBlocks> = ({ texts, handleResend }) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"flex flex-col items-center justify-center text-center\">\n <div className=\"flex h-16 w-16 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground\">\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n height=\"0.5em\"\n width=\"0.5em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n // {...props}\n >\n <path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"></path>\n <polyline points=\"22,6 12,13 2,6\"></polyline>\n </svg>\n </div>\n <div className=\"m-2 text-xl font-bold\">\n {texts?.checkEmail ?? \"Check you email\"}\n </div>\n\n <div className=\"text-sm\">\n {texts?.pleaseVerify ??\n \"Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account.\"}\n </div>\n </div>\n </CardContent>\n <CardFooter className=\"flex flex-col justify-center \">\n <span className=\"clickable-link text-sm\" onClick={handleResend}>\n {texts?.resendEmail ?? \"Resend Email\"}\n </span>\n </CardFooter>\n </Card>\n )\n}\n","import React, { FC, useState } from \"react\"\nimport { Button } from \"../../elements\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { cn } from \"../../util\"\n\ntype SelectPaymentTypes = {\n viaMada: boolean\n viaWallet: boolean\n viaSTCPay: boolean\n viaPayPal: boolean\n viaApplePay: boolean\n viaCreditCard: boolean\n viaGooglePay: boolean\n madaLabel: string\n stcPayLabel: string\n paypalLabel: string\n walletLabel: string\n applePayLabel: string\n visaMasterLabel: string\n googlePayLabel: string\n handleContinue: (string) => void\n}\n\nexport const SelectPayment: FC<SelectPaymentTypes> = (props) => {\n const [selectedMethod, setSelectedMethod] = useState(\"\")\n return (\n <Card>\n <CardHeader>\n <CardTitle>Choose Payment Method</CardTitle>\n <CardDescription>\n And you'll be directed to the next step to complete the payment\n </CardDescription>\n </CardHeader>\n <CardContent className=\"grid grid-cols-2 gap-4\">\n <Button\n className={cn(\n \"flex w-full flex-col gap-2 pt-6\",\n selectedMethod === \"mada\" && \"outline outline-4 outline-primary\"\n )}\n variant=\"outline\"\n size=\"heightless\"\n disabled={!props.viaMada}\n onClick={() => setSelectedMethod(\"mada\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png\"\n className=\"h-6\"\n />\n <span>{props.madaLabel}</span>\n </Button>\n\n <Button\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"apple-pay\" &&\n \"outline outline-4 outline-primary\"\n )}\n variant=\"outline\"\n size=\"heightless\"\n disabled={!props.viaApplePay}\n onClick={() => setSelectedMethod(\"apple-pay\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png\"\n className=\"h-11\"\n />\n <span>{props.applePayLabel}</span>\n </Button>\n\n <Button\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"visa-master\" &&\n \"outline outline-4 outline-primary\"\n )}\n variant=\"outline\"\n size=\"heightless\"\n disabled={!props.viaCreditCard}\n onClick={() => setSelectedMethod(\"visa-master\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png\"\n className=\"h-6\"\n />\n <span>{props.visaMasterLabel}</span>\n </Button>\n\n <Button\n variant=\"outline\"\n size=\"heightless\"\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"wallet\" && \"outline outline-4 outline-primary\"\n )}\n disabled={!props.viaWallet}\n onClick={() => setSelectedMethod(\"wallet\")}\n >\n <svg\n version=\"1.1\"\n fill=\"currentColor\"\n viewBox=\"0 0 223 223\"\n className=\"h-6 w-6\"\n >\n <g>\n <path\n d=\"M223,94.5c0-6.075-4.925-11-11-11h-63c-6.075,0-11,4.925-11,11v33c0,6.075,4.925,11,11,11h63c6.075,0,11-4.925,11-11V94.5z\n M169.515,123.967c-7.082,0-12.823-5.741-12.823-12.823c0-7.082,5.741-12.823,12.823-12.823c7.082,0,12.823,5.741,12.823,12.823\n C182.338,118.225,176.597,123.967,169.515,123.967z\"\n />\n <path\n d=\"M123.509,68.5H205v-33c0-8.271-6.395-15-14.667-15h-175C7.062,20.5,0,27.229,0,35.5v152c0,8.271,7.062,15,15.333,15h175\n c8.271,0,14.667-6.729,14.667-15v-34h-81.342L123.509,68.5z\"\n />\n </g>\n </svg>\n <span>{props.walletLabel}</span>\n </Button>\n <Button\n variant=\"outline\"\n size=\"heightless\"\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"stc-pay\" && \"outline outline-4 outline-primary\"\n )}\n disabled={!props.viaSTCPay}\n onClick={() => setSelectedMethod(\"stc-pay\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png\"\n className=\"h-6\"\n />\n <span>{props.stcPayLabel}</span>\n </Button>\n\n <Button\n variant=\"outline\"\n size=\"heightless\"\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"google-pay\" &&\n \"outline outline-4 outline-primary\"\n )}\n disabled={!props.viaGooglePay}\n onClick={() => setSelectedMethod(\"google-pay\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png\"\n className=\"h-6\"\n />\n <span>{props.googlePayLabel}</span>\n </Button>\n <Button\n variant=\"outline\"\n size=\"heightless\"\n className={cn(\n \"col-span-2 flex w-full flex-col gap-2\",\n selectedMethod === \"paypal\" && \"outline outline-4 outline-primary\"\n )}\n disabled={!props.viaPayPal}\n onClick={() => setSelectedMethod(\"paypal\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png\"\n className=\"h-6\"\n />\n <span>{props.paypalLabel}</span>\n </Button>\n </CardContent>\n <CardFooter>\n <Button\n onClick={() => props.handleContinue(selectedMethod)}\n className=\"w-full\"\n disabled={!selectedMethod}\n >\n Continue\n </Button>\n </CardFooter>\n </Card>\n )\n}\n","import React, { FC, useEffect, useState } from \"react\"\nimport { HawaTextField } from \"../../elements\"\nimport { Controller, useForm } from \"react-hook-form\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype CreditCardFormTypes = {\n handle: any\n handlePayWithCreditCard: any\n}\n\nexport const CreditCardForm: FC<CreditCardFormTypes> = (props) => {\n const [cardNumber, setCardNumber] = useState(\"\")\n const [cardType, setCardType] = useState(\"\")\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n const getCardType = (card_bin) => {\n const visa_regex = /^4[0-9]{0,15}$/m\n const mastercard_regex = /^5$|^5[0-5][0-9]{0,16}$/m\n const amex_regex = /^3$|^3[47][0-9]{0,13}$/m\n const mada_regex =\n /^(440647|440795|446404|457865|968208|457997|474491|636120|417633|468540|468541|468542|468543|968201|446393|409201|458456|484783|462220|455708|410621|455036|486094|486095|486096|504300|440533|489318|489319|445564|968211|410685|406996|432328|428671|428672|428673|968206|446672|543357|434107|407197|407395|412565|431361|604906|521076|529415|535825|543085|524130|554180|549760|968209|524514|529741|537767|535989|536023|513213|520058|558563|588982|589005|531095|530906|532013|968204|422817|422818|422819|428331|483010|483011|483012|589206|968207|419593|439954|530060|531196|420132)/\n const meeza_regex =\n /^507803[0-6][0-9]|507808[3-9][0-9]|507809[0-9][0-9]|507810[0-2][0-9]/\n let card_type = \"visa\"\n if (card_bin.replace(/[^\\d]/g, \"\").match(mada_regex)) {\n card_type = \"mada\"\n } else if (card_bin.replace(/[^\\d]/g, \"\").match(meeza_regex)) {\n card_type = \"meeza\"\n } else if (card_bin.replace(/[^\\d]/g, \"\").match(visa_regex)) {\n card_type = \"visa\"\n } else if (card_bin.replace(/[^\\d]/g, \"\").match(mastercard_regex)) {\n card_type = \"mastercard\"\n } else if (card_bin.replace(/[^\\d]/g, \"\").match(amex_regex)) {\n card_type = \"amex\"\n }\n return card_type\n }\n const onCardNumberChange = (event) => {\n let { value, name } = event.target\n let cardNumber = value\n value = value.replace(/\\D/g, \"\")\n if (/^3[47]\\d{0,13}$/.test(value)) {\n cardNumber = value\n .replace(/(\\d{4})/, \"$1 \")\n .replace(/(\\d{4}) (\\d{6})/, \"$1 $2 \")\n } else if (/^3(?:0[0-5]|[68]\\d)\\d{0,11}$/.test(value)) {\n // diner's club, 14 digits\n cardNumber = value\n .replace(/(\\d{4})/, \"$1 \")\n .replace(/(\\d{4}) (\\d{6})/, \"$1 $2 \")\n } else if (/^\\d{0,16}$/.test(value)) {\n // regular cc number, 16 digits\n cardNumber = value\n .replace(/(\\d{4})/, \"$1 \")\n .replace(/(\\d{4}) (\\d{4})/, \"$1 $2 \")\n .replace(/(\\d{4}) (\\d{4}) (\\d{4})/, \"$1 $2 $3 \")\n }\n console.log(\"card number is \", cardNumber.trimRight())\n setCardNumber(cardNumber.trimRight())\n // onUpdateState(name, cardNumber);\n }\n useEffect(() => {\n let cardTypeSlug = getCardType(cardNumber)\n setCardType(cardTypeSlug)\n })\n return (\n <Card>\n <form onSubmit={handleSubmit(props.handle)}>\n <CardContent headless>\n <div className=\"flex flex-row gap-4\">\n <Controller\n control={control}\n name=\"cardNumber\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n name=\"cardNumber\"\n placeholder=\"1234 1234 1234 1234\"\n type=\"number\"\n onChange={onCardNumberChange}\n // onChange={(e) => setCardNumber(e.target.value)}\n label=\"Card Number\"\n helpertext={errors.password?.message}\n iconInside={\n <img\n src={`https://sikka-images.s3.ap-southeast-1.amazonaws.com/payment-symbols/borderless/${cardType}.png`}\n alt=\"\"\n className=\"h-8\"\n />\n }\n />\n )}\n rules={{\n required: \"Card Number is rquired\",\n }}\n />\n <div className=\"w-1/4\">\n <Controller\n control={control}\n name=\"cardCVC\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n name=\"cardCVC\"\n maxLength=\"3\"\n autoComplete=\"cc-number\"\n placeholder=\"CVC\"\n type=\"number\"\n label=\"CVC\"\n helpertext={errors.password?.message}\n />\n )}\n rules={{\n required: \"Password is rquired\",\n }}\n />\n </div>\n </div>\n\n <Controller\n control={control}\n name=\"cardExpiry\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n name=\"cardExpiry\"\n placeholder=\"MM / YY\"\n type=\"password\"\n label=\"Expiry Date\"\n helpertext={errors.password?.message}\n />\n )}\n rules={{\n required: \"Password is rquired\",\n }}\n />\n <Controller\n control={control}\n name=\"cardName\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n name=\"cardName\"\n // placeholder=\"Enter password\"\n type=\"text\"\n label=\"Name on card\"\n helpertext={errors.password?.message}\n />\n )}\n rules={{\n required: \"Card holder name is rquired\",\n }}\n />\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\" onClick={props.handlePayWithCreditCard}>\n Pay with Credit Card\n </Button>\n </CardFooter>\n </form>\n </Card>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\nimport { Input } from \"../../elements/Input\"\n\ntype ChargeWalletTypes = {\n currency: any\n handleChargeWallet: any\n texts: {\n amountLabel: string\n amountRequired: string\n chargeWallet: string\n }\n}\nexport const ChargeWalletForm: FC<ChargeWalletTypes> = (props) => {\n const [walletAmount, setWalletAmount] = useState(0)\n\n return (\n <Card>\n <CardContent headless>\n <div className=\"p-4 text-center\">\n <div className=\" text-5xl font-extrabold\">\n {Number(walletAmount).toLocaleString(\"en\") || \"0\"}\n </div>\n <div className=\"text-sm font-normal\">{props.currency || \"SAR\"}</div>\n </div>\n <div className=\"mb-2 flex w-full flex-col gap-4 text-center\">\n <div className=\"mb-2 flex w-full flex-row gap-4 text-center\">\n <Button variant=\"outline\" className=\"h-full w-full\">\n 10 SAR\n </Button>\n <Button variant=\"outline\" className=\"h-full w-full\">\n 50 SAR\n </Button>\n <Button variant=\"outline\" className=\"h-full w-full\">\n 100 SAR\n </Button>\n </div>\n\n <Input placeholder=\"Custom Amount\" type=\"number\" name=\"amount\" />\n </div>\n {/* <FormProvider {...methods}>\n <form onSubmit={handleSubmit(props.handleChargeWallet)}>\n <Controller\n control={control}\n name=\"amount\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n placeholder={props.texts.amountLabel}\n type=\"number\"\n {...field}\n value={field.value ?? \"\"}\n inputProps={{\n inputMode: \"numeric\",\n min: \"1\",\n max: \"9999999\",\n step: \"0.01\",\n }}\n onChange={(e: any) => {\n field.onChange(parseFloat(e.target.value))\n setWalletAmount(e.target.value)\n }}\n helpertext={errors.amount?.message}\n />\n )}\n rules={{\n required: props.texts.amountRequired,\n }}\n />\n\n \n </form>\n </FormProvider> */}\n <Button className=\"mt-6 w-full\">{props.texts.chargeWallet}</Button>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype PayWithWalletTypes = {\n walletBalance: any\n currency: any\n handlePayWithWallet: any\n}\nexport const PayWithWallet: FC<PayWithWalletTypes> = (props) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"text-center text-5xl font-extrabold\">\n {props.walletBalance || \"0\"}\n <div className=\"text-sm font-normal\">{props.currency || \"SAR\"}</div>\n </div>\n <Button className=\"mt-6 w-full\" onClick={props.handlePayWithWallet}>\n Pay Now\n </Button>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaTextField, HawaTable, HawaSelect } from \"../../elements\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport countries from \"../../countries\"\nimport {\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype CheckoutFormTypes = {\n lang: string\n products: any\n total: any\n handlePayNow: any\n countriesList: any\n texts: {\n orderDetails: string\n billingAddress: string\n payNow: string\n emailLabel: string\n emailRequiredText: string\n emailInvalidText: string\n firstNameLabel: string\n required: string\n lastNameLabel: string\n streetAddressLabel: string\n buildingNumberLabel: string\n cityLabel: string\n stateLabel: string\n countryLabel: string\n zipCodeLabel: string\n }\n}\n\nexport const CheckoutForm: FC<CheckoutFormTypes> = (props) => {\n let isArabic = props.lang === \"ar\"\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n register,\n control,\n } = methods\n\n let containerStyle = {\n display: \"flex\",\n padding: 0,\n paddingRight: \"0px !important\",\n paddingLeft: \"0px !important\",\n flexDirection: {\n xs: \"column\",\n sm: \"row\",\n md: \"row\",\n lg: \"row\",\n xl: \"row\",\n },\n }\n return (\n <Card>\n <CardHeader>\n <CardTitle>{props.texts.orderDetails}</CardTitle>\n </CardHeader>\n <CardContent>\n <div>\n <div className=\"rounded border border-gray-300\">\n <HawaTable\n pagination={false}\n direction={isArabic ? \"rtl\" : \"ltr\"}\n columns={[\n { hidden: false, value: \"Product\" },\n { hidden: true, value: \"ID\" },\n { hidden: false, value: \"Price\" },\n ]}\n borders=\"inner\"\n rows={props.products}\n bordersWidth=\"1\"\n />\n </div>\n </div>\n </CardContent>\n <CardHeader>\n <CardTitle>{props.texts.billingAddress}</CardTitle>\n </CardHeader>\n <form onSubmit={handleSubmit(props.handlePayNow)}>\n <CardContent>\n <div>\n <FormProvider {...methods}>\n <div>\n <Controller\n control={control}\n name=\"firstName\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n type=\"text\"\n label={props.texts?.firstNameLabel + \" *\"}\n helpertext={errors.firstName?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n <div style={{ width: 20 }} />\n\n <Controller\n control={control}\n name=\"lastName\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.lastNameLabel + \" *\"}\n helpertext={errors.lastName?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n </div>\n <Controller\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.emailLabel + \" *\"}\n helpertext={errors.email?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts?.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts?.emailInvalidText,\n },\n }}\n />\n <div className=\"flex flex-col md:flex-row\">\n <Controller\n control={control}\n name=\"streetAddress\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.streetAddressLabel + \" *\"}\n helpertext={errors.streetAddress?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n </div>\n\n <div className=\"flex flex-col md:flex-row\">\n <Controller\n control={control}\n name=\"province\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.stateLabel + \" *\"}\n helpertext={errors.province?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n <div style={{ width: 20 }} />\n\n <Controller\n control={control}\n name=\"city\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.cityLabel + \" *\"}\n helpertext={errors.city?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n </div>\n <div className=\"flex flex-col md:flex-row\">\n <Controller\n control={control}\n name=\"buildingNumber\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.buildingNumberLabel + \" *\"}\n helpertext={errors.buildingNumber?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n <div style={{ width: 20 }} />\n <Controller\n control={control}\n name=\"zipCode\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"number\"\n label={props.texts?.zipCodeLabel + \" *\"}\n helpertext={errors.zipCode?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n {/* <div style={{ width: 20 }} /> */}\n </div>\n <div className=\"mb-3\">\n <Controller\n control={control}\n name=\"country\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaSelect\n native\n label={props.texts?.countryLabel + \" *\"}\n helperText={errors.country?.message}\n options={countries}\n getOptionLabel={(countries) => countries.country_label}\n onChange={(e) => field.onChange(e.country_label)}\n value={field.value ?? \"\"}\n >\n <option></option>\n {props.countriesList.map((country: any, i: any) => (\n <option key={i}>{country}</option>\n ))}\n </HawaSelect>\n )}\n />\n </div>\n </FormProvider>\n </div>\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\">{props.texts.payNow}</Button>\n </CardFooter>{\" \"}\n </form>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype ConfirmationPageTypes = {\n texts: {\n print: string\n history: string\n homePage: string\n successMessage: string\n orderDetails: string\n fasterPaymentNote: string\n yourOrderNumber: string\n emailLabel: string\n emailRequiredText: string\n emailInvalidText: string\n firstNameLabel: string\n required: string\n lastNameLabel: string\n streetAddressLabel: string\n buildingNumberLabel: string\n cityLabel: string\n stateLabel: string\n countryLabel: string\n zipCodeLabel: string\n refundPolicy: string\n }\n products: any\n countriesList: any\n lang: string\n total: string\n userEmail: string\n orderNumber: string\n confirmationTitle: string\n handleHome: any\n handlePrint: any\n handleHistory: any\n handleRefundPolicyLink: any\n}\n\nexport const ConfirmationPage: FC<ConfirmationPageTypes> = (props) => {\n let isArabic = props.lang === \"ar\"\n\n return (\n <Card>\n <CardContent headless>\n {\" \"}\n <div className=\"py-5 text-center text-3xl font-bold dark:text-white\">\n {props.confirmationTitle}\n </div>\n <div className=\"py-5 dark:text-white\">\n <div className=\"mb-2 text-center\">\n {props.texts.successMessage} <strong>{props.userEmail}</strong>\n </div>\n <div className=\"text-center\">{props.texts.yourOrderNumber}</div>\n <div className=\"text-center font-bold\">{props.orderNumber}</div>\n </div>\n {/* <div className=\"py-5\">\n <div className=\"mb-3 text-center text-xl font-semibold\">\n {props.texts.orderDetails}\n </div>\n {props.products && (\n <HawaTable\n direction={isArabic ? \"rtl\" : \"ltr\"}\n columns={[\n { hidden: false, value: \"Product\" },\n { hidden: false, value: \"Price\" },\n ]}\n rows={props.products}\n />\n )}\n </div> */}\n <div className=\"flex flex-col items-center justify-center gap-4 py-5 pt-0\">\n <Button className=\"w-full\" onClick={props.handlePrint}>\n {props.texts.print}\n </Button>\n <Button className=\"w-full\" onClick={props.handleHistory}>\n {props.texts.history}\n </Button>\n <Button className=\"w-full\" onClick={props.handleHome}>\n {props.texts.homePage}\n </Button>\n <div className=\" text-center text-sm dark:text-white\">\n {props.texts.fasterPaymentNote}\n </div>\n <a\n className=\"clickable-link text-xs\"\n onClick={props.handleRefundPolicyLink}\n >\n {props.texts.refundPolicy}\n </a>\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaPricingCard, HawaRadio } from \"../../elements\"\n\ntype PricingPlansTypes = {\n plans: [\n {\n direction: \"rtl\" | \"ltr\"\n features: [{ included: boolean; text: string }]\n price: number\n texts: {\n title: string\n subtitle: string\n buttonText: string\n cycleText: string\n currencyText: string\n }\n size: \"small\" | \"medium\" | \"large\"\n }\n ]\n currencies: [\n {\n label: string\n value: string\n }\n ]\n billingCycles: [\n {\n label: string\n value: string\n }\n ]\n onPlanClicked?: (e) => void\n currentCycle: {\n label: string\n value: string\n }\n currentCurrency: {\n label: string\n value: string\n }\n onCycleChange?: (e) => void\n onCurrencyChange?: (e) => void\n direction?: \"rtl\" | \"ltr\"\n}\nexport const PricingPlans: FC<PricingPlansTypes> = (props) => {\n return (\n <div>\n <div className=\"mb-2 flex w-full justify-between\">\n <HawaRadio\n design=\"tabs\"\n defaultValue={props.currentCycle}\n options={props.billingCycles}\n onChangeTab={(e: any) => props.onCycleChange(e)}\n />\n <HawaRadio\n design=\"tabs\"\n defaultValue={props.currentCurrency}\n options={props.currencies}\n onChangeTab={(e: any) => props.onCurrencyChange(e)}\n />\n </div>\n\n <div className=\"flex flex-row justify-between\">\n {props.plans.map((plan: any, index) => {\n return (\n <HawaPricingCard\n key={index}\n onPlanClicked={() => props.onPlanClicked(plan)}\n {...plan}\n texts={{\n ...plan.texts,\n currencyText: props.currentCurrency,\n cycleText: props.currentCycle,\n }}\n />\n )\n })}\n </div>\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { HawaRadio } from \"../../elements\"\nimport { Tooltip } from \"../../elements/Tooltip\"\n\nconst CheckMark = () => (\n <svg\n className=\"h-5 w-5 text-green-500\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n)\n\nconst UncheckMark = () => (\n <svg\n className=\"h-5 w-5 text-red-500\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n)\n\ntype ComparingPlansTypes = {\n plans: [\n {\n direction: \"rtl\" | \"ltr\"\n features: [{ included: boolean; text: string; description?: string }]\n price: number\n texts: {\n title: string\n subtitle: string\n buttonText: string\n cycleText: string\n currencyText: string\n }\n size: \"small\" | \"medium\" | \"large\"\n }\n ]\n currencies: [\n {\n label: string\n value: string\n }\n ]\n billingCycles: [\n {\n label: string\n value: string\n }\n ]\n onCycleChange?: (e) => void\n onCurrencyChange?: (e) => void\n direction?: \"rtl\" | \"ltr\"\n}\nexport const ComparingPlans: FC<ComparingPlansTypes> = (props) => {\n const [currentCurrency, setCurrentCurrency] = useState(\"sar\")\n const [currentCycle, setCurrentCycle] = useState(\"month\")\n\n return (\n <div id=\"detailed-pricing\" className=\"w-full overflow-x-auto\">\n <div className=\"mb-2 flex w-full justify-between\">\n <HawaRadio\n design=\"tabs\"\n defaultValue={currentCycle}\n options={props.billingCycles}\n onChangeTab={(e: any) => props.onCycleChange(e)}\n />\n <HawaRadio\n design=\"tabs\"\n defaultValue={currentCurrency}\n options={props.currencies}\n onChangeTab={(e: any) => props.onCurrencyChange(e)}\n />\n </div>\n <div className=\" overflow-hidden rounded\">\n <div className=\"grid grid-cols-4 gap-x-2 border-b border-t border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white\">\n <div className=\"flex items-center\"></div>\n {props.plans.map((plan: any) => (\n <div>\n <h5 className=\"text-md 0 font-bold text-gray-500 dark:text-gray-400\">\n {plan.texts.title}\n </h5>\n\n <div className=\" flex items-baseline text-gray-900 dark:text-white\">\n <>\n <span className=\"text-5xl font-extrabold tracking-tight\">\n {plan.price}\n </span>\n <span className=\"mx-1 text-sm font-semibold\">\n {plan.texts.currencyText}\n </span>\n </>\n <span className=\"ml-1 text-xl font-normal text-gray-500 dark:text-gray-400\">\n / {plan.texts.cycleText}\n </span>\n </div>\n <h5 className=\"text-md font-normal text-gray-500 dark:text-gray-400\">\n {plan.texts.subtitle}\n </h5>\n </div>\n ))}\n </div>\n {props.plans?.map((plan) => {\n return plan.features.map((feature) => {\n return (\n <div className=\"grid grid-cols-4 gap-x-16 border-b border-gray-200 px-4 py-5 text-sm text-gray-700 dark:border-gray-700\">\n <div className=\" flex flex-row items-center gap-2 text-gray-500 dark:text-gray-400\">\n {feature.text}\n {feature.description && (\n <Tooltip side=\"right\" content={feature.description}>\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z\"></path>\n </svg>\n </Tooltip>\n )}\n </div>\n <UncheckMark />\n <CheckMark />\n <UncheckMark />\n </div>\n )\n })\n })}\n </div>\n </div>\n )\n}\n","import React, { FC, useState } from \"react\"\nimport { HawaRadio } from \"../../elements\"\nimport clsx from \"clsx\"\n\ntype HorizontalPricingTypes = {\n plans: [\n {\n direction: \"rtl\" | \"ltr\"\n features: [{ included: boolean; text: string }]\n price: number\n texts: {\n title: string\n subtitle: string\n buttonText: string\n cycleText: string\n currencyText: string\n }\n size: \"small\" | \"medium\" | \"large\"\n }\n ]\n currencies: [\n {\n label: string\n value: string\n }\n ]\n billingCycles: [\n {\n label: string\n value: string\n }\n ]\n onPlanClicked?: (e) => void\n currentCycle: {\n label: string\n value: string\n }\n currentCurrency: {\n label: string\n value: string\n }\n onCycleChange?: (e) => void\n onCurrencyChange?: (e) => void\n direction?: \"rtl\" | \"ltr\"\n}\nexport const HorizontalPricing: FC<HorizontalPricingTypes> = (props) => {\n const [selectedCard, setSelectedCard] = useState(null)\n let data = [\n { title: \"basic\", price: \"$49\", cycle: \"/mo\" },\n { title: \"business\", price: \"$99\", cycle: \"/mo\" },\n { title: \"enterprise\", price: \"$149\", cycle: \"/mo\" },\n ]\n return (\n <div className=\"z-10 w-full max-w-screen-sm\">\n <div className=\"max-w-2xl \">\n <div className=\"flex flex-row justify-between\">\n <HawaRadio\n design=\"tabs\"\n options={props.currencies}\n defaultValue={props.currentCurrency}\n />\n <HawaRadio\n design=\"tabs\"\n options={props.billingCycles}\n defaultValue={props.currentCycle}\n />\n </div>\n {data.map((d) => (\n <label\n htmlFor={d.title}\n className=\"\"\n onClick={() => setSelectedCard(d.title)}\n >\n <input\n type=\"radio\"\n name=\"radio\"\n id={d.title}\n className=\"peer appearance-none\"\n />\n <div\n className={clsx(\n selectedCard === d.title ? \"peer-checked:border-blue-500\" : \"\",\n \"peer flex cursor-pointer items-center justify-between rounded-xl border bg-background px-5 py-4 shadow dark:text-white peer-checked:[&_.active]:block peer-checked:[&_.default]:hidden\"\n )}\n >\n <div className=\"peer flex items-center gap-4\">\n <CheckIcons />\n <CardText\n title=\"Enterprise\"\n subtitle=\"For startups and new businesses\"\n />\n </div>\n\n <CardPrice amount={d.price} cycle={d.cycle} />\n </div>\n </label>\n ))}\n </div>\n </div>\n )\n}\n\nconst CheckIcons = () => (\n <>\n <svg\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n className=\"default h-8 w-8 text-neutral-500\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"active hidden h-8 w-8 text-blue-500\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z\"\n />\n </svg>\n </>\n)\nconst CardText = (props) => (\n <div className=\"peer flex flex-col items-start \">\n <h2 className=\"font-medium text-neutral-700 dark:text-gray-100 sm:text-xl\">\n {props.title}\n </h2>\n <p className=\"text-sm text-neutral-500 dark:text-gray-300\">\n {props.subtitle}{\" \"}\n </p>\n </div>\n)\nconst CardPrice = (props) => (\n <h2 className=\"peer text-xl font-semibold text-neutral-900 dark:text-white sm:text-2xl\">\n {props.amount}\n <span className=\"text-base font-medium text-neutral-400\">\n {props.cycle}\n </span>\n </h2>\n)\n","import React, { FC } from \"react\"\n\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype ReferralAccount = {\n referralLink: string\n referralCode: string\n}\n\nexport const ReferralAccount: FC<ReferralAccount> = ({\n referralLink,\n referralCode,\n}) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"my-2 mt-0\">\n <div className=\"mb-1\">Referral Code</div>\n <div className=\"flex flex-row items-center justify-between rounded border bg-background\">\n <span className=\"ml-3 font-bold\">{referralCode}</span>\n <Button\n // tooltip=\"Copy\"\n // className=\"mr-1.5\"\n onClick={() => navigator.clipboard.writeText(referralCode)}\n >\n <span className=\"bg-red flex items-center justify-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z\"></path>\n </svg>{\" \"}\n </span>\n </Button>\n </div>\n </div>\n <div className=\"my-2 mt-0\">\n <div className=\"mb-1\">Referral Link</div>\n <div className=\"flex flex-row items-center justify-between rounded border bg-background\">\n <span className=\"ml-3 font-bold\">{referralLink}</span>\n <Button\n // className=\"mr-1.5\"\n onClick={() => navigator.clipboard.writeText(referralLink)}\n >\n <span className=\"bg-red flex items-center justify-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z\"></path>\n </svg>{\" \"}\n </span>\n </Button>\n </div>\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport {\n HawaAlert,\n HawaChip,\n HawaMenu,\n HawaSelect,\n HawaTextField,\n} from \"../../elements\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype TReferralSettlement = {\n referralLink: string\n referralCode: string\n withdrawError?: string\n}\n\nexport const ReferralSettlement: FC<TReferralSettlement> = ({\n referralLink,\n referralCode,\n withdrawError,\n}) => {\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n return (\n <Card>\n <CardContent headless>\n <div>\n <FormProvider {...methods}>\n <HawaTextField label={\"IBAN\"} />\n <HawaTextField label={\"Holder Name\"} />\n <Controller\n control={control}\n name=\"bank\"\n render={({ field }) => (\n <HawaSelect\n label=\"Bank\"\n isCreatable={false}\n isMulti={false ?? false}\n isSearchable={false}\n isClearable={false ?? false}\n options={[\n { value: \"snb\", label: \"Saudi National Bank\" },\n { value: \"bilad\", label: \"Al Bilad Bank\" },\n { value: \"rajihi\", label: \"Al Rajihi Bank\" },\n ]}\n onInputChange={(e: any, o: any) => console.log(\"changing\", e)}\n {...field}\n onChange={(e: any, o: any) => console.log(\"chooo\", e)}\n />\n )}\n />\n </FormProvider>\n </div>\n <div>\n <Button className=\"mt-6 w-full\">Add Bank Account</Button>\n </div>\n {withdrawError && (\n <div>\n <HawaAlert\n text={\n \"Sorry can't withdraw the money at the moment. Please try again in 2022/11/20\"\n }\n severity=\"warning\"\n />\n </div>\n )}\n <div className=\"mt-3\">\n <div className=\"mb-1\">Settlement Accounts</div>\n <div className=\"rounded\">\n <SettlementAccountCard\n bank=\"Al Inma Bank\"\n iban=\"SA10228094028098329119\"\n accountHolder=\"Zakher Masri\"\n default\n />\n <SettlementAccountCard\n bank=\"Al Rajihi Bank\"\n iban=\"SA10228094028098329119\"\n accountHolder=\"Zakher Masri\"\n />\n <SettlementAccountCard\n bank=\"Al Inma Bank\"\n iban=\"SA10228094028098329119\"\n accountHolder=\"Zakher Masri\"\n />\n </div>\n </div>\n </CardContent>\n </Card>\n )\n}\n\nconst SettlementAccountCard = (props) => {\n return (\n <div className=\"mb-3 flex flex-row items-center justify-between rounded border bg-background p-3\">\n <div className=\"flex flex-col justify-between\">\n <div className=\"text-xs\">{props.bank}</div>\n <div>{props.accountHolder}</div>\n <div className=\"text-xs\">{props.iban}</div>\n </div>\n <div className=\"flex flex-row items-center justify-center gap-2\">\n {props.default && (\n <HawaChip\n label=\"Default\"\n size=\"small\"\n // disabled\n // variant=\"outlined\"\n // size=\"xs\"\n // margins=\"none\"\n />\n )}\n\n <HawaMenu\n size=\"small\"\n menuItems={[\n [\n { label: \"Set Default\", disabled: props.default },\n { label: \"Edit\" },\n { label: \"Delete\" },\n ],\n ]}\n // position={direction === \"rtl\" ? \"right-bottom\" : \"left-bottom\"}\n // direction={direction}\n >\n <Button variant=\"outline\" size=\"icon\">\n <svg\n aria-label=\"Vertical Three Dots Menu Icon\"\n className=\"rotate-90\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z\"></path>\n </svg>\n </Button>\n </HawaMenu>\n </div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaAlert } from \"../../elements\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype TReferralStats = {\n referralLink: string\n referralCode: string\n withdrawError?: string\n}\n\nexport const ReferralStats: FC<TReferralStats> = ({\n referralLink,\n referralCode,\n withdrawError,\n}) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"mb-1\">Stats</div>\n <div className=\"justi flex flex-row gap-1\">\n <NumberCard title=\"Clicks\" number={22} />\n <NumberCard title=\"Sign-ups\" number={32} />\n <NumberCard title=\"Commission\" number={\"213.22 SAR\"} />\n </div>\n\n <Button className=\"mt-6 w-full\">Withdraw Money</Button>\n {withdrawError && (\n <div>\n <HawaAlert\n text={\n \"Sorry can't withdraw the money at the moment. Please try again in 2022/11/20\"\n }\n severity=\"warning\"\n />\n </div>\n )}\n <div className=\"mt-3\">\n <div className=\"mb-1\">Sign ups</div>\n <div className=\"rounded\">\n <ReferralSignUpCard\n date=\"2020/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n <ReferralSignUpCard\n date=\"2022/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n <ReferralSignUpCard\n date=\"2022/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n <ReferralSignUpCard\n date=\"2022/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n <ReferralSignUpCard\n date=\"2022/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n </div>\n </div>\n </CardContent>\n </Card>\n )\n}\n\nconst NumberCard = (props) => (\n <div className=\"w-full rounded border bg-background p-2\">\n <div className=\"text-sm\">{props.title}</div>\n <div className=\"font-bold\">{props.number}</div>\n </div>\n)\nconst ReferralSignUpCard = (props) => (\n <div className=\"mb-3 rounded border-b bg-background p-2\">\n <div className=\"text-xs\">{props.date}</div>\n <div className=\"flex flex-row justify-between\">\n <div>{props.email}</div>\n <div>{props.amount}</div>\n </div>\n </div>\n)\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype NotFoundTypes = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n texts?: {\n pageNotFound?: string\n ifLost?: string\n home?: string\n }\n}\n\nexport const NotFound: FC<NotFoundTypes> = ({\n variant = \"contained\",\n texts,\n}) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"flex flex-col items-center dark:text-white\">\n <div className=\"text-center text-6xl font-bold \">404</div>\n <div className=\"m-2 text-center text-xl font-bold \">\n {texts?.pageNotFound ?? \"Page Not Found\"}\n </div>\n <div className=\"mb-4 text-center\">\n {texts?.ifLost ?? (\n <>\n If you're lost please contact us{\" \"}\n <span className=\"clickable-link\">help@sikka.io</span>\n </>\n )}\n </div>\n <Button className=\"w-full\">{texts?.home ?? \"Home\"}</Button>\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype TEmptyState = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n onActionClick: () => void\n texts: {\n youreCaughtUp?: string\n actionText?: string\n }\n}\n\nexport const EmptyState: FC<TEmptyState> = ({\n variant = \"contained\",\n texts,\n onActionClick,\n}) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"flex flex-col items-center justify-center text-center \">\n <div className=\"flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"0.35em\"\n width=\"0.35em\"\n >\n <path d=\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\"></path>\n </svg>\n </div>\n <div className=\"m-2 text-xl font-bold\">\n {texts?.youreCaughtUp ?? \"You're all caught up\"}\n </div>\n </div>\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\" onClick={() => onActionClick()}>\n {texts?.actionText ?? \"Go Home\"}\n </Button>\n </CardFooter>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\n\ntype TEmptyState = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n}\n\nexport const Testimonial: FC<TEmptyState> = (props) => {\n return (\n <Card>\n <CardContent headless>\n <div>\n <p className=\"mb-4 max-w-sm\">\n The team at Sikka Software is simply amazing. The tech is easy to\n follow, easy to work with, and infinitely flexible. The solution\n opportunities created by Tines are endless.\n </p>\n </div>\n <div className=\"flex flex-row gap-4\">\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\">\n <rect width=\"48\" height=\"48\" rx=\"24\" fill=\"#45BE8B\"></rect>\n <path\n d=\"M14.1412 22.4427L17.5803 16.5199C17.7671 16.1981 18.1112 16 18.4834 16H20.8581C21.653 16 22.1565 16.8528 21.7725 17.5488L19.3042 22.0225C19.2202 22.1747 19.1762 22.3458 19.1762 22.5196C19.1762 23.0879 19.6369 23.5486 20.2052 23.5486H21.5827C22.1594 23.5486 22.627 24.0162 22.627 24.5929V31.347C22.627 31.9237 22.1594 32.3913 21.5827 32.3913H15.0443C14.4676 32.3913 14 31.9237 14 31.347V22.9671C14 22.7829 14.0487 22.602 14.1412 22.4427Z\"\n fill=\"#FFFFFF\"\n ></path>\n <path\n d=\"M25.356 22.4427L28.7951 16.5199C28.982 16.1981 29.326 16 29.6982 16H32.0729C32.8679 16 33.3713 16.8528 32.9873 17.5488L30.5191 22.0225C30.4351 22.1747 30.391 22.3458 30.391 22.5196C30.391 23.0879 30.8518 23.5486 31.4201 23.5486H32.7975C33.3743 23.5486 33.8418 24.0162 33.8418 24.5929V31.347C33.8418 31.9237 33.3743 32.3913 32.7975 32.3913H26.2592C25.6824 32.3913 25.2148 31.9237 25.2148 31.347V22.9671C25.2148 22.7829 25.2636 22.602 25.356 22.4427Z\"\n fill=\"#FFFFFF\"\n ></path>\n </svg>\n <span className=\"border border-l \"></span>{\" \"}\n <div>\n <strong>Brent Lassi</strong>\n <div> Chief Information Security Officer</div>\n </div>\n {/* <div>\n <img\n src=\"https://www.datocms-assets.com/55802/1636449069-bluecore-logo-dark.svg\"\n title=\"Logo of Brent Lassi\"\n alt=\"Logo of Brent Lassi\"\n />\n </div> */}\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Input } from \"../../elements/Input\"\nimport { Button } from \"../../elements/Button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\n\ntype TLeadGenerator = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n texts: {\n title: string\n subtitle: string\n submit: string\n }\n handleNewsletterSub: (e: string) => void\n}\n\nexport const LeadGenerator: FC<TLeadGenerator> = ({\n variant = \"contained\",\n texts,\n handleNewsletterSub,\n}) => {\n return (\n <Card>\n <CardHeader>\n <CardTitle>{texts?.title}</CardTitle>\n <CardDescription>{texts?.subtitle}</CardDescription>\n </CardHeader>\n <CardContent>\n <form\n className=\"flex flex-row gap-2\"\n onSubmit={(e) => {\n e.preventDefault()\n handleNewsletterSub(e.target[0].value)\n }}\n >\n <Input type=\"email\" name=\"email\" placeholder=\"example@sikka.io\" />\n <Button>{texts?.submit ?? \"Submit\"}</Button>\n </form>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype AnnouncementTypes = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n onActionClick: () => void\n actionText?: string\n title?: string\n subtitle?: string\n}\n\nexport const Announcement: FC<AnnouncementTypes> = ({\n variant = \"contained\",\n onActionClick,\n ...props\n}) => {\n return (\n <Card>\n <CardContent\n headless\n className=\"flex flex-row items-center justify-between\"\n >\n <div className=\"flex flex-col items-start justify-center \">\n <span className=\"text-lg font-bold\">{props.title}</span>\n <span className=\"text-sm\">{props.subtitle}</span>\n </div>\n <Button onClick={() => onActionClick()}>{props.actionText}</Button>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\n\ntype TNoPermission = {\n texts?: {\n title: string\n subtitle: string\n }\n}\n\nexport const NoPermission: FC<TNoPermission> = ({ texts }) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"flex flex-col items-center justify-center text-center\">\n <div className=\"flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 448 512\"\n height=\"0.35em\"\n width=\"0.35em\"\n >\n <path d=\"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z\"></path>\n </svg>{\" \"}\n </div>\n <div className=\"m-2 text-xl font-bold\">\n {texts?.title ?? \"You don't have permission\"}\n </div>\n <div>\n {texts?.subtitle ??\n \"If you think this is a problem please contact your administrator or our customer support\"}\n </div>\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { useEffect, useRef, useState } from \"react\";\n\nfunction useHover() {\n const [value, setValue] = useState(false);\n const ref = useRef(null);\n const handleMouseOver = () => setValue(true);\n const handleMouseOut = () => setValue(false);\n useEffect(\n () => {\n const node = ref.current;\n if (node) {\n node.addEventListener(\"mouseover\", handleMouseOver);\n node.addEventListener(\"mouseout\", handleMouseOut);\n return () => {\n node.removeEventListener(\"mouseover\", handleMouseOver);\n node.removeEventListener(\"mouseout\", handleMouseOut);\n };\n }\n },\n [ref.current] // Recall only if ref changes\n );\n return [ref, value];\n}\n\nexport default useHover;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/elements/HawaCheckbox.tsx","../src/elements/HawaPanelTabs.tsx","../src/elements/HawaChip.tsx","../src/elements/HawaIconCount.tsx","../src/elements/HawaSettingsRow.tsx","../src/elements/HawaTextField.tsx","../src/elements/Label.tsx","../src/util.ts","../src/elements/Skeleton.tsx","../src/elements/HawaColorPicker.tsx","../src/elements/HawaRange.tsx","../src/elements/HawaRadio.tsx","../src/elements/HawaSelect.tsx","../src/elements/Switch.tsx","../src/elements/HawaTypography.tsx","../src/elements/HawaAlert.tsx","../src/elements/Button.tsx","../src/elements/HawaLoading.tsx","../src/elements/HawaTable.tsx","../src/hooks/useTable.ts","../src/elements/DropdownMenu.tsx","../src/elements/HawaSearchBar.tsx","../src/elements/HawaAccordion.tsx","../src/elements/HawaPhoneInput.tsx","../src/countries.ts","../src/elements/HawaTabs.tsx","../src/elements/HawaModal.tsx","../src/elements/HawaMenu.tsx","../src/elements/HawaCopyrights.tsx","../src/elements/HawaStepper.tsx","../src/elements/HawaStats.tsx","../src/elements/Card.tsx","../src/elements/HawaCodeBlock.tsx","../src/elements/Tooltip.tsx","../src/hooks/useClipboard.ts","../src/elements/HawaDatepicker.tsx","../src/elements/DragDropImages.tsx","../src/elements/DraggableCard.tsx","../src/elements/Breadcrumb.tsx","../src/elements/SubsectionList.tsx","../src/elements/UsageCard.tsx","../src/elements/InvoiceAccordion.tsx","../src/elements/UserFeedback.tsx","../src/elements/ArrowCarousel.tsx","../src/elements/FloatingComment.tsx","../src/elements/FloatingCommentSlate.tsx","../src/elements/FloatingCommentExec.tsx","../src/elements/BackToTop.tsx","../src/elements/HawaInlineCode.tsx","../src/elements/Timeline.tsx","../src/elements/HawaPinInput.tsx","../src/elements/HawaItemCard.tsx","../src/elements/HawaPricingCard.tsx","../src/elements/HawaAdCard.tsx","../src/elements/HawaLandingCard.tsx","../src/elements/HawaButton.tsx","../src/elements/HawaStoreButtons.tsx","../src/elements/ActionCard.tsx","../src/elements/StickyFeatures.tsx","../src/elements/UserReferralSource.tsx","../src/elements/Textarea.tsx","../src/elements/Icons.tsx","../src/elements/Carousel.tsx","../src/hooks/useCarousel.ts","../src/elements/Input.tsx","../src/elements/InterfaceSettings.tsx","../src/elements/Popover.tsx","../src/elements/Tabs.tsx","../src/elements/Separator.tsx","../src/elements/Toast.tsx","../src/elements/Toaster.tsx","../src/hooks/useToast.ts","../src/elements/Dialog.tsx","../src/layout/Box.tsx","../src/layout/HawaBottomAppBar.tsx","../src/layout/HawaSiteLayout.tsx","../src/hooks/useDiscloser.ts","../src/hooks/useBreakpoint.ts","../src/layout/AppLayout.tsx","../src/layout/Sidebar.tsx","../src/layout/HawaAppLayout.tsx","../src/layout/HawaAppLayoutSimplified.tsx","../src/layout/HawaContainer.tsx","../src/layout/HawaGrid.tsx","../src/layout/AppSidebar.tsx","../src/layout/Footer.tsx","../src/layout/Banner.tsx","../src/blocks/Account/UserProfileForm.tsx","../src/blocks/Account/UserSettingsForm.tsx","../src/blocks/AuthForms/AppLanding.tsx","../src/blocks/AuthForms/SignInPhone.tsx","../src/blocks/AuthForms/SignInForm.tsx","../src/blocks/AuthForms/SignInBlock.tsx","../src/blocks/AuthForms/SignUpForm.tsx","../src/blocks/AuthForms/NewPasswordForm.tsx","../src/blocks/AuthForms/ResetPasswordForm.tsx","../src/blocks/AuthForms/CodeConfirmation.tsx","../src/blocks/AuthForms/CheckEmail.tsx","../src/blocks/Payment/SelectPayment.tsx","../src/blocks/Payment/CreditCardForm.tsx","../src/blocks/Payment/ChargeWalletForm.tsx","../src/blocks/Payment/PayWithWallet.tsx","../src/blocks/Payment/CheckoutForm.tsx","../src/blocks/Payment/Confirmation.tsx","../src/blocks/Pricing/PricingPlans.tsx","../src/blocks/Pricing/ComparingPlans.tsx","../src/blocks/Pricing/HorizontalPricing.tsx","../src/blocks/Referral/ReferralAccount.tsx","../src/blocks/Referral/ReferralSettlement.tsx","../src/blocks/Referral/ReferralStats.tsx","../src/blocks/Misc/NotFound.tsx","../src/blocks/Misc/EmptyState.tsx","../src/blocks/Misc/Testimonial.tsx","../src/blocks/Misc/LeadGenerator.tsx","../src/blocks/Misc/Announcement.tsx","../src/blocks/Misc/NoPermission.tsx","../src/hooks/useHover.ts","../src/hooks/useFocusWithin.ts","../src/hooks/useMediaQuery.ts","../src/hooks/useScrollPosition.ts","../src/hooks/useTabs.ts","../src/hooks/useWindowEvent.ts","../src/hooks/useWindowScroll.ts"],"names":["React","useEffect","useState","clsx","HawaCheckbox","props","isChecked","setVal","e","HawaPanelTabs","value","setValue","option","o","indx","HawaChip","label","size","icon","color","dot","dotType","defaultStyles","sizeStyles","dotStyles","dotTypeStyles","HawaIconCount","LabelPrimitive","cva","twMerge","cn","inputs","labelVariants","Label","className","ref","Skeleton","HawaTextField","margin","width","preview","marginStyles","widthStyles","defaultStyle","defaultInputStyle","previewInputStyle","HawaColorPicker","selectedColor","setSelectedColor","HawaRange","handleChange","startElement","endElement","rangeValue","setRangeValue","useRef","HawaRadio","design","orientation","selectedOption","setSelectedOption","activeTabStyle","inactiveTabStyle","orientationStyle","widthStyle","parentDirection","setParentDirection","dir","opt","i","Select","CreatableSelect","Control","cx","children","getStyles","innerProps","innerRef","Menu","Option","HawaSelect","base","newValue","action","SwitchPrimitives","rootSize","thumbSize","Switch","parentRef","HawaSettingsRow","settingsLabel","settingsType","settingsDescription","colorProps","rangeProps","radioProps","switchProps","selectProps","HawaTypography","HawaLoading","animationStyles","buttonVariants","Button","variant","asChild","isLoading","Comp","loadingColor","HawaAlert","direction","severity","duration","alertRef","closed","setClosed","timeoutHide","timeoutDestroy","closeButtonStyle","act","index","calculateRange","data","rowsPerPage","range","num","sliceData","page","sortData","sortColumn","sortDirection","a","b","aValue","bValue","useTable","tableRange","setTableRange","slice","setSlice","sortedData","slicedData","useTable_default","DropdownMenuPrimitive","DropdownMenuRoot","DropdownMenuTrigger","DropdownMenuPortal","DropdownMenuSub","DropdownMenuSubTrigger","inset","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenu","trigger","items","onItemSelect","side","triggerClassname","align","alignOffset","selectCallback","item","subitem","subIndex","ChevronIcon","HawaTable","bodyColor","headerColor","borders","highlightFirst","bordersWidth","pagination","perPage","setPerPage","enteredPage","setEnteredPage","setPage","sortingCol","setSortingCol","sortedRows","setSortedRows","setSortColumn","setSortDirection","isRTL","handleSort","colIndex","sortable","prevDirection","changePage","col","singleRow","rowIndex","lastRow","r","firstCell","lastCell","isRTLLastCell","isRTLFirstCell","isLTRFirstCell","isLTRLastCell","el","HawaSearchBar","HawaAccordion","collapse","setCollapse","countries","countries_default","HawaPhoneInput","selectedCountry","setSelectedCountry","state","HawaTabs","marginBetween","pill","containerStyle","tabsStyle","tab","HawaModal","open","title","onClose","closeOnClickOutside","HawaMenu","menuItems","withHeader","headerTitle","headerSubtitle","onClickOutside","actionedItem","position","menuOpened","setMenuOpened","childrenRef","childrenHeight","setChildrenHeight","childrenWidth","setChildrenWidth","menuRef","menuWidth","setMenuWidth","menuHeight","setMenuHeight","handleClickOutside","event","menuCoordinates","spacing","group","HawaCopyrights","HawaStepper","orientationStyles","lineStyles","step","Card","clickable","CardHeader","CardTitle","CardDescription","CardContent","headless","CardFooter","HawaStats","TooltipPrimitive","TooltipContent","TooltipArrow","Tooltip","content","defaultOpen","onOpenChange","delayDuration","useClipboard","timeout","error","setError","copied","setCopied","copyTimeout","setCopyTimeout","handleCopyResult","valueToCopy","err","HawaCodeBlock","tabs","code","fileName","clipboard","selectedTab","setSelectedTab","HawaDatepicker","selectedDate","setSelectedDate","useDropzone","DragDropImages","texts","files","setFiles","setDeletedFiles","onAcceptedFiles","errorMessages","maxFiles","accept","showPreview","onDeleteFile","onClearFiles","disclaimer","maxSize","termsLink","privacyLink","cmp","setCmp","max","setMax","getRootProps","getInputProps","fileRejections","acceptedFiles","isDragActive","file","clearAllFiles","sizes","errs","rej","thumbs","DraggableCard","SubsectionList","subsections","selectedSection","setSelectedSection","ss","s","SubsectionItem","chip","selected","onItemClick","UsageCard","InvoiceAccordion","InvoiceItemProp","expanded","setExpanded","product","UserFeedback","answered","setAnswered","clickedOption","setClickedOption","closingTimer","setClosingTimer","popUpRef","boxPosition","slowClose","op","Arrow","ArrowCarousel","setIndex","Property","stylers","lineBreakIdentifier","FloatingComment","text","_setText","field","_text","setText","getChildIndex","child","getRelativePrecedingSum","element","endIndex","node","getLinePrecedingSum","lineNode","lineNodes","getSelectionPrecedingSum","name","selection","nodes","parent","sum","isNodeLine","spanIndex","lineIndex","getFieldSelection","startPrecedingSum","endPrecedingSum","start","end","startNode","endNode","total","sel","getRange","result","intersection","setA","setB","_intersection","elem","getMinimum","array","getMaximum","getCorrelation","styling1","styling2","indices1","indices2","stylingSplice","correlations","stylings","current","type","_","styling","c","__","_index","added","stylingIntersect","intersections","finish","indices","perform","id","selectionStart","selectionEnd","correlation","getIntersectStylings","startOffset","finishOffset","getStylingsInRange","startIndex","splitStyling","offset","first","second","additionTo","length","defaultBehavior","deletionOf","processNormal","difference","processPaste","pasteLength","additionStart","removalStart","removalEnd","processDrop","dropStart","dropEnd","dropLength","dragStart","dragEnd","dropDifference","dragStylings","onChange","getContent","lineIndices","character","lineStart","lineEnd","lineContent","lineStylings","spans","last","html","line","span","getTextDirection","textContent","eventType","split","anchorNode","focusNode","eventData","_content","originalLine","lines","useCallback","Editor","createEditor","Slate","Editable","withReact","initialValue","styles","Leaf","keys","key","types","FloatingCommentSlate","editor","renderLeaf","ReactDOMServer","base64","Image","FloatingCommentExec","acronym","BackToTop","visible","setVisible","rect","_setRect","_rect","setRect","self","getCoords","anchor","onScroll","scrollTop","scrollLeft","backToTop","interval","newRect","corner","vertical","horizontal","anchorRect","selfRect","height","HawaInlineCode","Timeline","HawaPinInput","digits","getPins","pin","setPin","handleKeyDown","backTo","newPin","HawaItemCard","actions","counts","headerActions","clickableImage","clickableImageAction","clickableImageActionText","clickableImageActionIcon","header","cardImage","imageStyles","headerActionsButtonStyle","openActionHeader","setOpenActionHeader","handleOpenActionHeader","HawaPricingCard","currentPlan","feature","HawaAdCard","adRef","cardStyles","HawaLandingCard","disabledSyles","disabledVariantSyles","baseStyles","containerWidthStyles","variantStyles","colorStyles","HawaButton","disabled","tooltip","tooltipSize","tooltipPosition","tooltipDirection","margins","badge","edgeCorner","feedback","isClicked","setIsClicked","buttonText","setButtonText","handleClick","HawaStoreButtons","ActionCard","hovered","setHovered","StickyFeatures","f","Textarea","UserReferralSource","Icons","useCarousel","imageWidth","isDragging","setIsDragging","startDragX","setStartDragX","setScrollLeft","containerRef","findClosestSnapPoint","handleMouseDown","handleMouseLeave","handleDragEnd","handleMouseUp","closestSnapPoint","walk","useCarousel_default","Carousel","images","handleMouseMove","image","Input","InterfaceSettings","setColor","language","setLanguage","PopoverPrimitive","PopoverContent","Popover","TabsPrimitive","TabsContext","Tabs","TabsList","TabsTrigger","TabsContent","SeparatorPrimitive","Separator","decorative","ToastPrimitives","toastVariants","ToastProvider","ToastViewport","Toast","ToastAction","ToastClose","ToastTitle","ToastDescription","TOAST_LIMIT","TOAST_REMOVE_DELAY","count","genId","toastTimeouts","addToRemoveQueue","toastId","dispatch","reducer","t","toast","listeners","memoryState","listener","update","dismiss","useToast","setState","Toaster","toasts","description","toastProps","DialogPrimitive","Dialog","DialogTrigger","DialogPortal","DialogOverlay","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Box","HawaBottomAppBar","singleContent","useDiscloser","setOpen","useDiscloser_default","useBreakpoint","breakpoint","setBreakpoint","resize","useBreakpoint_default","HawaSiteLayout","navigationSize","openSideMenu","setOpenSideMenu","openSubItem","setOpenSubItem","isOpen","onOpen","drawerItemRef","keepOpen","setKeepOpen","ltrDrawerStyle","rtlDrawerStyle","navigationSizeStyles","ltrChildrenStyle","rtlChildrenStyle","AccordionPrimitive","Accordion","triggerStyles","AccordionItem","AccordionTrigger","showArrow","AccordionContent","SidebarGroup","selectedItem","openedItem","setOpenedItem","onSubItemClick","idx","SidebarItem","getSelectedStyle","AppLayout","drawerSize","onSettingsClick","DrawerFooterActions","currentPage","clickedItem","closeDrawerWidth","openDrawerWidth","drawerSizeStyle","openedSidebarItem","setOpenedSidebarItem","setSelectedItem","drawerSizeCondition","values","FaChevronRight","HawaAppLayout","setOpenSubitem","drawerDefaultStyle","dSection","dIndex","dItem","subIt","HawaAppLayoutSimplified","AvatarIcon","ArrowIcon","pointing","directionStyle","HawaContainer","maxWidth","centered","maxWidthStyles","HawaGrid","AppSidebar","BsInstagram","BsTwitter","FaSnapchatGhost","FaTiktok","Footer","variation","pagesSection","singlePage","HawaBanner","bannerRef","bannerStyle","Controller","FormProvider","useForm","UserProfileForm","methods","errors","handleSubmit","control","UserSettingsForm","AppLanding","SignInPhone","userPhone","setUserPhone","SignInForm","SignInBlock","SignUpForm","fld","NewPasswordForm","matchError","setMatchError","handleSubmission","ResetPasswordForm","register","CodeConfirmation","pins","setPins","CheckEmail","handleResend","SelectPayment","selectedMethod","setSelectedMethod","CreditCardForm","cardNumber","setCardNumber","cardType","setCardType","getCardType","card_bin","visa_regex","mastercard_regex","amex_regex","mada_regex","meeza_regex","card_type","onCardNumberChange","cardTypeSlug","ChargeWalletForm","walletAmount","setWalletAmount","PayWithWallet","CheckoutForm","isArabic","country","ConfirmationPage","PricingPlans","plan","CheckMark","UncheckMark","ComparingPlans","currentCurrency","setCurrentCurrency","currentCycle","setCurrentCycle","HorizontalPricing","selectedCard","setSelectedCard","d","CheckIcons","CardText","CardPrice","ReferralAccount","referralLink","referralCode","ReferralSettlement","withdrawError","SettlementAccountCard","ReferralStats","NumberCard","ReferralSignUpCard","NotFound","EmptyState","onActionClick","Testimonial","LeadGenerator","handleNewsletterSub","Announcement","NoPermission","containsRelatedTarget","useFocusWithin","onBlur","onFocus","focused","_setFocused","focusedRef","setFocused","handleFocusIn","handleFocusOut","attachMediaListener","query","callback","getInitialValue","useMediaQuery","getInitialValueInEffect","matches","setMatches","queryRef","useTabs","initialTab","activeTab","setActiveTab","handleHashChange","hash","useWindowEvent","options","getScrollPosition","scrollTo","x","y","scrollOptions","useWindowScroll","setPosition"],"mappings":"AAAA,OAAOA,IAAS,aAAAC,GAAW,YAAAC,OAAoB,QAC/C,OAAOC,OAAU,OAWV,IAAMC,GAAoCC,GAAU,CACzD,GAAM,CAACC,EAAWC,CAAM,EAAIL,GAASG,EAAM,GAAG,EAE9C,OAAAJ,GAAU,IAAM,CACdI,EAAM,SAASC,CAAS,CAC1B,EAAG,CAACA,CAAS,CAAC,EAEZN,GAAA,cAAC,OACC,UAAWG,GACTE,EAAM,SACF,0CACA,0BACN,GAEAL,GAAA,cAAC,SACC,KAAK,WACL,QAASM,EACT,SAAWE,GAAMD,EAAOC,EAAE,OAAO,OAAO,EACxC,GAAIH,EAAM,GACV,aAAYA,EAAM,MAClB,UAAU,mLACZ,GACEA,EAAM,OAASA,EAAM,aACrBL,GAAA,cAAC,OACC,UAAU,qCACV,QAAUQ,GAAMD,EAAO,CAACD,CAAS,GAEhCD,EAAM,OACLL,GAAA,cAAC,SAAM,UAAU,6DACdK,EAAM,KACT,EAEDA,EAAM,YACLL,GAAA,cAAC,KAAE,UAAU,oDACVK,EAAM,UACT,CAEJ,CAEJ,CAEJ,ECrDA,OAAOL,IAAS,YAAAE,OAAoB,QAS7B,IAAMO,GAAqCJ,GAAU,CAC1D,GAAM,CAACK,EAAOC,CAAQ,EAAIT,GAASG,EAAM,YAAY,EACrD,OACEL,GAAA,cAAC,WACCA,GAAA,cAAC,OAAI,UAAU,sDACbA,GAAA,cAAC,MACC,UAAU,wDACV,GAAG,QACH,mBAAiB,gBACjB,KAAK,WAEJK,EAAM,QAAQ,IAAI,CA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O,KACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,iBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,uBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EAEA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,IACT,EACA,CACE,cAAe,0BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,2BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,sBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,wBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,qBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,iBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,yCACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,sBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,iCACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EAEA,CACE,cAAe,iBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,2BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,iBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EAEA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,wBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,mBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,0BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EAEA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,IACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EAEA,CACE,cAAe,kBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,uBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,+BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,yBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,OACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,aACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,cACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,QACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,oBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,WACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,SACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,gBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,IACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,aAEf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,eACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,2BACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,YACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,yBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,sBACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,OACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,KACT,EACA,CACE,cAAe,UACf,KAAM,KACN,QAAS,qBACT,MACE,gFACF,MAAO,MACT,EACA,CACE,cAAe,kBACf,KAAM,KACN,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,GAAS,CAAE,EAAAC,EAAG,EAAAC,CAAE,EAA4B,CACnD,GAAI,OAAO,OAAW,IAAa,CACjC,IAAMC,EAAiC,CAAE,SAAU,QAAS,EAExD,OAAOF,GAAM,WACfE,EAAc,KAAOF,GAGnB,OAAOC,GAAM,WACfC,EAAc,IAAMD,GAGtB,OAAO,SAASC,CAAa,CAC/B,CACF,CAEO,SAASC,IAAkB,CAChC,GAAM,CAACznB,EAAU0nB,CAAW,EAAIp2B,GAAyB,CAAE,EAAG,EAAG,EAAG,CAAE,CAAC,EAEvE,OAAA41B,GAAe,SAAU,IAAMQ,EAAYN,GAAkB,CAAC,CAAC,EAC/DF,GAAe,SAAU,IAAMQ,EAAYN,GAAkB,CAAC,CAAC,EAE/D/1B,GAAU,IAAM,CACdq2B,EAAYN,GAAkB,CAAC,CACjC,EAAG,CAAC,CAAC,EAEE,CAACpnB,EAAUqnB,EAAQ,CAC5B","sourcesContent":["import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype TCheckBoxTypes = {\n centered?: boolean\n label?: any\n helperText?: any\n id: string\n onChange?: (e) => void\n val?: boolean\n}\n\nexport const HawaCheckbox: FC<TCheckBoxTypes> = (props) => {\n const [isChecked, setVal] = useState(props.val)\n\n useEffect(() => {\n props.onChange(isChecked)\n }, [isChecked])\n return (\n <div\n className={clsx(\n props.centered\n ? \"flex h-full items-center justify-center\"\n : \"flex h-full items-start \"\n )}\n >\n <input\n type=\"checkbox\"\n checked={isChecked}\n onChange={(e) => setVal(e.target.checked)}\n id={props.id}\n aria-label={props.label}\n className=\"mt-3 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-blue-600\"\n />\n {(props.label || props.helperText) && (\n <div\n className=\" flex cursor-pointer flex-col py-2\"\n onClick={(e) => setVal(!isChecked)}\n >\n {props.label && (\n <label className=\"mx-2 text-sm font-medium text-gray-900 dark:text-gray-300\">\n {props.label}\n </label>\n )}\n {props.helperText && (\n <p className=\"mx-2 mt-1 text-xs text-red-600 dark:text-red-500\">\n {props.helperText}\n </p>\n )}\n </div>\n )}\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\n\ntype PanelTabsTypes = {\n defaultValue: any\n options: [{ label: string; value: string }]\n lang: any\n handleChange: any\n location: any\n}\nexport const HawaPanelTabs: FC<PanelTabsTypes> = (props) => {\n const [value, setValue] = useState(props.defaultValue)\n return (\n <div>\n <div className=\"mb-4 border-b border-gray-200 dark:border-gray-700\">\n <ul\n className=\"-mb-px flex flex-wrap text-center text-sm font-medium\"\n id=\"myTab\"\n data-tabs-toggle=\"#myTabContent\"\n role=\"tablist\"\n >\n {props.options.map((option: any, o) => {\n return (\n <li key={o} className=\"mr-2\" role=\"presentation\">\n <button\n className=\"inline-block rounded-t-lg border-b-2 border-blue-600 p-4 text-blue-600 hover:text-blue-600 dark:border-blue-500 dark:text-blue-500 dark:hover:text-blue-500\"\n id={`${option.value}-tab`}\n data-tabs-target={`#${option.value}`}\n type=\"button\"\n role=\"tab\"\n aria-controls={option.value}\n aria-selected=\"true\"\n >\n {option.label}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n <div id=\"myTabContent\">\n {props.options.map((option: any, indx) => {\n return (\n <div\n key={indx}\n className=\"rounded bg-gray-50 p-4 dark:bg-gray-800\"\n id={`${option.value}`}\n role=\"tabpanel\"\n aria-labelledby={`${option.value}-tab`}\n >\n {option.content}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype TChipTypes = {\n /** The text inside the chip */\n label: string\n /** The small icon before the chip label */\n icon?: JSX.Element\n /** The color of the chip, must be a tailwind color */\n color?: string\n /** The size of the chip */\n size?: \"small\" | \"normal\" | \"large\"\n /** Enable/Disable the dot before the label of the chip */\n dot?: boolean\n /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */\n dotType?: \"available\" | \"unavailable\"\n}\n\nexport const HawaChip: FC<TChipTypes> = ({\n label,\n size = \"normal\",\n icon,\n color,\n dot,\n dotType = \"available\",\n}) => {\n let defaultStyles =\n \"flex flex-row w-fit gap-1 items-center rounded px-2.5 py-0.5 font-bold text-blue-800 dark:bg-blue-200 dark:text-blue-800\"\n let sizeStyles = {\n small: \"h-full leading-4 px-1 py-0 text-[9px] gap-0.5 \",\n normal: \"h-fit text-xs\",\n large: \"\",\n }\n\n let dotStyles = {\n small: \"flex h-1 w-1 rounded-full\",\n normal: \"flex h-2 w-2 rounded-full\",\n large: \"flex h-3 w-3 rounded-full\",\n }\n let dotTypeStyles = {\n available: \"bg-green-500\",\n unavailable: \"bg-red-500\",\n }\n return (\n <span\n className={clsx(\n defaultStyles,\n sizeStyles[size],\n color ? `bg-${color}-100 text-${color}-500` : \"bg-layoutPrimary-500\"\n )}\n >\n {dot && (\n <span className={clsx(dotStyles[size], dotTypeStyles[dotType])}></span>\n )}\n {icon && icon}\n {label}\n </span>\n )\n}\n","import React, { FC } from \"react\"\n\ntype IconCountTypes = {\n /** The icon of the counter */\n icon: JSX.Element\n /** The text next to the icon */\n count?: string\n}\n\nexport const HawaIconCount: FC<IconCountTypes> = (props) => {\n return (\n <div className=\"flex h-fit flex-row items-center gap-2 px-2\">\n <div>{props.icon}</div>\n <div className=\"text-sm\">{props.count}</div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaTextField } from \"./HawaTextField\"\nimport { HawaColorPicker } from \"./HawaColorPicker\"\nimport { HawaRange } from \"./HawaRange\"\nimport { HawaRadio } from \"./HawaRadio\"\nimport { HawaSelect } from \"./HawaSelect\"\nimport { Switch } from \"./Switch\"\n\ntype SettingsRowTypes = {\n settingsLabel: string\n settingsType: \"text\" | \"radio\" | \"boolean\" | \"color\" | \"range\" | \"select\"\n settingsDescription?: string\n radioProps: {\n defaultValue: any\n onChangeTab: any\n options: [{ label: string; value: any }]\n }\n colorProps: {\n color?: any\n handleChange?: any\n }\n rangeProps: {\n min?: any\n max?: any\n }\n switchProps: {\n size: \"sm\" | \"default\"\n }\n selectProps: {\n label?: string\n options?: any[any]\n isCreatable?: boolean\n isClearable?: boolean\n isMulti?: boolean\n isSearchable?: boolean\n onChange?: any\n helperText?: any\n onInputChange?: any\n native?: any\n fullWidth?: any\n value?: any\n children?: any\n getOptionLabel?: any\n disabled?: boolean\n }\n}\n\nexport const HawaSettingsRow: FC<SettingsRowTypes> = ({\n settingsLabel,\n settingsType,\n settingsDescription,\n colorProps,\n rangeProps,\n radioProps,\n switchProps,\n selectProps,\n}) => {\n return (\n <div className=\"flex max-h-fit flex-row items-center justify-between rounded align-middle\">\n <div>\n <div className=\"text-sm\">{settingsLabel}</div>\n {settingsDescription && (\n <div className=\"text-xs\">{settingsDescription}</div>\n )}{\" \"}\n </div>\n {settingsType === \"text\" && <HawaTextField margin=\"none\" width=\"small\" />}\n {settingsType === \"boolean\" && <Switch {...switchProps} />}\n {settingsType === \"range\" && <HawaRange {...rangeProps} />}\n {settingsType === \"color\" && <HawaColorPicker {...colorProps} />}\n {settingsType === \"radio\" && <HawaRadio {...radioProps} />}\n {settingsType === \"select\" && <HawaSelect {...selectProps} />}\n </div>\n )\n}\n","import React, { FC, PropsWithRef } from \"react\"\nimport { Label } from \"./Label\"\nimport { cn } from \"../util\"\nimport { Skeleton } from \"./Skeleton\"\n\n// TODO: make icon based on direction\n// TODO: Preferebly use context to pass direction rtl | ltr\n\ntype TextFieldTypes = {\n isLoading?: boolean\n margin?: \"none\" | \"normal\" | \"large\"\n width?: \"small\" | \"normal\" | \"full\"\n /** The label of the input field */\n label?: any\n /** Disable/Enable multiple line text input field */\n multiline?: boolean\n /** The small red text under the input field to show validation or a hint. */\n helpertext?: any\n /** The value of the input field */\n value?: any\n props?: PropsWithRef<\"input\">\n /** The type of input field. Same as the types of <input/> component */\n type?: any\n /** The placeholder of the input field */\n placeholder?: any\n defaultValue?: any\n name?: any\n inputProps?: any\n onChange?: any\n ref?: any\n /** The icon inside the input field */\n icon?: any\n /** Boolean to enable/disable editing the input field and using it as a text field */\n preview?: boolean\n autoComplete?: any\n maxLength?: any\n iconInside?: React.ReactNode\n}\n\nexport const HawaTextField: FC<TextFieldTypes> = ({\n margin = \"normal\",\n width = \"full\",\n preview = false,\n ...props\n}) => {\n let marginStyles = {\n none: \"mb-0\",\n normal: \"mb-3\",\n large: \"mb-5\",\n }\n let widthStyles = {\n small: \"w-full max-w-2xs\",\n normal: \"w-1/2\",\n full: \"w-full\",\n }\n\n let defaultStyle = \"flex max-h-fit relative flex-col justify-center gap-2\"\n let defaultInputStyle =\n \"block w-full rounded border transition-all bg-background p-2 text-sm text-black dark:text-white focus:border-blue-500 focus:ring-blue-500\"\n let previewInputStyle =\n \"block w-full rounded bg-gray-50 p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500\"\n // \"mb-0 block w-full rounded border border-gray-300 bg-gray-50 p-2 text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500\",\n\n return (\n <div className={cn(defaultStyle, marginStyles[margin], widthStyles[width])}>\n {props.label && <Label>{props.label}</Label>}\n {props.isLoading ? (\n <Skeleton className=\"h-[38px] w-full\" />\n ) : (\n <>\n <div\n className={cn(\n \"absolute top-[22px] h-[0.8px] w-full bg-gray-200 transition-all dark:bg-gray-800\",\n preview ? \"opacity-100\" : \"opacity-0\"\n )}\n ></div>\n <>\n <div className={cn(\"relative\")}>\n {props.icon && (\n <div className=\"absolute left-3 top-1/2 -translate-y-1/2\">\n {props.icon}\n </div>\n )}\n <input\n {...props}\n className={cn(\n defaultInputStyle,\n props.icon && \"pl-10\",\n preview && \"border-transparent bg-transparent px-0\"\n )}\n disabled={preview}\n />\n </div>\n {props.iconInside && (\n <div className=\"absolute right-1 top-[41px] -translate-y-1/2\">\n {props.iconInside}\n </div>\n )}\n {props.helpertext ? (\n <p className=\"mb-0 mt-0 text-xs text-red-600 dark:text-red-500\">\n {props.helpertext}\n </p>\n ) : null}\n </>\n </>\n )}\n </div>\n )\n}\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../util\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n))\n\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\ntype Palette = {\n name: string\n colors: {\n [key: number]: string\n }\n}\ntype Rgb = {\n r: number\n g: number\n b: number\n}\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\")\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n )\n\n if (!colorParts) {\n return null\n }\n\n const [, r, g, b] = colorParts\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16),\n } as Rgb\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2)\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`\n}\n\nfunction getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color)\n\n if (!rgbColor) {\n return \"#333\"\n }\n\n const { r, g, b } = rgbColor\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b\n\n return luma < 120 ? \"#FFF\" : \"#333\"\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`)\n\n if (!color) {\n return \"\"\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity)\n const g = Math.round(color.g + (255 - color.g) * intensity)\n const b = Math.round(color.b + (255 - color.b) * intensity)\n\n return rgbToHex(r, g, b)\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex)\n\n if (!color) {\n return \"\"\n }\n\n const r = Math.round(color.r * intensity)\n const g = Math.round(color.g * intensity)\n const b = Math.round(color.b * intensity)\n\n return rgbToHex(r, g, b)\n}\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\"),\n },\n }\n\n const intensityMap: {\n [key: number]: number\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49,\n }\n\n ;[50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level])\n })\n ;[600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level])\n })\n\n return response as Palette\n}\n\nexport { getPallette }\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import React from \"react\"\nimport { cn } from \"../util\"\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import React, { useState, FC, ChangeEvent } from \"react\"\n\ntype ColorPickerTypes = {\n /** The hex code for the color */\n color?: any\n /** Fires everytime the color changes */\n handleChange?: (e: ChangeEvent<HTMLInputElement>) => void\n}\n\nexport const HawaColorPicker: FC<ColorPickerTypes> = (props) => {\n const [selectedColor, setSelectedColor] = useState(props.color)\n return (\n <div className={`flex w-fit flex-row rounded border p-0`}>\n <div\n style={{ backgroundColor: selectedColor }}\n className=\"rounded-bl-lg rounded-tl-lg\"\n >\n <input\n type=\"color\"\n value={selectedColor}\n onChange={(e) => {\n setSelectedColor(e.target.value)\n props.handleChange(e)\n }}\n className=\"opacity-0\"\n />\n </div>\n\n <input\n type=\"text\"\n onChange={(e) => {\n setSelectedColor(e.target.value)\n props.handleChange(e)\n }}\n value={selectedColor}\n className=\"w-24 bg-background rounded-br-lg rounded-tr-lg pl-2 pr-2\"\n />\n </div>\n )\n}\n","import React, { FC, useState } from \"react\"\n\ntype RangeTypes = {\n value?: any\n handleChange?: any\n startElement?: any\n endElement?: any\n label?: string\n min?: any\n max?: any\n}\n\nexport const HawaRange: FC<RangeTypes> = ({\n value,\n handleChange,\n startElement,\n endElement,\n label,\n ...props\n}) => {\n const [rangeValue, setRangeValue] = useState(value)\n\n return (\n <div {...props}>\n {label && (\n <label\n htmlFor=\"default-range\"\n className=\"mb-2 block text-sm font-medium text-gray-900 dark:text-gray-300\"\n >\n {label}\n </label>\n )}\n <div className=\"flex w-fit flex-row items-center justify-center\">\n <div className=\"mr-2\">{startElement}</div>{\" \"}\n <input\n id=\"default-range\"\n type=\"range\"\n value={rangeValue}\n onChange={(e) => {\n setRangeValue(e.target.value)\n handleChange(e)\n }}\n className=\"h-2 w-fit cursor-pointer appearance-none rounded bg-gray-200 dark:bg-gray-700\"\n />\n <div className=\"ml-2\">{endElement}</div>{\" \"}\n </div>\n </div>\n )\n}\n","import React, { useState, FC, useRef, useEffect } from \"react\"\nimport { cn } from \"../util\"\n\ntype RadioTypes = {\n orientation?: \"vertical\" | \"horizontal\"\n design?: \"default\" | \"tabs\" | \"cards\" | \"bordered\"\n options?: {\n value: any\n label: any\n disabled?: any\n sublabel?: any\n icon?: any\n }[]\n width?: \"default\" | \"full\"\n onChangeTab?: any\n defaultValue?: any\n}\nexport const HawaRadio: FC<RadioTypes> = ({\n design = \"default\",\n width = \"default\",\n orientation = \"horizontal\",\n ...props\n}) => {\n const [selectedOption, setSelectedOption] = useState(props.defaultValue)\n let activeTabStyle =\n \"inline-block py-2 px-4 w-full text-primary-foreground bg-primary active dark:bg-primary \"\n let inactiveTabStyle =\n \"inline-block py-2 px-4 w-full transition-all hover:bg-primary/10 dark:bg-background bg-primary/5 hover:text-gray-900 dark:hover:bg-primary/10 dark:hover:text-white dark:bg-primary/5\"\n let orientationStyle = {\n horizontal: \"flex flex-row\",\n vertical: \"flex flex-col\",\n }\n let widthStyle = {\n default: \"max-w-fit\",\n full: \"w-full\",\n }\n const [parentDirection, setParentDirection] = useState(null)\n const ref = useRef(null)\n\n useEffect(() => {\n if (ref.current && ref.current.parentNode) {\n const dir = window.getComputedStyle(ref.current.parentNode).direction\n setParentDirection(dir)\n }\n })\n\n switch (design) {\n case \"tabs\":\n return (\n <ul\n ref={ref}\n className={cn(\n props.options?.length > 2\n ? \"flex-wrap xs:max-w-full xs:flex-nowrap\"\n : \"\",\n \"select-none whitespace-nowrap rounded border text-center text-sm font-medium\",\n widthStyle[width],\n orientationStyle[orientation]\n )}\n >\n {props.options?.map((opt: any, o) => (\n <li\n aria-current=\"page\"\n onClick={() => {\n setSelectedOption(opt.value)\n props.onChangeTab(opt.value)\n }}\n className={cn(\n \"w-full cursor-pointer \",\n orientation === \"horizontal\" &&\n parentDirection === \"ltr\" &&\n \"rounded-none first:rounded-l last:rounded-r\",\n orientation === \"horizontal\" &&\n parentDirection === \"rtl\" &&\n \"rounded-none first:rounded-r last:rounded-l\",\n orientation === \"vertical\" &&\n \"rounded-none first:rounded-t last:rounded-b\",\n\n \"last flex flex-row items-center justify-center gap-2 \",\n selectedOption === opt.value ? activeTabStyle : inactiveTabStyle\n // \"bg-red-500\"\n )}\n key={o}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </li>\n ))}\n </ul>\n )\n case \"bordered\":\n return (\n <div className={cn(orientationStyle[orientation], \"gap-4\")}>\n {props.options.map((opt, i) => (\n <div className=\"rounded border border-gray-200 \">\n <div\n className=\"radio-item radio-item-bordered flex items-center transition-all\"\n key={i + 1}\n >\n <input\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name=\"bordered-radio\"\n // className=\"h-4 w-4 border-gray-300 \"\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"ml-2 w-full p-4 pl-3 text-sm font-medium dark:text-white\",\n opt.disabled ? \"opacity-50\" : \"cursor-pointer text-gray-900\"\n )}\n >\n {opt.label}\n </label>\n </div>\n </div>\n ))}\n </div>\n )\n case \"cards\":\n return (\n <ul className={cn(orientationStyle[orientation], \"gap-4\")}>\n {props.options?.map((opt: any, o) => (\n <li>\n <input\n type=\"radio\"\n id={opt.value.toString()}\n name=\"cards-radio\"\n value={opt.value.toString()}\n className=\"peer hidden\"\n required\n disabled={opt.disabled}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"inline-flex h-full w-full items-center justify-between rounded-lg border border-gray-200 bg-white p-5 text-gray-500 peer-checked:border-blue-600 peer-checked:text-blue-600 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:peer-checked:text-primary\",\n opt.disabled\n ? \"opacity-50\"\n : \"cursor-pointer hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300\"\n )}\n >\n <div className=\"block h-full w-full\">\n <div className=\"w-full text-lg font-semibold\">\n {opt.label}\n </div>\n <div className=\"w-full\">{opt.sublabel}</div>\n </div>\n {/* <svg\n className=\"ml-3 h-5 w-5 \"\n aria-hidden=\"true\"\n fill=\"none\"\n viewBox=\"0 0 14 10\"\n >\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M1 5h12m0 0L9 1m4 4L9 9\"\n />\n </svg> */}\n </label>\n </li>\n ))}\n </ul>\n )\n\n default:\n return (\n <div className={cn(orientationStyle[orientation], \"gap-2\")}>\n {props.options.map((opt, i) => (\n <div\n className=\"radio-item radio-item-default flex items-center transition-all\"\n key={i + 1}\n >\n <input\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name=\"default-radio\"\n // className=\"h-4 w-4 border-gray-300 \"\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"text-sm font-medium dark:text-white\",\n opt.disabled\n ? \"text-gray-400\"\n : \"cursor-pointer text-gray-900\"\n )}\n >\n {opt.label}\n </label>\n </div>\n ))}\n </div>\n )\n }\n}\n","import clsx from \"clsx\"\nimport React, { FC } from \"react\"\nimport Select from \"react-select\"\nimport CreatableSelect from \"react-select/creatable\"\nimport { Label } from \"./Label\"\nimport { cn } from \"../util\"\nimport { Skeleton } from \"./Skeleton\"\n\ntype ControlTypes = {\n cx: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n size?: \"small\" | \"normal\" | \"large\"\n}\nconst Control: FC<ControlTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n size = \"normal\",\n ...props\n}) => {\n let sizeStyles = {\n small: \"h-7 text-xs\",\n normal: \"h-[2.36rem] text-sm\",\n large: \"\",\n }\n return (\n <div\n ref={innerRef}\n className={clsx(\n sizeStyles[size],\n \"flex w-full rounded border bg-background text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:focus:ring-blue-500\"\n )}\n {...innerProps}\n // {...props}\n >\n {children}\n </div>\n )\n}\n// The options container\ntype MenuTypes = {\n cx: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n}\nconst Menu: FC<MenuTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n ...props\n}) => {\n return (\n <div\n className=\"absolute z-10 mt-2 flex w-full flex-col justify-start rounded border bg-background p-1.5\"\n ref={innerRef}\n {...innerProps}\n // {...props}\n >\n {children}\n </div>\n )\n}\n// The single options\ntype OptionTypes = {\n cx: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n size?: \"small\" | \"normal\" | \"large\"\n}\nconst Option: FC<OptionTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n size = \"normal\",\n ...props\n}) => (\n <div\n ref={innerRef}\n className=\"flex cursor-pointer select-none flex-row items-center justify-between rounded-inner p-1 px-2 hover:bg-primary hover:text-primary-foreground\"\n {...innerProps}\n >\n {children}\n </div>\n)\n\ntype SelectTypes = {\n label?: string\n options?: {\n value: any\n label: any\n }[]\n isCreatable?: boolean\n isClearable?: boolean\n isMulti?: boolean\n isSearchable?: boolean\n onChange?: any\n helperText?: any\n onInputChange?: any\n native?: any\n width?: \"full\" | \"small\"\n value?: any\n children?: any\n getOptionLabel?: any\n disabled?: boolean\n defaultValue?: any\n isLoading?: any\n}\nexport const HawaSelect: FC<SelectTypes> = (props) => {\n return (\n <div className=\" flex w-full flex-col gap-2\">\n {props.label && <Label>{props.label}</Label>}\n\n {props.isLoading ? (\n <Skeleton className=\"h-[38px] w-full\" />\n ) : !props.isCreatable ? (\n <Select\n classNames={{\n // control: () => \"bg-blue-500 w-full\",\n container: () =>\n cn(\n \"rounded\",\n props.disabled ? \"cursor-not-allowed\" : \"cursor-pointer\"\n ),\n placeholder: () => \"px-2 text-muted-foreground\",\n input: () => \"text-white px-2\",\n valueContainer: () => \"text-white dark:text-muted-foreground\",\n singleValue: () => \"text-black dark:text-white px-2\",\n indicatorsContainer: () =>\n \" px-2 cursor-pointer text-muted-foreground\",\n }}\n unstyled\n isDisabled={props.disabled}\n options={props.options}\n defaultValue={props.defaultValue}\n isClearable={props.isClearable}\n isMulti={props.isMulti}\n isSearchable={props.isSearchable}\n onChange={(newValue: any, action) =>\n // props.onChange(newValue.label, action)\n props.onChange(newValue, action)\n }\n components={{\n Control,\n Option,\n Menu,\n }}\n getOptionLabel={props.getOptionLabel}\n />\n ) : (\n <CreatableSelect\n styles={{\n input: (base) => ({\n ...base,\n \"input:focus\": {\n boxShadow: \"none\",\n },\n }),\n\n control: (base) => ({\n ...base,\n borderRadius: \"0.75rem\",\n }),\n menu: (base) => ({\n ...base,\n borderRadius: \"0.75rem\",\n padding: 0,\n display: \"flex\",\n justifyContent: \"center\",\n }),\n menuList: (base) => ({\n ...base,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n width: \"100%\",\n }),\n option: (base) => ({\n ...base,\n borderRadius: \"0.75rem\",\n margin: 3,\n width: \"98%\",\n }),\n }}\n options={props.options}\n isClearable={props.isClearable}\n isMulti={props.isMulti}\n isSearchable={props.isSearchable}\n onCreateOption={() => console.log(\"im changing\")}\n onChange={(newValue, action) => props.onChange(newValue, action)}\n onInputChange={(newValue, action) =>\n props.onInputChange(newValue, action)\n }\n />\n )}\n {props.helperText && (\n <p className=\"mt-2 text-sm text-red-600 dark:text-red-500\">\n {props.helperText}\n </p>\n )}\n </div>\n )\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\nimport { cn } from \"../util\"\n\nlet rootSize = {\n default: \"h-[25px] w-[42px]\",\n sm: \"h-[20px] w-[37px]\",\n}\nlet thumbSize = {\n default: \"h-[21px] w-[21px]\",\n sm: \"h-[16px] w-[16px]\",\n}\n\ninterface SwitchProps\n extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {\n size?: \"default\" | \"sm\" | \"lg\" // Define the possible sizes here\n label?: string\n}\n\nexport const Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n SwitchProps\n>(({ className, size = \"default\", label, ...props }, ref) => {\n const [parentDirection, setParentDirection] = React.useState(null)\n const parentRef = React.useRef(null)\n\n React.useEffect(() => {\n if (parentRef.current && parentRef.current.parentNode) {\n const dir = window.getComputedStyle(\n parentRef.current.parentNode\n ).direction\n setParentDirection(dir)\n }\n })\n\n return (\n <div className=\"flex flex-row items-center\" ref={parentRef}>\n <SwitchPrimitives.Root\n className={cn(\n \"relative cursor-pointer rounded-full bg-primary/20 outline-none data-[state=checked]:bg-primary\",\n className,\n rootSize[size]\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n thumbSize[size],\n \"block rounded-full bg-white transition-transform duration-100 will-change-transform data-[state=checked]:bg-primary-foreground dark:bg-background\",\n\n parentDirection === \"rtl\"\n ? \"-translate-x-0.5 data-[state=checked]:-translate-x-[19px]\"\n : \"translate-x-0.5 data-[state=checked]:translate-x-[19px]\"\n )}\n />\n </SwitchPrimitives.Root>\n {label && (\n <span className=\"mx-2 text-sm font-medium text-gray-900 dark:text-gray-300\">\n {label}\n </span>\n )}\n </div>\n )\n})\nSwitch.displayName = SwitchPrimitives.Root.displayName\n","import React, { FC } from \"react\"\n\ntype TypographyTypes = {\n children: any\n align?: any\n}\nexport const HawaTypography: FC<TypographyTypes> = (props) => {\n return <div>{props.children}</div>\n}\n","import React, { useRef, useState, useEffect } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\n// TODO: make handleClose to detect when the alert is closed from outside this component\n\ntype AlertTypes = {\n severity?: \"info\" | \"warning\" | \"error\" | \"success\"\n /** The title of the alert placed above the text of the alert. Can be used alone */\n title?: any\n /** The text of the alert placed below the title of the alert. Can be used alone */\n text: any\n /** The duration for the alert to stay on the screen */\n duration?: number\n variant?:\n | \"normal\"\n | \"solid\"\n | \"top-accent\"\n | \"left-accent\"\n | \"right-accent\"\n | \"bottom-accent\"\n direction?: \"rtl\" | \"ltr\"\n actions?: [\n {\n label: string\n onClick: any\n variant:\n | \"outline\"\n | \"link\"\n | \"default\"\n | \"destructive\"\n | \"secondary\"\n | \"ghost\"\n }\n ]\n persistant?: boolean\n icon?: any\n className?: any\n}\nexport const HawaAlert: React.FunctionComponent<AlertTypes> = ({\n variant = \"normal\",\n direction = \"ltr\",\n severity = \"info\",\n duration,\n icon,\n className,\n ...props\n}) => {\n const alertRef = useRef(null)\n const [closed, setClosed] = useState(false)\n\n useEffect(() => {\n if (duration) {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n setClosed(true)\n }, duration)\n //To destroy the component after hiding it\n const timeoutDestroy = setTimeout(() => {\n setClosed(true)\n alertRef.current.removeChild(alertRef.current.children[0])\n }, duration + 1000)\n\n return () => {\n clearTimeout(timeoutHide)\n clearTimeout(timeoutDestroy)\n }\n }\n }, [duration])\n let closeButtonStyle = {\n none: \"hover:bg-gray-300\",\n info: \"hover:bg-blue-300\",\n warning: \"hover:bg-yellow-300\",\n error: \"hover:bg-red-300\",\n success: \"hover:bg-green-300\",\n }\n let styleVariant = {\n normal: {\n none: \"text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error: \"text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n \"top-accent\": {\n none: \"border-t-4 border-gray-300 text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"border-t-4 border-blue-300 text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"border-t-4 border-yellow-300 text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error:\n \"border-t-4 border-red-300 text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"border-t-4 border-green-300 text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n \"left-accent\": {\n none: \"border-l-4 border-gray-300 text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"border-l-4 border-blue-300 text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"border-l-4 border-yellow-300 text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error:\n \"border-l-4 border-red-300 text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"border-l-4 border-green-300 text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n \"right-accent\": {\n none: \"border-r-4 border-gray-300 text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"border-r-4 border-blue-300 text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"border-r-4 border-yellow-300 text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error:\n \"border-r-4 border-red-300 text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"border-r-4 border-green-300 text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n \"bottom-accent\": {\n none: \"border-b-4 border-gray-300 text-gray-700 bg-gray-100 dark:bg-gray-200 dark:text-gray-800\",\n info: \"border-b-4 border-blue-300 text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800\",\n warning:\n \"border-b-4 border-yellow-300 text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800\",\n error:\n \"border-b-4 border-red-300 text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800\",\n success:\n \"border-b-4 border-green-300 text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800\",\n },\n }\n return (\n <div ref={alertRef}>\n <div\n className={clsx(\n \"relative mb-4 flex flex-col rounded p-4 text-sm transition-all\",\n styleVariant[variant][severity],\n closed ? \"opacity-0\" : \"opacity-100\",\n className\n )}\n role=\"alert\"\n dir={direction}\n >\n <div className=\"flex flex-row\">\n {icon && (\n <div className={direction === \"rtl\" ? \"pl-2 pt-1\" : \"pr-2 pt-1\"}>\n {icon}\n </div>\n )}\n <div className=\"flex flex-col\">\n <span\n className={clsx(\n \"font-medium\",\n direction === \"rtl\" ? \"ml-8\" : \"mr-8\"\n )}\n >\n {props.title}\n </span>\n <span>{props.text}</span>\n {props.actions && (\n <div className=\"mt-2 flex flex-row gap-2\">\n {props.actions.map((act, index) => (\n <Button\n key={index}\n variant={act.variant}\n onClick={act.onClick()}\n >\n {act.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n </div>\n {!props.persistant && (\n <button\n type=\"button\"\n className={clsx(\n \"absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900\",\n closeButtonStyle[severity],\n direction === \"rtl\" ? \"left-2\" : \"right-2\"\n )}\n data-dismiss-target=\"#alert-default\"\n aria-label=\"Close\"\n onClick={() => {\n setClosed(true)\n setTimeout(() => {\n alertRef.current.removeChild(alertRef.current.children[0])\n }, 200)\n }}\n >\n <span className=\"sr-only\">Close</span>\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n )}\n </div>\n </div>\n )\n}\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../util\"\nimport { HawaLoading } from \"./HawaLoading\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center select-none rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n light: \"bg-primary/20 text-primary hover:bg-primary/40\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n neoBrutalism:\n \"cursor-pointer transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms] active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n heightless: \"px-4 py-4\",\n xs: \"h-fit py-1 text-[10px] px-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n xl: \"h-14 rounded-md px-10\",\n icon: \"h-10 w-10\",\n smallIcon: \"h-7 w-7\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n isLoading?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n isLoading,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = \"button\"\n\n // Determine the color for the HawaLoading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"bg-primary\"\n : \"bg-primary-foreground\"\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <HawaLoading\n design=\"dots-pulse\"\n color={loadingColor} // Apply the computed color here\n size=\"button\"\n />\n ) : (\n children\n )}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import React, { FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype LoadingTypes = {\n size?: \"button\" | \"sm\" | \"normal\" | \"lg\" | \"xl\"\n design?: \"spinner\" | \"dots-bounce\" | \"dots-pulse\" | \"pulse\" | \"spinner-dots\"\n color?: any\n}\n\nexport const HawaLoading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"sm\",\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"h-4 w-4\",\n sm: \"h-6 w-6\",\n normal: \"h-8 w-8\",\n lg: \"h-14 w-14\",\n xl: \"h-24 w-24\",\n }\n\n let animationStyles = {\n pulse: \"animate-in fade-in duration-1000\",\n bounce: \"animate-bounce\",\n }\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div className=\"flex flex-row gap-2\">\n <div\n className={clsx(\n \"animate-bounce rounded-full delay-100 repeat-infinite\",\n size === \"button\" ? \"h-2 w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"bg-primary\"\n )}\n ></div>\n <div\n className={clsx(\n \"animate-bounce rounded-full delay-200 repeat-infinite\",\n size === \"button\" ? \"h-2 w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"bg-primary\"\n )}\n ></div>\n <div\n className={clsx(\n \"animate-bounce rounded-full delay-300 repeat-infinite\",\n size === \"button\" ? \"h-2 w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"bg-primary\"\n )}\n ></div>\n </div>\n )\n\n default:\n return (\n <div className=\"flex flex-row gap-x-3\">\n <div aria-label=\"Loading...\" role=\"status\">\n <svg\n className={clsx(sizeStyles[size], \"animate-spin\")}\n viewBox=\"3 3 18 18\"\n >\n <path\n className=\"fill-primary/20\"\n d=\"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z\"\n ></path>\n <path\n className={color ? color : \"fill-primary\"}\n d=\"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z\"\n ></path>\n </svg>\n </div>\n </div>\n )\n }\n}\n","import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\nimport useTable from \"../hooks/useTable\"\nimport { cn } from \"../util\"\nimport { DropdownMenu, MenuItemType } from \"./DropdownMenu\"\nimport { Skeleton } from \"./Skeleton\"\n\ntype RowTypes = {\n hidden: boolean\n value: any\n suffix?: any\n}\ntype ColTypes = {\n hidden: boolean\n value: any\n sortable?: boolean\n}\ntype TableTypes = {\n pagination?: boolean\n isLoading?: boolean\n columns: ColTypes[]\n actions?: MenuItemType[]\n actionsWidth?: \"default\" | \"sm\" | \"lg\" | \"parent\"\n actionsSize?: \"default\" | \"sm\"\n direction?: \"rtl\" | \"ltr\"\n rows?: RowTypes[][]\n handleActionClick?: any\n end?: any\n size?: \"normal\" | \"small\"\n highlightFirst?: boolean\n bodyColor?: string\n headerColor?: string\n clickable?: boolean\n texts?: {\n actions?: string\n noData?: any\n items?: string\n page?: string\n filter?: string\n }\n bordersWidth?: string\n headerTools?: boolean\n borders?: \"all\" | \"cols\" | \"rows\" | \"outer\" | \"inner\"\n}\nconst ChevronIcon = () => (\n <svg\n aria-label=\"Chevron Right Icon\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"\n ></path>\n </svg>\n)\nexport const HawaTable: FC<TableTypes> = ({\n size = \"normal\",\n bodyColor = \"white\",\n headerColor = \"gray-200\",\n borders = \"all\",\n highlightFirst = false,\n direction = \"ltr\",\n bordersWidth = \"1\",\n pagination = true,\n ...props\n}) => {\n const [perPage, setPerPage] = useState(10)\n const [enteredPage, setEnteredPage] = useState(null)\n const [page, setPage] = useState(1)\n const [sortingCol, setSortingCol] = useState(null)\n const [sortedRows, setSortedRows] = useState(props.rows)\n const [sortColumn, setSortColumn] = useState(null)\n const [sortDirection, setSortDirection] = useState(null)\n const { slice, range } = useTable(\n props.rows,\n page,\n perPage,\n sortColumn,\n sortDirection\n )\n let isRTL = direction === \"rtl\"\n let sizeStyles = {\n normal: \"py-3 px-6\",\n small: \"px-3 py-1\",\n }\n const handleSort = (colIndex, sortable) => {\n if (sortable) {\n setSortColumn(colIndex)\n setSortDirection((prevDirection) =>\n prevDirection === \"asc\" ? \"desc\" : \"asc\"\n )\n }\n }\n const changePage = () => {\n if (slice?.length < 1 && page !== 1) {\n setPage(page - 1)\n }\n if (enteredPage) {\n setPage(enteredPage)\n }\n }\n useEffect(() => {\n changePage()\n }, [slice, page])\n\n return (\n <div className=\"relative flex flex-col gap-2 \">\n {props.isLoading ? (\n // <div>dd</div>\n <Skeleton className=\"h-[105px] w-full\" />\n ) : (\n <>\n <div className={`overflow-x-auto rounded bg-${headerColor}`}>\n {props.headerTools && (\n <div className=\"flex flex-row items-center justify-between gap-2 border bg-background px-2 py-2\">\n {props.headerTools}\n </div>\n )}\n <table\n className={clsx(\n // borders === \"outer\" || borders === \"all\"\n // ? `outline outline-[${bordersWidth}px] -outline-offset-1 outline-gray-300 dark:outline-gray-700`\n // : \"\",\n \"w-full rounded bg-muted text-left text-sm text-muted-foreground\",\n `bg-${headerColor}`\n )}\n >\n <thead\n className={clsx(\n \"bg-muted text-xs uppercase text-muted-foreground \",\n borders === \"rows\" || borders === \"all\" || borders === \"inner\"\n ? \"border-b \"\n : \"\"\n )}\n >\n <tr>\n {props.columns.map((col: any, i: any) => {\n if (col.hidden) {\n return\n } else {\n return (\n <th\n onClick={() =>\n col.sortable && handleSort(i, col.sortable)\n }\n key={i}\n scope=\"col\"\n colSpan={2}\n className={clsx(\n col.sortable\n ? \"cursor-pointer hover:bg-muted-foreground/10\"\n : \"\",\n sizeStyles[size],\n i !== 0 &&\n (borders === \"cols\" ||\n borders === \"all\" ||\n borders === \"inner\")\n ? `border-r border-r-[${bordersWidth}px] border-l border-l-[${bordersWidth}px]`\n : \"\"\n )}\n >\n {col.value}\n {sortColumn === i && (\n <span>{sortDirection === \"asc\" ? \" ▲\" : \" ▼\"}</span>\n )}\n </th>\n )\n }\n })}\n {props.actions ? (\n <th\n scope=\"col\"\n className={clsx(\n sizeStyles[size],\n \"w-[calc(1%)] text-center\"\n )}\n >\n {props.texts?.actions ?? \"Actions\"}\n </th>\n ) : null}\n </tr>\n </thead>\n <tbody\n className={\n bodyColor && props.rows ? `bg-${bodyColor}` : \"bg-transparent\"\n }\n >\n {/* Table Rows */}\n {sortedRows ? (\n slice?.map((singleRow: any, rowIndex: any) => {\n let lastRow = rowIndex == slice?.length - 1\n return (\n <tr\n key={rowIndex}\n className={clsx(\n \" text-mute-foreground border bg-background\",\n props.clickable ? \"hover:bg-gray-100\" : \"\",\n !lastRow &&\n (borders === \"all\" ||\n borders === \"rows\" ||\n borders === \"inner\")\n ? `border-b border-b-[${bordersWidth}px]`\n : \"\"\n )}\n >\n {singleRow?.map((r: any, i: any) => {\n let firstCell = i === 0\n let lastCell = i === singleRow?.length - 1\n let isRTLLastCell =\n isRTL && lastRow && lastCell && !props.actions\n let isRTLFirstCell = isRTL && lastRow && firstCell\n let isLTRFirstCell = !isRTL && lastRow && firstCell\n let isLTRLastCell =\n !isRTL && lastRow && lastCell && !props.actions\n\n if (r.hidden) {\n return\n } else {\n return (\n <td\n colSpan={2}\n key={i}\n className={clsx(\n // borders === \"outer\" ? \"border\" : \"\",\n sizeStyles[size],\n highlightFirst && firstCell\n ? \"font-bold\"\n : \"font-normal\",\n isRTLFirstCell\n ? \"rounded-bl-none rounded-br\"\n : isRTLLastCell\n ? \"rounded-bl rounded-br-none\"\n : isLTRFirstCell\n ? \"rounded-bl rounded-br-none\"\n : isLTRLastCell\n ? \"rounded-bl-none rounded-br\"\n : \"\",\n\n !firstCell &&\n !lastCell &&\n (borders === \"cols\" ||\n borders === \"inner\" ||\n borders === \"all\")\n ? `border-l border-l-[${bordersWidth}px] border-r border-r-[${bordersWidth}px]`\n : !firstCell &&\n props.actions &&\n (borders === \"cols\" ||\n borders === \"inner\" ||\n borders === \"all\")\n ? `border-l border-l-[${bordersWidth}px] border-r border-r-[${bordersWidth}px]`\n : \"\"\n // bodyColor ? `bg-${bodyColor}` : \"bg-white\"\n )}\n >\n {r.value} {r.suffix && r.suffix}\n </td>\n )\n }\n })}\n {props.actions && (\n <td\n align={isRTL ? \"right\" : \"left\"}\n className={cn(\n isRTL && lastRow && \"rounded-bl rounded-br-none\",\n !isRTL && lastRow && \"rounded-bl-none rounded-br\"\n )}\n colSpan={1}\n >\n <div className=\"flex items-center justify-center\">\n <DropdownMenu\n width={props.actionsWidth}\n size={props.actionsSize}\n direction={direction}\n side=\"right\"\n items={props.actions}\n selectCallback={(e) =>\n props.handleActionClick(e, singleRow)\n }\n trigger={\n <div className=\"flex w-fit cursor-pointer items-center justify-center rounded p-2 transition-all hover:bg-primary/20 \">\n <svg\n aria-label=\"Vertical Three Dots Menu Icon\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z\"></path>\n </svg>\n </div>\n }\n />\n </div>\n </td>\n )}\n </tr>\n )\n })\n ) : (\n <tr className=\"bg-transparent\">\n <td colSpan={20}>\n <div\n className={clsx(\n \"w-full rounded-b border p-5 text-center\",\n // bodyColor ? `bg-${bodyColor}` : \"bg-background\"\n \"bg-background\"\n )}\n >\n {props.texts?.noData ?? \"No Data\"}\n </div>\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n </>\n )}\n {pagination && (\n <div className=\"flex flex-row items-center justify-between \">\n {/* Pagination Pages */}\n {range.length > 1 ? (\n <div className=\"flex w-fit flex-row items-stretch justify-center gap-2 overflow-clip rounded \">\n {/* Previous Page Button */}\n <div\n className={cn(\n \"flex h-6 w-6 rotate-180 cursor-pointer items-center justify-center rounded border bg-background p-1 text-xs hover:bg-primary/10 dark:hover:bg-primary/10\",\n direction === \"rtl\" && \"rotate-0\"\n )}\n onClick={() =>\n page <= 1 ? setPage(range.length) : setPage(page - 1)\n }\n >\n <ChevronIcon />\n </div>\n {/* Numbered Pagination */}\n <div className=\"flex flex-row items-center overflow-clip rounded transition-all\">\n {/* The first page */}\n {range.length > 6 &&\n range.map((el, index) => {\n if (index <= 0) {\n return (\n <button\n key={index}\n className={clsx(\n \"w-10 p-1 text-xs hover:bg-gray-200\",\n page === el\n ? \"bg-primary text-primary-foreground hover:bg-primary\"\n : \"bg-gray-100\"\n )}\n onClick={() => setPage(el)}\n >\n {el}\n </button>\n )\n }\n })}\n {/* The Current Page / Input */}\n {range?.length > 6 && (\n <input\n type={\"text\"}\n className=\" w-10 bg-gray-100 p-1 text-center text-xs\"\n defaultValue={\n page !== 0 || page !== range.length - 1 ? page : \"...\"\n }\n value={\n page == 1 || page == range.length\n ? \"...\"\n : enteredPage\n ? enteredPage\n : page\n }\n onChange={(e) => setEnteredPage(parseInt(e.target.value))}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") {\n setPage(enteredPage)\n setEnteredPage(null)\n }\n }}\n />\n )}\n {/* The last page */}\n {range?.length > 6 &&\n range.map((el, index) => {\n if (index >= range.length - 1) {\n return (\n <button\n key={index}\n className={clsx(\n \"w-10 p-1 text-xs hover:bg-gray-200\",\n page === el\n ? \"bg-primary text-primary-foreground hover:bg-primary\"\n : \"bg-gray-100\"\n )}\n onClick={() => setPage(el)}\n >\n {el}\n </button>\n )\n }\n })}\n\n {/* All Pages if less than 6 pages */}\n {range?.length <= 6 &&\n range.map((el, index) => {\n return (\n <button\n key={index}\n className={clsx(\n \"w-10 p-1 text-xs\",\n page === el\n ? \"bg-primary text-primary-foreground \"\n : \"border bg-background hover:bg-primary/10 dark:hover:bg-primary/10\",\n\n // Check if the direction is 'rtl'\n direction === \"rtl\"\n ? // If direction is 'rtl', then check for the index conditions\n // and apply respective classes along with the 'something' class\n index === 0\n ? \"rounded-r border-l-0\" // Apply if index is 0 and direction is 'rtl'\n : index === range.length - 1\n ? \"rounded-l border-r-0\" // Apply if index is the last element and direction is 'rtl'\n : \"\" // Apply if index is other than 0 or last element and direction is 'rtl'\n : // If direction is not 'rtl', then again check for the index conditions\n // and apply respective classes along with the 'something else' class\n index === 0\n ? \"rounded-l border-r-0\" // Apply if index is 0 and direction is not 'rtl'\n : index === range.length - 1\n ? \"rounded-r border-l-0\" // Apply if index is the last element and direction is not 'rtl'\n : \"\" // Apply if index is other than 0 or last element and direction is not 'rtl'\n )}\n onClick={() => setPage(el)}\n >\n {el}\n </button>\n )\n })}\n </div>\n {/* Next Page Button */}\n <div\n onClick={() =>\n page >= range.length ? setPage(1) : setPage(page + 1)\n }\n className={cn(\n \"flex h-6 w-6 cursor-pointer items-center justify-center rounded border bg-background p-1 text-xs hover:bg-primary/10 dark:hover:bg-primary/10\",\n direction === \"rtl\" && \"rotate-180\"\n )}\n >\n <ChevronIcon />\n </div>\n </div>\n ) : (\n <div></div>\n )}\n {/* Pagination Settings */}\n {props.rows ? (\n <div className=\"flex w-fit flex-row items-center gap-2 \">\n <div className=\"text-xs \">\n {props.rows.length} {props.texts?.items ?? \"Items\"}\n </div>\n\n <select\n value={perPage}\n className=\"h-6 cursor-pointer rounded border bg-background px-2 text-xs\"\n onChange={(e) => {\n setPerPage(parseInt(e.target.value))\n }}\n >\n <option value={10} style={{ fontSize: 10 }}>\n 10 / {props.texts?.page ?? \"Page\"}\n </option>\n <option value={20} style={{ fontSize: 10 }}>\n 20 / {props.texts?.page ?? \"Page\"}\n </option>\n <option value={30} style={{ fontSize: 10 }}>\n 30 / {props.texts?.page ?? \"Page\"}\n </option>\n <option value={50} style={{ fontSize: 10 }}>\n 50 / {props.texts?.page ?? \"Page\"}\n </option>\n <option value={100} style={{ fontSize: 10 }}>\n 100 / {props.texts?.page ?? \"Page\"}\n </option>\n </select>\n </div>\n ) : (\n <div></div>\n )}\n </div>\n )}\n\n {/* <Pagination\n handleNextPage={() =>\n page >= range.length ? setPage(1) : setPage(page + 1)\n }\n handlePrevPage={() =>\n page <= 1 ? setPage(range.length) : setPage(page - 1)\n }\n /> */}\n </div>\n )\n}\n","// useTable.js\nimport React, { useState, useEffect } from \"react\"\n\nconst calculateRange = (data, rowsPerPage) => {\n const range = []\n const num = Math.ceil(data?.length / rowsPerPage)\n let i = 1\n for (let i = 1; i <= num; i++) {\n range.push(i)\n }\n return range\n}\n\nconst sliceData = (data, page, rowsPerPage) => {\n return data?.slice((page - 1) * rowsPerPage, page * rowsPerPage)\n}\n\n// useTable.js\nconst sortData = (data, sortColumn, sortDirection) => {\n if (sortColumn !== null) {\n return data?.sort((a, b) => {\n const aValue = a[sortColumn].value\n const bValue = b[sortColumn].value\n\n // Handle non-string values by using simple comparison\n if (typeof aValue === \"string\" && typeof bValue === \"string\") {\n if (sortDirection === \"asc\") {\n return aValue.localeCompare(bValue)\n } else {\n return bValue.localeCompare(aValue)\n }\n } else {\n if (sortDirection === \"asc\") {\n return aValue - bValue\n } else {\n return bValue - aValue\n }\n }\n })\n }\n return data\n}\n\nconst useTable = (data, page, rowsPerPage, sortColumn, sortDirection) => {\n const [tableRange, setTableRange] = useState([])\n const [slice, setSlice] = useState([])\n\n useEffect(() => {\n if (data) {\n const range = calculateRange(data, rowsPerPage)\n setTableRange([...range])\n\n const sortedData = sortData(data, sortColumn, sortDirection)\n const slicedData = sliceData(sortedData, page, rowsPerPage)\n setSlice([...slicedData])\n }\n }, [data, setTableRange, page, rowsPerPage, sortColumn, sortDirection])\n\n return { slice, range: tableRange }\n}\n\nexport default useTable\n\n// import React, { useState, useEffect } from \"react\"\n\n// const calculateRange = (data, rowsPerPage) => {\n// const range = []\n// const num = Math.ceil(data?.length / rowsPerPage)\n// let i = 1\n// for (let i = 1; i <= num; i++) {\n// range.push(i)\n// }\n// return range\n// }\n\n// const sliceData = (data, page, rowsPerPage) => {\n// return data?.slice((page - 1) * rowsPerPage, page * rowsPerPage)\n// }\n\n// const sortData = (data, sortColumn, sortDirection) => {\n// if (sortColumn !== null) {\n// return data?.sort((a, b) => {\n// const aValue = a[sortColumn].value\n// const bValue = b[sortColumn].value\n\n// if (sortDirection === \"asc\") {\n// return aValue.localeCompare(bValue)\n// } else {\n// return bValue.localeCompare(aValue)\n// }\n// })\n// }\n// return data\n// }\n\n// const useTable = (data, page, rowsPerPage, sortColumn, sortDirection) => {\n// const [tableRange, setTableRange] = useState([])\n// const [slice, setSlice] = useState([])\n\n// useEffect(() => {\n// if (data) {\n// const range = calculateRange(data, rowsPerPage)\n// setTableRange([...range])\n\n// const sortedData = sortData(data, sortColumn, sortDirection)\n// const slicedData = sliceData(sortedData, page, rowsPerPage)\n// setSlice([...slicedData])\n// }\n// }, [data, setTableRange, page, rowsPerPage, sortColumn, sortDirection])\n\n// return { slice, range: tableRange }\n// }\n\n// export default useTable\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n// import React, { useState, useEffect } from \"react\"\n\n// const calculateRange = (data, rowsPerPage) => {\n// const range = []\n// const num = Math.ceil(data?.length / rowsPerPage)\n// let i = 1\n// for (let i = 1; i <= num; i++) {\n// range.push(i)\n// }\n// return range\n// }\n\n// const sliceData = (data, page, rowsPerPage) => {\n// return data?.slice((page - 1) * rowsPerPage, page * rowsPerPage)\n// }\n\n// const useTable = (data, page, rowsPerPage) => {\n// const [tableRange, setTableRange] = useState([])\n// const [slice, setSlice] = useState([])\n\n// useEffect(() => {\n// if (data) {\n// const range = calculateRange(data, rowsPerPage)\n// setTableRange([...range])\n\n// const slice = sliceData(data, page, rowsPerPage)\n// setSlice([...slice])\n// }\n// }, [data, setTableRange, page, setSlice, rowsPerPage])\n\n// return { slice, range: tableRange }\n// }\n\n// export default useTable\n","import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\n// import { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../util\"\n\nconst DropdownMenuRoot = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center justify-between rounded-sm px-2 py-3 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n <div className=\"flex flex-row items-center gap-2\">{children}</div>{\" \"}\n {/* <ChevronRight className=\"ml-auto h-4 w-4\" /> */}\n <svg\n aria-label=\"Chevron Right Icon\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n className={cn(props.dir === \"rtl\" ? \"rotate-180\" : \"\")}\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"\n ></path>\n </svg>\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n end?: any\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n disabled={props.disabled}\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center justify-between rounded-sm text-sm outline-none transition-colors focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n <div className=\"flex flex-row items-center gap-2 \">{props.children}</div>\n\n {props.end && props.end}\n </DropdownMenuPrimitive.Item>\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n {/* <Check className=\"h-4 w-4\" /> */}\n <svg\n aria-label=\"Check Mark\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"0.60em\"\n width=\"0.60em\"\n >\n <path d=\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\"></path>\n </svg>{\" \"}\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n {/* <Circle className=\"h-2 w-2 fill-current\" /> */}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n aria-label=\"Circle\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"h-2 w-2 fill-current\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\ntype ExtendedDropdownMenuContentProps = Partial<\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n> & {\n // Add any additional types or overrides here, for example:\n // side?: \"left\" | \"right\" | \"top\" | \"bottom\"\n}\ntype ExtendedDropdownMenuTriggerProps = Partial<\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>\n> & {\n // Add any additional types or overrides here, for example:\n // side?: \"left\" | \"right\" | \"top\" | \"bottom\"\n}\n\nexport type SubItem = {\n label: string\n value: string\n icon?: any\n action?: () => void\n highlighted?: boolean\n disabled?: boolean\n}\nexport type MenuItemType = {\n icon?: any\n label?: string\n value?: string\n end?: any\n presist?: boolean\n type?: \"separator\" | \"label\"\n action?: () => void\n highlighted?: boolean\n subitems?: SubItem[] // Note the use of the optional modifier\n disabled?: boolean\n}\ninterface DropdownMenuProps {\n trigger?: any\n items?: MenuItemType[]\n direction?: \"rtl\" | \"ltr\"\n onItemSelect?: any\n className?: ExtendedDropdownMenuContentProps[\"className\"]\n triggerClassname?: ExtendedDropdownMenuTriggerProps[\"className\"]\n sideOffset?: ExtendedDropdownMenuContentProps[\"sideOffset\"]\n side?: ExtendedDropdownMenuContentProps[\"side\"]\n align?: ExtendedDropdownMenuContentProps[\"align\"]\n alignOffset?: ExtendedDropdownMenuContentProps[\"alignOffset\"]\n width?: \"default\" | \"sm\" | \"lg\" | \"parent\"\n size?: \"default\" | \"sm\"\n selectCallback?: any\n}\n\n// const dropDownMenuVariants = cva(\n// \"inline-flex items-center justify-center select-none rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n// {\n// variants: {\n// width: {\n// default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n// },\n// size: {\n// default: \"h-10 px-4 py-2\",\n// sm: \"h-9 rounded-md px-3\",\n// },\n// },\n// defaultVariants: {\n// width: \"default\",\n// size: \"default\",\n// },\n// }\n// )\n\nexport const DropdownMenu: React.FC<DropdownMenuProps> = ({\n trigger,\n items,\n direction,\n onItemSelect,\n sideOffset,\n side,\n className,\n triggerClassname,\n align,\n alignOffset,\n selectCallback,\n size = \"default\",\n width = \"default\",\n}) => {\n const widthStyles = {\n default: \"min-w-[8rem]\",\n sm: \"w-fit\",\n lg: \"w-[200px]\",\n parent: \"ddm-w-parent\",\n }\n const sizeStyles = {\n default: \"px-2 py-3 \",\n sm: \"text-xs px-1.5 py-1.5\",\n }\n return (\n <DropdownMenuRoot dir={direction}>\n <DropdownMenuTrigger asChild className={triggerClassname}>\n {trigger}\n </DropdownMenuTrigger>\n <DropdownMenuPortal>\n <DropdownMenuContent\n side={side}\n sideOffset={sideOffset}\n className={cn(className, widthStyles[width], \"flex flex-col gap-2\")}\n align={align}\n alignOffset={alignOffset}\n >\n {items.map((item, index) => {\n if (item.type === \"separator\") {\n return <DropdownMenuSeparator key={index} />\n } else if (item.type === \"label\") {\n return (\n <DropdownMenuLabel key={index}>{item.label}</DropdownMenuLabel>\n )\n } else {\n return item.subitems ? (\n <DropdownMenuSub key={index}>\n <DropdownMenuSubTrigger\n className={cn(sizeStyles[size])}\n dir={direction}\n >\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuSubTrigger>\n <DropdownMenuPortal>\n <DropdownMenuSubContent>\n {item.subitems.map((subitem, subIndex) => (\n <DropdownMenuItem\n key={subIndex}\n className={cn(\n sizeStyles[size],\n\n !item.icon && !item.label\n ? \"px-0 py-0 focus:bg-transparent\"\n : \"focus:bg-accent\"\n )}\n disabled={subitem.disabled}\n // className=\"flex flex-row gap-2\"\n onSelect={() => {\n subitem.action()\n if (selectCallback) {\n selectCallback(subitem.value)\n }\n }}\n >\n {subitem.icon && subitem.icon}\n {subitem.label && subitem.label}\n </DropdownMenuItem>\n ))}\n </DropdownMenuSubContent>\n </DropdownMenuPortal>\n </DropdownMenuSub>\n ) : (\n <DropdownMenuItem\n key={index}\n disabled={item.disabled}\n onSelect={(e) => {\n if (item.presist) {\n e.preventDefault()\n }\n if (item.action) {\n item.action()\n if (selectCallback) {\n selectCallback(item.value)\n }\n } else {\n if (selectCallback) {\n selectCallback(item.value)\n }\n }\n }}\n end={item.end}\n className={cn(\n sizeStyles[size],\n !item.icon && !item.label\n ? \"px-0 py-0 focus:bg-transparent \"\n : \"focus:bg-accent \",\n item.presist && \"focus:bg-transparent\"\n )}\n >\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuItem>\n )\n }\n })}\n </DropdownMenuContent>\n </DropdownMenuPortal>\n </DropdownMenuRoot>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaTextField } from \"./HawaTextField\"\n\ntype SearchBarTypes = {}\nexport const HawaSearchBar: FC<SearchBarTypes> = (props) => {\n return <HawaTextField type={\"search\"} {...props} />\n}\n","import React, { useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype AccordionTypes = {\n /** The title of the clickable accordion bar */\n title: string\n /** The content inside the accordion to be visible once the bar is clicked */\n content: any\n /** The index of each accordion, must be unique for each usage of this component */\n index: any\n}\nexport const HawaAccordion: FC<AccordionTypes> = (props) => {\n const [collapse, setCollapse] = useState(false)\n\n return (\n <div className=\"h-fit w-full\">\n <button\n id={\"accordion-collapse-heading-\" + props.index}\n type=\"button\"\n className={clsx(\n collapse ? \"rounded\" : \"rounded-t\",\n \"flex w-full items-center justify-between border border-gray-200 bg-gray-100 p-5 text-left font-medium text-gray-900 hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:text-white dark:hover:bg-gray-800 dark:focus:ring-gray-800\"\n )}\n onClick={() => setCollapse(!collapse)}\n data-accordion-target={\"#accordion-collapse-body-\" + props.index}\n aria-expanded=\"true\"\n aria-controls={\"accordion-collapse-body-\" + props.index}\n >\n <span>{props.title}</span>\n <svg\n data-accordion-icon=\"\"\n className={`h-6 w-6 ${\n collapse ? \"\" : \"rotate-180\"\n } shrink-0 transition-all`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n <div\n id={\"accordion-collapse-body-\" + props.index}\n aria-labelledby={\"accordion-collapse-heading-\" + props.index}\n className={clsx(\n collapse ? \"invisible hidden h-0 p-0\" : \"visible h-full\",\n \"w-full rounded-b border border-t-0 border-gray-200 p-5 font-light dark:border-gray-700 dark:bg-gray-900\"\n )}\n >\n <p className=\"mb-2 text-gray-500 dark:text-gray-400\">{props.content}</p>\n </div>\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport Countries from \"../countries\"\nimport Select from \"react-select\"\ntype MenuTypes = {\n cx: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n}\nconst Menu: FC<MenuTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n ...props\n}) => {\n return (\n <div\n // width: 190,\n // borderRadius: \"0.5rem\",\n className=\"absolute z-50 w-[190px] rounded border bg-background\"\n // \"absolute z-10 mt-2 flex w-full flex-col justify-start rounded bg-white p-1 px-1.5 ring-1 ring-blue-200\"\n ref={innerRef}\n {...innerProps}\n // {...props}\n >\n {children}\n </div>\n )\n}\ntype OptionTypes = {\n cx: any\n data: any\n children: any\n getStyles: any\n innerProps: any\n innerRef: any\n}\nconst Option: FC<OptionTypes> = ({\n cx,\n children,\n getStyles,\n innerProps,\n innerRef,\n ...props\n}) => (\n <div\n ref={innerRef}\n className=\"m-2 flex cursor-pointer flex-row items-center justify-between rounded-inner p-1 px-2 hover:bg-primary hover:text-primary-foreground\"\n {...innerProps}\n >\n <div className=\"flex flex-row items-center justify-center gap-1\">\n <img className=\"h-8 w-8\" src={props.data.image}></img>\n <span className=\"text-[10px]\">{props.data.country_label}</span>\n </div>\n {children}\n </div>\n)\n\ntype HawaPhoneInputTypes = {\n preferredCountry?: any\n helperText?: any\n label?: string\n value?: any\n country?: any\n handleChange?: any\n}\nexport const HawaPhoneInput: FC<HawaPhoneInputTypes> = (props) => {\n const [selectedCountry, setSelectedCountry] = useState(\"+966\")\n\n return (\n <div className=\"mb-3 flex flex-col\">\n {props.label && (\n <label className=\"mb-2 block text-sm font-medium\">{props.label}</label>\n )}\n <div dir=\"ltr\" className=\"flex flex-row \">\n <Select\n classNames={{\n // container: () => \"cursor-pointer z-10 border rounded-l bg-background\",\n control: () =>\n \"w-[64px] text-right pr-2 cursor-pointer z-10 border rounded-l bg-background\",\n placeholder: (state) => \"text-muted-foreground text-right \",\n input: (state) =>\n \"bg-transparent cursor-pointer dark:text-white p-2 rounded-l text-[0.875rem] \",\n valueContainer: () => \"rounded-l h-auto text-[0.875rem]\",\n // container: () => \"bg-orange-400 border-none\",\n // control: () => \"bg-blue-500\",\n // menu: () => \"bg-red-900\",\n }}\n styles={{\n // input: (base) => ({\n // ...base,\n // fontSize: \"0.875rem\",\n // \"input:focus\": {\n // boxShadow: \"none\",\n // },\n // lineHeight: \"1.25rem\",\n // padding: \"0.37rem\",\n // paddingLeft: 0,\n // textAlign: \"right\",\n // direction: \"ltr\",\n // }),\n // singleValue: (base) => ({\n // ...base,\n // fontSize: \"0.875rem\",\n // // textAlign: \"right\",\n // }),\n placeholder: (base) => ({\n ...base,\n fontSize: \"0.875rem\",\n textAlign: \"right\",\n }),\n // control: (base) => ({\n // ...base,\n // width: 64,\n // borderRadius: \"0.5rem\",\n // borderTopRightRadius: 0,\n // borderBottomRightRadius: 0,\n // }),\n // menu: (base) => ({\n // ...base,\n // width: 190,\n // borderRadius: \"0.5rem\",\n // }),\n }}\n components={{\n Option,\n Menu,\n // SelectContainer,\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n // Placeholder: () => <div className=\"bg-red-400\">test</div>,\n // SelectContainer:\n // () =>\n // ({ innerProps, innerRef }) =>\n // <div ref={innerRef} {...innerProps} />,\n }}\n // className=\"bg-red-500\"\n\n options={Countries}\n isMulti={false}\n isSearchable={true}\n isClearable={false}\n placeholder=\"+966\"\n unstyled\n defaultValue={props.preferredCountry}\n value={selectedCountry}\n onChange={(newValue, action) => setSelectedCountry(newValue)}\n />\n <input\n onChange={props.handleChange}\n type=\"number\"\n placeholder=\"531045453\"\n // text-gray-900 dark:text-gray-300\n // dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500\n className=\"block w-full rounded-r border bg-background p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500\"\n\n // className=\"block w-full appearance-none rounded rounded-l-none border border-l-0\n // bg-background p-2 text-[0.875rem] text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:text-white \"\n />\n {props.helperText && (\n <p className=\"mb-1 mt-1 text-xs text-red-600 dark:text-red-500\">\n {props.helperText}\n </p>\n )}\n </div>\n </div>\n )\n}\n","let countries: any = [\n {\n country_label: \"Saudi Arabia\",\n code: \"SA\",\n unicode: \"🇸🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SA.svg\",\n label: \"+966\",\n },\n {\n country_label: \"United Arab Emirates\",\n code: \"AE\",\n unicode: \"🇦🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AE.svg\",\n label: \"+971\",\n },\n {\n country_label: \"Bahrain\",\n code: \"BH\",\n unicode: \"🇧🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BH.svg\",\n label: \"+973\",\n },\n {\n country_label: \"Kuwait\",\n code: \"KW\",\n unicode: \"🇰🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KW.svg\",\n label: \"+965\",\n },\n {\n country_label: \"Qatar\",\n code: \"QA\",\n unicode: \"🇶🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/QA.svg\",\n label: \"+974\",\n },\n {\n country_label: \"Oman\",\n code: \"OM\",\n unicode: \"🇴🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/OM.svg\",\n label: \"+968\",\n },\n {\n country_label: \"Andorra\",\n value: \"Andorra\",\n code: \"AD\",\n unicode: \"🇦🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AD.svg\",\n label: \"+376\",\n },\n\n {\n country_label: \"Afghanistan\",\n code: \"AF\",\n unicode: \"🇦🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AF.svg\",\n label: \"+93\",\n },\n {\n country_label: \"Antigua & Barbuda\",\n code: \"AG\",\n unicode: \"🇦🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AG.svg\",\n label: \"+1268\",\n },\n {\n country_label: \"Anguilla\",\n code: \"AI\",\n unicode: \"🇦🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AI.svg\",\n label: \"+1264\",\n },\n {\n country_label: \"Albania\",\n code: \"AL\",\n unicode: \"🇦🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AL.svg\",\n label: \"+355\",\n },\n {\n country_label: \"Armenia\",\n code: \"AM\",\n unicode: \"🇦🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AM.svg\",\n label: \"+374\",\n },\n {\n country_label: \"Angola\",\n code: \"AO\",\n unicode: \"🇦🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AO.svg\",\n label: \"+244\",\n },\n {\n country_label: \"Antarctica\",\n code: \"AQ\",\n unicode: \"🇦🇶\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AQ.svg\",\n label: \"+672\",\n },\n {\n country_label: \"Argentina\",\n code: \"AR\",\n unicode: \"🇦🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AR.svg\",\n label: \"+54\",\n },\n {\n country_label: \"American Samoa\",\n code: \"AS\",\n unicode: \"🇦🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AS.svg\",\n label: \"+1684\",\n },\n {\n country_label: \"Austria\",\n code: \"AT\",\n unicode: \"🇦🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AT.svg\",\n label: \"+43\",\n },\n {\n country_label: \"Australia\",\n code: \"AU\",\n unicode: \"🇦🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AU.svg\",\n label: \"+61\",\n },\n {\n country_label: \"Aruba\",\n code: \"AW\",\n unicode: \"🇦🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AW.svg\",\n label: \"+297\",\n },\n {\n country_label: \"Åland Islands\",\n code: \"AX\",\n unicode: \"🇦🇽\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AX.svg\",\n label: \"+358\",\n },\n {\n country_label: \"Azerbaijan\",\n code: \"AZ\",\n unicode: \"🇦🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AZ.svg\",\n label: \"+994\",\n },\n {\n country_label: \"Bosnia & Herzegovina\",\n code: \"BA\",\n unicode: \"🇧🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BA.svg\",\n label: \"+387\",\n },\n {\n country_label: \"Barbados\",\n code: \"BB\",\n unicode: \"🇧🇧\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BB.svg\",\n label: \"+1246\",\n },\n {\n country_label: \"Bangladesh\",\n code: \"BD\",\n unicode: \"🇧🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BD.svg\",\n label: \"+880\",\n },\n {\n country_label: \"Belgium\",\n code: \"BE\",\n unicode: \"🇧🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BE.svg\",\n label: \"+32\",\n },\n {\n country_label: \"Burkina Faso\",\n code: \"BF\",\n unicode: \"🇧🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BF.svg\",\n label: \"+226\",\n },\n {\n country_label: \"Bulgaria\",\n code: \"BG\",\n unicode: \"🇧🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BG.svg\",\n label: \"+359\",\n },\n\n {\n country_label: \"Burundi\",\n code: \"BI\",\n unicode: \"🇧🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BI.svg\",\n label: \"+257\",\n },\n {\n country_label: \"Benin\",\n code: \"BJ\",\n unicode: \"🇧🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BJ.svg\",\n label: \"+229\",\n },\n {\n country_label: \"St. Barthélemy\",\n code: \"BL\",\n unicode: \"🇧🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BL.svg\",\n label: \"+590\",\n },\n {\n country_label: \"Bermuda\",\n code: \"BM\",\n unicode: \"🇧🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BM.svg\",\n label: \"+1441\",\n },\n {\n country_label: \"Brunei\",\n code: \"BN\",\n unicode: \"🇧🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BN.svg\",\n label: \"+673\",\n },\n {\n country_label: \"Bolivia\",\n code: \"BO\",\n unicode: \"🇧🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BO.svg\",\n label: \"+591\",\n },\n {\n country_label: \"Brazil\",\n code: \"BR\",\n unicode: \"🇧🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BR.svg\",\n label: \"+55\",\n },\n {\n country_label: \"Bahamas\",\n code: \"BS\",\n unicode: \"🇧🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BS.svg\",\n label: \"+1242\",\n },\n {\n country_label: \"Bhutan\",\n code: \"BT\",\n unicode: \"🇧🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BT.svg\",\n label: \"+975\",\n },\n {\n country_label: \"Botswana\",\n code: \"BW\",\n unicode: \"🇧🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BW.svg\",\n label: \"+267\",\n },\n {\n country_label: \"Belarus\",\n code: \"BY\",\n unicode: \"🇧🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BY.svg\",\n label: \"+375\",\n },\n {\n country_label: \"Belize\",\n code: \"BZ\",\n unicode: \"🇧🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BZ.svg\",\n label: \"+501\",\n },\n {\n country_label: \"Canada\",\n code: \"CA\",\n unicode: \"🇨🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CA.svg\",\n label: \"+1\",\n },\n {\n country_label: \"Cocos (Keeling) Islands\",\n code: \"CC\",\n unicode: \"🇨🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CC.svg\",\n label: \"+61\",\n },\n {\n country_label: \"Congo - Kinshasa\",\n code: \"CD\",\n unicode: \"🇨🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CD.svg\",\n label: \"+243\",\n },\n {\n country_label: \"Central African Republic\",\n code: \"CF\",\n unicode: \"🇨🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CF.svg\",\n label: \"+236\",\n },\n {\n country_label: \"Congo - Brazzaville\",\n code: \"CG\",\n unicode: \"🇨🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CG.svg\",\n label: \"+242\",\n },\n {\n country_label: \"Switzerland\",\n code: \"CH\",\n unicode: \"🇨🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CH.svg\",\n label: \"+41\",\n },\n {\n country_label: \"Côte d’Ivoire\",\n code: \"CI\",\n unicode: \"🇨🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CI.svg\",\n label: \"+225\",\n },\n {\n country_label: \"Cook Islands\",\n code: \"CK\",\n unicode: \"🇨🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CK.svg\",\n label: \"+682\",\n },\n {\n country_label: \"Chile\",\n code: \"CL\",\n unicode: \"🇨🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CL.svg\",\n label: \"+56\",\n },\n {\n country_label: \"Cameroon\",\n code: \"CM\",\n unicode: \"🇨🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CM.svg\",\n label: \"+237\",\n },\n {\n country_label: \"China\",\n code: \"CN\",\n unicode: \"🇨🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CN.svg\",\n label: \"+86\",\n },\n {\n country_label: \"Colombia\",\n code: \"CO\",\n unicode: \"🇨🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CO.svg\",\n label: \"+57\",\n },\n {\n country_label: \"Costa Rica\",\n code: \"CR\",\n unicode: \"🇨🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CR.svg\",\n label: \"+506\",\n },\n {\n country_label: \"Cuba\",\n code: \"CU\",\n unicode: \"🇨🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CU.svg\",\n label: \"+53\",\n },\n {\n country_label: \"Cape Verde\",\n code: \"CV\",\n unicode: \"🇨🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CV.svg\",\n label: \"+238\",\n },\n {\n country_label: \"Christmas Island\",\n code: \"CX\",\n unicode: \"🇨🇽\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CX.svg\",\n label: \"+61\",\n },\n {\n country_label: \"Cyprus\",\n code: \"CY\",\n unicode: \"🇨🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CY.svg\",\n label: \"+357\",\n },\n {\n country_label: \"Czechia\",\n code: \"CZ\",\n unicode: \"🇨🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CZ.svg\",\n label: \"+420\",\n },\n {\n country_label: \"Germany\",\n code: \"DE\",\n unicode: \"🇩🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DE.svg\",\n label: \"+49\",\n },\n {\n country_label: \"Djibouti\",\n code: \"DJ\",\n unicode: \"🇩🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DJ.svg\",\n label: \"+253\",\n },\n {\n country_label: \"Denmark\",\n code: \"DK\",\n unicode: \"🇩🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DK.svg\",\n label: \"+45\",\n },\n {\n country_label: \"Dominica\",\n code: \"DM\",\n unicode: \"🇩🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DM.svg\",\n label: \"+1767\",\n },\n {\n country_label: \"Dominican Republic\",\n code: \"DO\",\n unicode: \"🇩🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DO.svg\",\n label: \"+1849\",\n },\n {\n country_label: \"Algeria\",\n code: \"DZ\",\n unicode: \"🇩🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DZ.svg\",\n label: \"+213\",\n },\n {\n country_label: \"Ecuador\",\n code: \"EC\",\n unicode: \"🇪🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EC.svg\",\n label: \"+593\",\n },\n {\n country_label: \"Estonia\",\n code: \"EE\",\n unicode: \"🇪🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EE.svg\",\n label: \"+372\",\n },\n {\n country_label: \"Egypt\",\n code: \"EG\",\n unicode: \"🇪🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EG.svg\",\n label: \"+20\",\n },\n {\n country_label: \"Eritrea\",\n code: \"ER\",\n unicode: \"🇪🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ER.svg\",\n label: \"+291\",\n },\n {\n country_label: \"Spain\",\n code: \"ES\",\n unicode: \"🇪🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ES.svg\",\n label: \"+34\",\n },\n {\n country_label: \"Ethiopia\",\n code: \"ET\",\n unicode: \"🇪🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ET.svg\",\n label: \"+251\",\n },\n {\n country_label: \"Finland\",\n code: \"FI\",\n unicode: \"🇫🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FI.svg\",\n label: \"+358\",\n },\n {\n country_label: \"Fiji\",\n code: \"FJ\",\n unicode: \"🇫🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FJ.svg\",\n label: \"+679\",\n },\n {\n country_label: \"Falkland Islands\",\n code: \"FK\",\n unicode: \"🇫🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FK.svg\",\n label: \"+500\",\n },\n {\n country_label: \"Micronesia\",\n code: \"FM\",\n unicode: \"🇫🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FM.svg\",\n label: \"+691\",\n },\n {\n country_label: \"Faroe Islands\",\n code: \"FO\",\n unicode: \"🇫🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FO.svg\",\n label: \"+298\",\n },\n {\n country_label: \"France\",\n code: \"FR\",\n unicode: \"🇫🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FR.svg\",\n label: \"+33\",\n },\n {\n country_label: \"Gabon\",\n code: \"GA\",\n unicode: \"🇬🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GA.svg\",\n label: \"+241\",\n },\n {\n country_label: \"United Kingdom\",\n code: \"GB\",\n unicode: \"🇬🇧\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GB.svg\",\n label: \"+44\",\n },\n {\n country_label: \"Grenada\",\n code: \"GD\",\n unicode: \"🇬🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GD.svg\",\n label: \"+1473\",\n },\n {\n country_label: \"Georgia\",\n code: \"GE\",\n unicode: \"🇬🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GE.svg\",\n label: \"+995\",\n },\n {\n country_label: \"French Guiana\",\n code: \"GF\",\n unicode: \"🇬🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GF.svg\",\n label: \"+594\",\n },\n {\n country_label: \"Guernsey\",\n code: \"GG\",\n unicode: \"🇬🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GG.svg\",\n label: \"+44\",\n },\n {\n country_label: \"Ghana\",\n code: \"GH\",\n unicode: \"🇬🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GH.svg\",\n label: \"+233\",\n },\n {\n country_label: \"Gibraltar\",\n code: \"GI\",\n unicode: \"🇬🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GI.svg\",\n label: \"+350\",\n },\n {\n country_label: \"Greenland\",\n code: \"GL\",\n unicode: \"🇬🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GL.svg\",\n label: \"+299\",\n },\n {\n country_label: \"Gambia\",\n code: \"GM\",\n unicode: \"🇬🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GM.svg\",\n label: \"+220\",\n },\n {\n country_label: \"Guinea\",\n code: \"GN\",\n unicode: \"🇬🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GN.svg\",\n label: \"+224\",\n },\n {\n country_label: \"Guadeloupe\",\n code: \"GP\",\n unicode: \"🇬🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GP.svg\",\n label: \"+590\",\n },\n {\n country_label: \"Equatorial Guinea\",\n code: \"GQ\",\n unicode: \"🇬🇶\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GQ.svg\",\n label: \"+240\",\n },\n {\n country_label: \"Greece\",\n code: \"GR\",\n unicode: \"🇬🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GR.svg\",\n label: \"+30\",\n },\n {\n country_label: \"South Georgia & South Sandwich Islands\",\n code: \"GS\",\n unicode: \"🇬🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GS.svg\",\n label: \"+500\",\n },\n {\n country_label: \"Guatemala\",\n code: \"GT\",\n unicode: \"🇬🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GT.svg\",\n label: \"+502\",\n },\n {\n country_label: \"Guam\",\n code: \"GU\",\n unicode: \"🇬🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GU.svg\",\n label: \"+1671\",\n },\n {\n country_label: \"Guinea-Bissau\",\n code: \"GW\",\n unicode: \"🇬🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GW.svg\",\n label: \"+245\",\n },\n {\n country_label: \"Guyana\",\n code: \"GY\",\n unicode: \"🇬🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GY.svg\",\n label: \"+595\",\n },\n {\n country_label: \"Hong Kong SAR China\",\n code: \"HK\",\n unicode: \"🇭🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HK.svg\",\n label: \"+852\",\n },\n {\n country_label: \"Honduras\",\n code: \"HN\",\n unicode: \"🇭🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HN.svg\",\n label: \"+504\",\n },\n {\n country_label: \"Croatia\",\n code: \"HR\",\n unicode: \"🇭🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HR.svg\",\n label: \"+385\",\n },\n {\n country_label: \"Haiti\",\n code: \"HT\",\n unicode: \"🇭🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HT.svg\",\n label: \"+509\",\n },\n {\n country_label: \"Hungary\",\n code: \"HU\",\n unicode: \"🇭🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HU.svg\",\n label: \"+36\",\n },\n {\n country_label: \"Indonesia\",\n code: \"ID\",\n unicode: \"🇮🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ID.svg\",\n label: \"+62\",\n },\n {\n country_label: \"Ireland\",\n code: \"IE\",\n unicode: \"🇮🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IE.svg\",\n label: \"+353\",\n },\n {\n country_label: \"Israel\",\n code: \"IL\",\n unicode: \"🇮🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IL.svg\",\n label: \"+972\",\n },\n {\n country_label: \"Isle of Man\",\n code: \"IM\",\n unicode: \"🇮🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IM.svg\",\n label: \"+44\",\n },\n {\n country_label: \"India\",\n code: \"IN\",\n unicode: \"🇮🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IN.svg\",\n label: \"+91\",\n },\n {\n country_label: \"British Indian Ocean Territory\",\n code: \"IO\",\n unicode: \"🇮🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IO.svg\",\n label: \"+246\",\n },\n {\n country_label: \"Iraq\",\n code: \"IQ\",\n unicode: \"🇮🇶\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IQ.svg\",\n label: \"+964\",\n },\n {\n country_label: \"Iran\",\n code: \"IR\",\n unicode: \"🇮🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IR.svg\",\n label: \"+98\",\n },\n {\n country_label: \"Iceland\",\n code: \"IS\",\n unicode: \"🇮🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IS.svg\",\n label: \"+354\",\n },\n {\n country_label: \"Italy\",\n code: \"IT\",\n unicode: \"🇮🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IT.svg\",\n label: \"+39\",\n },\n {\n country_label: \"Jersey\",\n code: \"JE\",\n unicode: \"🇯🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JE.svg\",\n label: \"+44\",\n },\n {\n country_label: \"Jamaica\",\n code: \"JM\",\n unicode: \"🇯🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JM.svg\",\n label: \"+1876\",\n },\n {\n country_label: \"Jordan\",\n code: \"JO\",\n unicode: \"🇯🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JO.svg\",\n label: \"+962\",\n },\n {\n country_label: \"Japan\",\n code: \"JP\",\n unicode: \"🇯🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JP.svg\",\n label: \"+81\",\n },\n {\n country_label: \"Kenya\",\n code: \"KE\",\n unicode: \"🇰🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KE.svg\",\n label: \"+254\",\n },\n {\n country_label: \"Kyrgyzstan\",\n code: \"KG\",\n unicode: \"🇰🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KG.svg\",\n label: \"+996\",\n },\n {\n country_label: \"Cambodia\",\n code: \"KH\",\n unicode: \"🇰🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KH.svg\",\n label: \"+855\",\n },\n {\n country_label: \"Kiribati\",\n code: \"KI\",\n unicode: \"🇰🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KI.svg\",\n label: \"+686\",\n },\n {\n country_label: \"Comoros\",\n code: \"KM\",\n unicode: \"🇰🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KM.svg\",\n label: \"+269\",\n },\n {\n country_label: \"St. Kitts & Nevis\",\n code: \"KN\",\n unicode: \"🇰🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KN.svg\",\n label: \"+1869\",\n },\n {\n country_label: \"North Korea\",\n code: \"KP\",\n unicode: \"🇰🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KP.svg\",\n label: \"+850\",\n },\n {\n country_label: \"South Korea\",\n code: \"KR\",\n unicode: \"🇰🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KR.svg\",\n label: \"+82\",\n },\n\n {\n country_label: \"Cayman Islands\",\n code: \"KY\",\n unicode: \"🇰🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KY.svg\",\n label: \"+ 345\",\n },\n {\n country_label: \"Kazakhstan\",\n code: \"KZ\",\n unicode: \"🇰🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KZ.svg\",\n label: \"+77\",\n },\n {\n country_label: \"Laos\",\n code: \"LA\",\n unicode: \"🇱🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LA.svg\",\n label: \"+856\",\n },\n {\n country_label: \"Lebanon\",\n code: \"LB\",\n unicode: \"🇱🇧\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LB.svg\",\n label: \"+961\",\n },\n {\n country_label: \"St. Lucia\",\n code: \"LC\",\n unicode: \"🇱🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LC.svg\",\n label: \"+1758\",\n },\n {\n country_label: \"Liechtenstein\",\n code: \"LI\",\n unicode: \"🇱🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LI.svg\",\n label: \"+423\",\n },\n {\n country_label: \"Sri Lanka\",\n code: \"LK\",\n unicode: \"🇱🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LK.svg\",\n label: \"+94\",\n },\n {\n country_label: \"Liberia\",\n code: \"LR\",\n unicode: \"🇱🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LR.svg\",\n label: \"+231\",\n },\n {\n country_label: \"Lesotho\",\n code: \"LS\",\n unicode: \"🇱🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LS.svg\",\n label: \"+266\",\n },\n {\n country_label: \"Lithuania\",\n code: \"LT\",\n unicode: \"🇱🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LT.svg\",\n label: \"+370\",\n },\n {\n country_label: \"Luxembourg\",\n code: \"LU\",\n unicode: \"🇱🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LU.svg\",\n label: \"+352\",\n },\n {\n country_label: \"Latvia\",\n code: \"LV\",\n unicode: \"🇱🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LV.svg\",\n label: \"+371\",\n },\n {\n country_label: \"Libya\",\n code: \"LY\",\n unicode: \"🇱🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LY.svg\",\n label: \"+218\",\n },\n {\n country_label: \"Morocco\",\n code: \"MA\",\n unicode: \"🇲🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MA.svg\",\n label: \"+212\",\n },\n {\n country_label: \"Monaco\",\n code: \"MC\",\n unicode: \"🇲🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MC.svg\",\n label: \"+377\",\n },\n {\n country_label: \"Moldova\",\n code: \"MD\",\n unicode: \"🇲🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MD.svg\",\n label: \"+373\",\n },\n {\n country_label: \"Montenegro\",\n code: \"ME\",\n unicode: \"🇲🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ME.svg\",\n label: \"+382\",\n },\n {\n country_label: \"St. Martin\",\n code: \"MF\",\n unicode: \"🇲🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MF.svg\",\n label: \"+590\",\n },\n {\n country_label: \"Madagascar\",\n code: \"MG\",\n unicode: \"🇲🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MG.svg\",\n label: \"+261\",\n },\n {\n country_label: \"Marshall Islands\",\n code: \"MH\",\n unicode: \"🇲🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MH.svg\",\n label: \"+692\",\n },\n {\n country_label: \"North Macedonia\",\n code: \"MK\",\n unicode: \"🇲🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MK.svg\",\n label: \"+389\",\n },\n {\n country_label: \"Mali\",\n code: \"ML\",\n unicode: \"🇲🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ML.svg\",\n label: \"+223\",\n },\n {\n country_label: \"Myanmar (Burma)\",\n code: \"MM\",\n unicode: \"🇲🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MM.svg\",\n label: \"+95\",\n },\n {\n country_label: \"Mongolia\",\n code: \"MN\",\n unicode: \"🇲🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MN.svg\",\n label: \"+976\",\n },\n {\n country_label: \"Macao SAR China\",\n code: \"MO\",\n unicode: \"🇲🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MO.svg\",\n label: \"+853\",\n },\n {\n country_label: \"Northern Mariana Islands\",\n code: \"MP\",\n unicode: \"🇲🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MP.svg\",\n label: \"+1670\",\n },\n {\n country_label: \"Martinique\",\n code: \"MQ\",\n unicode: \"🇲🇶\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MQ.svg\",\n label: \"+596\",\n },\n {\n country_label: \"Mauritania\",\n code: \"MR\",\n unicode: \"🇲🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MR.svg\",\n label: \"+222\",\n },\n {\n country_label: \"Montserrat\",\n code: \"MS\",\n unicode: \"🇲🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MS.svg\",\n label: \"+1664\",\n },\n {\n country_label: \"Malta\",\n code: \"MT\",\n unicode: \"🇲🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MT.svg\",\n label: \"+356\",\n },\n {\n country_label: \"Mauritius\",\n code: \"MU\",\n unicode: \"🇲🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MU.svg\",\n label: \"+230\",\n },\n {\n country_label: \"Maldives\",\n code: \"MV\",\n unicode: \"🇲🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MV.svg\",\n label: \"+960\",\n },\n {\n country_label: \"Malawi\",\n code: \"MW\",\n unicode: \"🇲🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MW.svg\",\n label: \"+265\",\n },\n {\n country_label: \"Mexico\",\n code: \"MX\",\n unicode: \"🇲🇽\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MX.svg\",\n label: \"+52\",\n },\n {\n country_label: \"Malaysia\",\n code: \"MY\",\n unicode: \"🇲🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MY.svg\",\n label: \"+60\",\n },\n {\n country_label: \"Mozambique\",\n code: \"MZ\",\n unicode: \"🇲🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MZ.svg\",\n label: \"+258\",\n },\n {\n country_label: \"Namibia\",\n code: \"NA\",\n unicode: \"🇳🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NA.svg\",\n label: \"+264\",\n },\n {\n country_label: \"New Caledonia\",\n code: \"NC\",\n unicode: \"🇳🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NC.svg\",\n label: \"+687\",\n },\n {\n country_label: \"Niger\",\n code: \"NE\",\n unicode: \"🇳🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NE.svg\",\n label: \"+227\",\n },\n {\n country_label: \"Norfolk Island\",\n code: \"NF\",\n unicode: \"🇳🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NF.svg\",\n label: \"+672\",\n },\n {\n country_label: \"Nigeria\",\n code: \"NG\",\n unicode: \"🇳🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NG.svg\",\n label: \"+234\",\n },\n {\n country_label: \"Nicaragua\",\n code: \"NI\",\n unicode: \"🇳🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NI.svg\",\n label: \"+505\",\n },\n {\n country_label: \"Netherlands\",\n code: \"NL\",\n unicode: \"🇳🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NL.svg\",\n label: \"+31\",\n },\n {\n country_label: \"Norway\",\n code: \"NO\",\n unicode: \"🇳🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NO.svg\",\n label: \"+47\",\n },\n {\n country_label: \"Nepal\",\n code: \"NP\",\n unicode: \"🇳🇵\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NP.svg\",\n label: \"+977\",\n },\n {\n country_label: \"Nauru\",\n code: \"NR\",\n unicode: \"🇳🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NR.svg\",\n label: \"+674\",\n },\n {\n country_label: \"Niue\",\n code: \"NU\",\n unicode: \"🇳🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NU.svg\",\n label: \"+683\",\n },\n {\n country_label: \"New Zealand\",\n code: \"NZ\",\n unicode: \"🇳🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NZ.svg\",\n label: \"+64\",\n },\n\n {\n country_label: \"Panama\",\n code: \"PA\",\n unicode: \"🇵🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PA.svg\",\n label: \"+507\",\n },\n {\n country_label: \"Peru\",\n code: \"PE\",\n unicode: \"🇵🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PE.svg\",\n label: \"+51\",\n },\n {\n country_label: \"French Polynesia\",\n code: \"PF\",\n unicode: \"🇵🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PF.svg\",\n label: \"+689\",\n },\n {\n country_label: \"Papua New Guinea\",\n code: \"PG\",\n unicode: \"🇵🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PG.svg\",\n label: \"+675\",\n },\n {\n country_label: \"Philippines\",\n code: \"PH\",\n unicode: \"🇵🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PH.svg\",\n label: \"+63\",\n },\n {\n country_label: \"Pakistan\",\n code: \"PK\",\n unicode: \"🇵🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PK.svg\",\n label: \"+92\",\n },\n {\n country_label: \"Poland\",\n code: \"PL\",\n unicode: \"🇵🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PL.svg\",\n label: \"+48\",\n },\n {\n country_label: \"St. Pierre & Miquelon\",\n code: \"PM\",\n unicode: \"🇵🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PM.svg\",\n label: \"+508\",\n },\n {\n country_label: \"Pitcairn Islands\",\n code: \"PN\",\n unicode: \"🇵🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PN.svg\",\n label: \"+872\",\n },\n {\n country_label: \"Puerto Rico\",\n code: \"PR\",\n unicode: \"🇵🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PR.svg\",\n label: \"+1939\",\n },\n {\n country_label: \"Palestinian Territories\",\n code: \"PS\",\n unicode: \"🇵🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PS.svg\",\n label: \"+970\",\n },\n {\n country_label: \"Portugal\",\n code: \"PT\",\n unicode: \"🇵🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PT.svg\",\n label: \"+351\",\n },\n {\n country_label: \"Palau\",\n code: \"PW\",\n unicode: \"🇵🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PW.svg\",\n label: \"+680\",\n },\n {\n country_label: \"Paraguay\",\n code: \"PY\",\n unicode: \"🇵🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PY.svg\",\n label: \"+595\",\n },\n\n {\n country_label: \"Réunion\",\n code: \"RE\",\n unicode: \"🇷🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RE.svg\",\n label: \"+262\",\n },\n {\n country_label: \"Romania\",\n code: \"RO\",\n unicode: \"🇷🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RO.svg\",\n label: \"+40\",\n },\n {\n country_label: \"Serbia\",\n code: \"RS\",\n unicode: \"🇷🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RS.svg\",\n label: \"+381\",\n },\n {\n country_label: \"Russia\",\n code: \"RU\",\n unicode: \"🇷🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RU.svg\",\n label: \"+7\",\n },\n {\n country_label: \"Rwanda\",\n code: \"RW\",\n unicode: \"🇷🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RW.svg\",\n label: \"+250\",\n },\n\n {\n country_label: \"Solomon Islands\",\n code: \"SB\",\n unicode: \"🇸🇧\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SB.svg\",\n label: \"+677\",\n },\n {\n country_label: \"Seychelles\",\n code: \"SC\",\n unicode: \"🇸🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SC.svg\",\n label: \"+248\",\n },\n {\n country_label: \"Sudan\",\n code: \"SD\",\n unicode: \"🇸🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SD.svg\",\n label: \"+249\",\n },\n {\n country_label: \"Sweden\",\n code: \"SE\",\n unicode: \"🇸🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SE.svg\",\n label: \"+46\",\n },\n {\n country_label: \"Singapore\",\n code: \"SG\",\n unicode: \"🇸🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SG.svg\",\n label: \"+65\",\n },\n {\n country_label: \"St. Helena\",\n code: \"SH\",\n unicode: \"🇸🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SH.svg\",\n label: \"+290\",\n },\n {\n country_label: \"Slovenia\",\n code: \"SI\",\n unicode: \"🇸🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SI.svg\",\n label: \"+386\",\n },\n {\n country_label: \"Svalbard & Jan Mayen\",\n code: \"SJ\",\n unicode: \"🇸🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SJ.svg\",\n label: \"+47\",\n },\n {\n country_label: \"Slovakia\",\n code: \"SK\",\n unicode: \"🇸🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SK.svg\",\n label: \"+421\",\n },\n {\n country_label: \"Sierra Leone\",\n code: \"SL\",\n unicode: \"🇸🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SL.svg\",\n label: \"+232\",\n },\n {\n country_label: \"San Marino\",\n code: \"SM\",\n unicode: \"🇸🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SM.svg\",\n label: \"+378\",\n },\n {\n country_label: \"Senegal\",\n code: \"SN\",\n unicode: \"🇸🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SN.svg\",\n label: \"+221\",\n },\n {\n country_label: \"Somalia\",\n code: \"SO\",\n unicode: \"🇸🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SO.svg\",\n label: \"+252\",\n },\n {\n country_label: \"Suriname\",\n code: \"SR\",\n unicode: \"🇸🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SR.svg\",\n label: \"+597\",\n },\n {\n country_label: \"South Sudan\",\n code: \"SS\",\n unicode: \"🇸🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SS.svg\",\n label: \"+211\",\n },\n {\n country_label: \"São Tomé & Príncipe\",\n code: \"ST\",\n unicode: \"🇸🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ST.svg\",\n label: \"+239\",\n },\n {\n country_label: \"El Salvador\",\n code: \"SV\",\n unicode: \"🇸🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SV.svg\",\n label: \"+503\",\n },\n {\n country_label: \"Syria\",\n code: \"SY\",\n unicode: \"🇸🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SY.svg\",\n label: \"+963\",\n },\n {\n country_label: \"Eswatini\",\n code: \"SZ\",\n unicode: \"🇸🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SZ.svg\",\n label: \"+268\",\n },\n {\n country_label: \"Turks & Caicos Islands\",\n code: \"TC\",\n unicode: \"🇹🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TC.svg\",\n label: \"+1649\",\n },\n {\n country_label: \"Chad\",\n code: \"TD\",\n unicode: \"🇹🇩\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TD.svg\",\n label: \"+235\",\n },\n {\n country_label: \"Togo\",\n code: \"TG\",\n unicode: \"🇹🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TG.svg\",\n label: \"+228\",\n },\n {\n country_label: \"Thailand\",\n code: \"TH\",\n unicode: \"🇹🇭\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TH.svg\",\n label: \"+66\",\n },\n {\n country_label: \"Tajikistan\",\n code: \"TJ\",\n unicode: \"🇹🇯\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TJ.svg\",\n label: \"+992\",\n },\n {\n country_label: \"Tokelau\",\n code: \"TK\",\n unicode: \"🇹🇰\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TK.svg\",\n label: \"+690\",\n },\n {\n country_label: \"Timor-Leste\",\n code: \"TL\",\n unicode: \"🇹🇱\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TL.svg\",\n label: \"+670\",\n },\n {\n country_label: \"Turkmenistan\",\n code: \"TM\",\n unicode: \"🇹🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TM.svg\",\n label: \"+993\",\n },\n {\n country_label: \"Tunisia\",\n code: \"TN\",\n unicode: \"🇹🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TN.svg\",\n label: \"+216\",\n },\n {\n country_label: \"Tonga\",\n code: \"TO\",\n unicode: \"🇹🇴\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TO.svg\",\n label: \"+676\",\n },\n {\n country_label: \"Turkey\",\n code: \"TR\",\n unicode: \"🇹🇷\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TR.svg\",\n label: \"+90\",\n },\n {\n country_label: \"Trinidad & Tobago\",\n code: \"TT\",\n unicode: \"🇹🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TT.svg\",\n label: \"+1868\",\n },\n {\n country_label: \"Tuvalu\",\n code: \"TV\",\n unicode: \"🇹🇻\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TV.svg\",\n label: \"+688\",\n },\n {\n country_label: \"Taiwan\",\n code: \"TW\",\n unicode: \"🇹🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TW.svg\",\n label: \"+886\",\n },\n {\n country_label: \"Tanzania\",\n code: \"TZ\",\n unicode: \"🇹🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TZ.svg\",\n label: \"+255\",\n },\n {\n country_label: \"Ukraine\",\n code: \"UA\",\n unicode: \"🇺🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UA.svg\",\n label: \"+380\",\n },\n {\n country_label: \"Uganda\",\n code: \"UG\",\n unicode: \"🇺🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UG.svg\",\n label: \"+256\",\n },\n {\n country_label: \"United States\",\n code: \"US\",\n unicode: \"🇺🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/US.svg\",\n label: \"+1\",\n },\n {\n country_label: \"Uruguay\",\n code: \"UY\",\n unicode: \"🇺🇾\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UY.svg\",\n label: \"+598\",\n },\n {\n country_label: \"Uzbekistan\",\n\n code: \"UZ\",\n unicode: \"🇺🇿\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UZ.svg\",\n label: \"+998\",\n },\n {\n country_label: \"Vatican City\",\n code: \"VA\",\n unicode: \"🇻🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VA.svg\",\n label: \"+379\",\n },\n {\n country_label: \"St. Vincent & Grenadines\",\n code: \"VC\",\n unicode: \"🇻🇨\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VC.svg\",\n label: \"+1784\",\n },\n {\n country_label: \"Venezuela\",\n code: \"VE\",\n unicode: \"🇻🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VE.svg\",\n label: \"+58\",\n },\n {\n country_label: \"British Virgin Islands\",\n code: \"VG\",\n unicode: \"🇻🇬\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VG.svg\",\n label: \"+1284\",\n },\n {\n country_label: \"U.S. Virgin Islands\",\n code: \"VI\",\n unicode: \"🇻🇮\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VI.svg\",\n label: \"+1340\",\n },\n {\n country_label: \"Vietnam\",\n code: \"VN\",\n unicode: \"🇻🇳\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VN.svg\",\n label: \"+84\",\n },\n {\n country_label: \"Vanuatu\",\n code: \"VU\",\n unicode: \"🇻🇺\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VU.svg\",\n label: \"+678\",\n },\n {\n country_label: \"Wallis & Futuna\",\n code: \"WF\",\n unicode: \"🇼🇫\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WF.svg\",\n label: \"+681\",\n },\n {\n country_label: \"Samoa\",\n code: \"WS\",\n unicode: \"🇼🇸\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WS.svg\",\n label: \"+685\",\n },\n {\n country_label: \"Yemen\",\n code: \"YE\",\n unicode: \"🇾🇪\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/YE.svg\",\n label: \"+967\",\n },\n {\n country_label: \"Mayotte\",\n code: \"YT\",\n unicode: \"🇾🇹\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/YT.svg\",\n label: \"+262\",\n },\n {\n country_label: \"South Africa\",\n code: \"ZA\",\n unicode: \"🇿🇦\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZA.svg\",\n label: \"+27\",\n },\n {\n country_label: \"Zambia\",\n code: \"ZM\",\n unicode: \"🇿🇲\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZM.svg\",\n label: \"+260\",\n },\n {\n country_label: \"Zimbabwe\",\n code: \"ZW\",\n unicode: \"🇿🇼\",\n image:\n \"https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZW.svg\",\n label: \"+263\",\n },\n]\n\nexport default countries\n","import React, { useState, FC } from \"react\"\nimport { cn } from \"../util\"\n\n// TODO: fix wrapping issue when small screen\n\ntype TabsTypes = {\n options?: any\n onChangeTab?: (option) => void\n defaultValue?: any\n orientation?: \"horizontal\" | \"vertical\"\n direction?: \"rtl\" | \"ltr\"\n marginBetween?: any\n width?: \"full\" | \"normal\"\n pill?: boolean\n}\nexport const HawaTabs: FC<TabsTypes> = ({\n orientation = \"horizontal\",\n direction = \"ltr\",\n width = \"normal\",\n marginBetween = 0,\n pill = false,\n ...props\n}) => {\n const [selectedOption, setSelectedOption] = useState(props.options[0]?.value)\n\n let activeTabStyle = {\n vertical: \"inline-block py-2 px-4 text-white bg-primary active\",\n horizontal: \"inline-block py-2 px-4 text-white bg-primary active\",\n }\n // rounded rounded-br-none rounded-bl-none\n let inactiveTabStyle = {\n vertical:\n \"inline-block py-2 px-4 hover:text-gray-900 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-white\",\n horizontal:\n \"bg-gray-100 inline-block py-2 px-4 hover:text-gray-900 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-white\",\n }\n // rounded rounded-br-none rounded-bl-none\n let widthStyles = {\n full: \"w-full min-w-full\",\n normal: \"w-fit\",\n }\n let orientationStyle = {\n vertical: {\n container: \"flex flex-row\",\n tabs: \"flex flex-col w-fit flex-wrap rounded border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400\",\n },\n horizontal: {\n container: \"\",\n tabs: \"flex w-fit flex-wrap rounded rounded-br-none rounded-bl-none border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400\",\n },\n }\n let containerStyle = {\n vertical: \"flex flex-row\",\n horizontal: \"flex flex-col\",\n }\n let tabsStyle = {\n vertical:\n \"sticky top-2 h-fit flex flex-col w-fit flex-wrap rounded border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400\",\n horizontal:\n \"flex w-fit flex-wrap border-b-primary text-center text-sm font-medium text-gray-500 dark:text-gray-400\",\n }\n return (\n <div\n dir={direction}\n className={cn(\n containerStyle[orientation],\n props.options[selectedOption] ? \"border-b-2\" : \"border-b-0\"\n )}\n >\n <ul\n className={cn(\n \"w-full border-primary\",\n marginBetween\n ? orientation === \"vertical\"\n ? \"mb-0\"\n : \"mb-\" + marginBetween\n : \"\",\n marginBetween && direction === \"rtl\"\n ? \"ml-\" + marginBetween\n : \"mr-\" + marginBetween,\n tabsStyle[orientation],\n orientation === \"horizontal\"\n ? \"grid grid-cols-3 gap-1 sm:flex sm:flex-row sm:gap-0 \"\n : \"\",\n // orientation === \"vertical\"\n // ? direction === \"rtl\"\n // ? \"rounded-none rounded-r border-l-2\"\n // : \"rounded-none rounded-l border-r-2\"\n // : \"border-b-2\",\n widthStyles[width],\n pill\n ? \"gap-0.5 rounded border-none bg-gray-100 p-0.5\"\n : orientation === \"vertical\"\n ? direction === \"rtl\"\n ? \"rounded-none rounded-r border-l-2\"\n : \"rounded-none rounded-l border-r-2\"\n : \"border-b-0 sm:border-b-2\"\n )}\n >\n {props.options?.map((opt: any, o) => (\n <button\n key={o}\n aria-current=\"page\"\n onClick={() => {\n setSelectedOption(opt.value)\n props?.onChangeTab(opt)\n }}\n className={cn(\n opt.value === selectedOption\n ? // props.options[selectedOption].value === opt.value\n [\n activeTabStyle[orientation],\n direction === \"rtl\" ? \"rounded-r\" : \"rounded-l\",\n ]\n : inactiveTabStyle[orientation],\n pill\n ? \"rounded\"\n : orientation === \"vertical\"\n ? \"rounded rounded-bl-none rounded-tl-none\"\n : \"rounded sm:rounded-b-none\",\n // direction === \"rtl\" ? \"bg-yellow-400\" : \"bg-yellow-400\"\n \"flex w-fit flex-row items-center gap-2 transition-all \"\n )}\n >\n {opt.icon}\n {opt.label}\n </button>\n ))}\n </ul>\n\n <div className=\"flex-1 transition-all\">\n {props.options.map((tab, i) => (\n <div\n key={i}\n className={cn(selectedOption === tab.value ? \"\" : \"hidden\")}\n >\n {tab.content}\n </div>\n ))}\n </div>\n </div>\n )\n}\n","import React, { ReactElement, useEffect, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype ModalTypes = {\n /** * The boolean to open and close the modal */\n open: boolean\n /** * The title of the modal, it will appear in the header of the modal */\n title: string\n /**\n * a function that's triggered when the modal is closed either by the clicking the close button or outside the modal.\n * @returns void\n */\n onClose: () => void\n /** * Boolean to enable/disable closing the modal upon clicking outside the modal */\n closeOnClickOutside?: boolean\n /** * The id of the modal */\n modalID?: string\n children: ReactElement\n /** * The array of actions for the modal, it will appear in the footer of the modal */\n actions: any\n}\nexport const HawaModal: FC<ModalTypes> = ({\n open,\n title,\n onClose,\n closeOnClickOutside = true,\n ...props\n}) => {\n let defaultStyle =\n \"absolute top-1/2 left-1/2 w-full h-screen flex flex-col justify-center items-center -translate-x-1/2 -translate-y-1/2 transition-all\"\n useEffect((): any => {\n if (closeOnClickOutside && open) {\n window.onclick = (e) => {\n e.stopPropagation()\n onClose()\n }\n }\n return () => (window.onclick = null)\n }, [open])\n return (\n <div\n className={clsx(\n defaultStyle,\n open ? \"z-10 opacity-100 \" : \"invisible -z-10 opacity-0\"\n )}\n >\n <div\n className={clsx(\n \"absolute h-screen w-full bg-gray-500 opacity-50\",\n open ? \"opacity-50\" : \"opacity-0\"\n )}\n ></div>\n\n <div className=\"relative w-1/2 max-w-md rounded bg-white p-1 shadow-lg dark:bg-gray-700\">\n <div className=\"flex items-start justify-between rounded-t p-3 dark:border-gray-600\">\n <h3 className=\"text-xl font-semibold text-gray-900 dark:text-white\">\n {title}\n </h3>\n <button\n type=\"button\"\n className=\"inline-flex items-center rounded bg-transparent p-1.5 text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white\"\n data-modal-toggle=\"defaultModal\"\n onClick={(e) => {\n onClose()\n }}\n >\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"sr-only\">Close modal</span>\n </button>\n </div>\n <div className=\"space-y-6 p-3\">{props.children}</div>\n <div className=\"mx-2 flex items-center justify-end space-x-1 p-0 dark:border-gray-600\">\n {props.actions}\n </div>\n </div>\n </div>\n )\n}\n","import React, { ReactNode, useEffect, useRef, useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\n// TODO: add width to decrease width\n\ninterface TMenuTypes {\n menuItems: MenuItems[][]\n withHeader?: boolean\n headerTitle?: string\n headerSubtitle?: string\n direction?: \"rtl\" | \"ltr\"\n anchor?: any\n children?: ReactNode\n position?:\n | \"left-top\"\n | \"left-bottom\"\n | \"right-top\"\n | \"right-bottom\"\n | \"top-right\"\n | \"top-left\"\n | \"bottom-right\"\n | \"bottom-left\"\n onClickOutside?: any\n actionedItem?: any\n size?: \"small\" | \"normal\" | \"large\"\n}\n\ntype MenuItems = {\n icon?: JSX.Element\n disabled?: boolean\n label: string\n action?: (e: any) => void\n isButton?: boolean\n element?: any\n}\n\nexport const HawaMenu: FC<TMenuTypes> = ({\n menuItems,\n withHeader,\n direction = \"ltr\",\n headerTitle,\n headerSubtitle,\n size = \"normal\",\n children,\n onClickOutside,\n actionedItem,\n position = \"top-right\",\n}) => {\n const [menuOpened, setMenuOpened] = useState(false)\n const childrenRef = useRef(null)\n const [childrenHeight, setChildrenHeight] = useState(null)\n const [childrenWidth, setChildrenWidth] = useState(null)\n const menuRef = useRef(null)\n const [menuWidth, setMenuWidth] = useState(null)\n const [menuHeight, setMenuHeight] = useState(null)\n\n useEffect(() => {\n setMenuHeight(menuRef.current?.getBoundingClientRect().height)\n setMenuWidth(menuRef.current?.getBoundingClientRect().width)\n setChildrenHeight(childrenRef.current?.getBoundingClientRect().height)\n setChildrenWidth(childrenRef.current?.getBoundingClientRect().width)\n\n const handleClickOutside = (event) => {\n if (menuRef.current && !menuRef.current.contains(event.target)) {\n setMenuOpened(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [onClickOutside])\n\n let defaultStyles =\n \"border-none absolute ring-offset-1 absolute z-10 w-44 divide-y divide-gray-100 overflow-y-clip rounded bg-gray-50 shadow-lg transition-all dark:bg-gray-700\"\n let sizeStyles = {\n small: \"text-[11px] p-1 px-4 m-0\",\n normal: \"py-2 px-4\",\n large: \"\",\n }\n let menuCoordinates\n let spacing = 5\n switch (position) {\n case \"top-right\":\n menuCoordinates =\n direction === \"rtl\"\n ? `${menuWidth - childrenWidth}px, -${\n menuHeight + childrenHeight + spacing\n }px`\n : `0px, -${menuHeight + childrenHeight + spacing}px`\n break\n case \"top-left\":\n menuCoordinates =\n direction === \"rtl\"\n ? `${0}px, -${menuHeight + childrenHeight + spacing}px`\n : `-${menuWidth - childrenWidth}px, -${\n menuHeight + childrenHeight + spacing\n }px`\n break\n case \"bottom-right\":\n menuCoordinates =\n direction === \"rtl\"\n ? `-${0}px, ${spacing}px`\n : `-${childrenWidth - menuWidth}px, ${spacing}px`\n\n break\n case \"bottom-left\":\n menuCoordinates =\n direction === \"rtl\"\n ? `0px, ${spacing}px`\n : `-${menuWidth - childrenWidth}px,${spacing}px`\n break\n case \"right-bottom\":\n menuCoordinates =\n direction === \"rtl\"\n ? `${menuWidth + spacing}px, -${childrenHeight}px`\n : `${childrenWidth + spacing}px, -${childrenHeight}px`\n break\n case \"right-top\":\n menuCoordinates =\n direction === \"rtl\"\n ? `${menuWidth + spacing}px, -${menuHeight}px`\n : `${childrenWidth + spacing}px, -${menuHeight}px`\n break\n case \"left-bottom\":\n menuCoordinates =\n direction === \"rtl\"\n ? `-${childrenWidth + spacing}px, -${childrenHeight}px`\n : `-${menuWidth + spacing}px, -${childrenHeight}px`\n break\n case \"left-top\":\n menuCoordinates =\n direction === \"rtl\"\n ? `-${childrenWidth + spacing}px, -${menuHeight}px`\n : `-${menuWidth + spacing}px, -${menuHeight}px`\n break\n\n default:\n menuCoordinates = `-${menuWidth / 2}px, -${\n childrenHeight + menuHeight / 2\n }px`\n\n break\n }\n return (\n <div\n onClick={() => {\n if (menuOpened) setMenuOpened(false)\n else setMenuOpened(true)\n }}\n >\n <div ref={childrenRef}>{children}</div>\n\n <div\n ref={menuRef}\n style={{\n position: \"absolute\",\n width: \"max-content\",\n transform: `translate(${menuCoordinates})`,\n maxWidth: \"200px\",\n }}\n className={clsx(\n defaultStyles,\n menuOpened ? \"opacity-100\" : \"invisible opacity-0\"\n )}\n >\n {withHeader && (\n <div className=\"px-4 py-3 text-xs text-gray-900 dark:text-white\">\n <div>{headerTitle}</div>\n <div className=\"truncate font-medium\">{headerSubtitle}</div>\n </div>\n )}\n {menuItems?.map((group, o) => {\n return (\n <ul\n key={o}\n className=\"bg-layout-1200 flex flex-col gap-1 p-1 text-gray-700 dark:text-gray-200\"\n >\n {group?.map((item, indx) => {\n return item.element ? (\n <li\n key={indx}\n className=\"cursor-pointer items-center rounded hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white\"\n >\n {item.element}\n </li>\n ) : (\n <li\n key={indx}\n onClick={() => {\n if (item.disabled) {\n console.log(\"button is disabled\")\n } else {\n item?.action(actionedItem)\n }\n }}\n className={clsx(\n \"transition-all\",\n item.isButton\n ? \"flex cursor-pointer flex-row items-center rounded-inner bg-buttonPrimary-500 px-4 py-2 text-white hover:bg-buttonPrimary-700 rtl:flex-row-reverse\"\n : item.disabled\n ? \"text-gray-300\"\n : \" flex cursor-pointer flex-row items-center rounded-inner hover:bg-gray-200 rtl:flex-row-reverse dark:hover:bg-gray-600 dark:hover:text-white \",\n sizeStyles[size]\n )}\n >\n {item.icon && (\n <div\n className={\n size === \"small\" ? \"mr-1 rtl:ml-1\" : \"mr-2 rtl:ml-2\"\n }\n >\n {item.icon}\n </div>\n )}\n {item.label}\n </li>\n )\n })}\n </ul>\n )\n })}\n </div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\n\ntype CopyRightsTypes = {\n /** A text used as the version of the app, for example: v1.0.0 */\n version?: string\n /** Credit to the creator of the app, for example: Sikka Software */\n credits?: string\n /** The URL of the logo in the copyrights */\n logoURL?: string\n /** Enable/Disable the existance of the logo */\n withLogo?: boolean\n /** Fires when the logo is clicked, usually goes to the website of the creator of the app */\n onLogoClicked?: any\n}\n\nexport const HawaCopyrights: FC<CopyRightsTypes> = (props) => {\n return (\n <div className=\"my-2 flex flex-col items-center justify-center gap-1 text-xs text-gray-400\">\n {props.withLogo ? (\n <a href={props.onLogoClicked}>\n <div className=\"cursor-pointer\">\n <image href={props.logoURL} width={100} height={50} />\n </div>\n </a>\n ) : null}\n <div>{props.version}</div>\n {props.credits ? props.credits : null}\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype THawaTimeline = {\n steps: any[any]\n currentStep: any\n orientation: \"vertical\" | \"horizontal\"\n}\n\nexport const HawaStepper: FC<THawaTimeline> = ({\n orientation = \"horizontal\",\n ...props\n}) => {\n let orientationStyles = {\n vertical: \"flex flex-col items-start w-fit\",\n horizontal: \"flex flex-row\",\n }\n let lineStyles = {\n vertical: \"w-1 h-32 rounded bg-red-200 ml-6 my-2\",\n horizontal: \"h-0.5 flex w-full rounded bg-red-200\",\n }\n return (\n <div\n className={clsx(\n orientationStyles[orientation],\n \" flex-wrap justify-start gap-4\"\n )}\n >\n {props.steps.map((step: any, i: number) => {\n return (\n <div\n key={i}\n className=\"my-2 flex w-auto flex-row flex-wrap justify-start \"\n >\n <div\n className={\n orientation === \"vertical\"\n ? \"flex w-full flex-row items-center\"\n : i + 1 === props.steps.length\n ? \"flex w-full flex-row items-center justify-start gap-2\"\n : \"flex flex-row items-center justify-start gap-2 after:mx-2 after:hidden after:h-1 after:w-10 after:border-b after:border-gray-200 dark:after:border-gray-700 sm:after:inline-block sm:after:content-[''] md:w-full xl:after:mx-10\"\n }\n >\n <div className=\"flex flex-row gap-2 \">\n {/* Icon */}\n <div\n className={clsx(\n \"flex h-6 w-6 min-w-[24px] items-center justify-center rounded ring-2 ring-primary/20 ring-offset-2\",\n i + 1 <= props.currentStep\n ? \"bg-primary text-primary-foreground \"\n : \"bg-primary/20\"\n )}\n >\n {i + 1 <= props.currentStep ? (\n <svg\n aria-label=\"Check Mark\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"0.60em\"\n width=\"0.60em\"\n >\n <path d=\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\"></path>\n </svg>\n ) : (\n i + 1\n )}\n </div>\n {/* Text */}\n <div className=\"whitespace-nowrap\">{step}</div>\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n}\n\n// const TimelineStep = (props) => {\n// let defaultStyles = {\n// vertical: \"\",\n// horizontal: \"\",\n// }\n// return (\n// <div\n// className={\n// props.orientation === \"vertical\"\n// ? \"flex w-full flex-row items-center\"\n// : props.stepNumber === props.steps\n// ? \"flex items-center\"\n// : \"after:border-1 flex items-center after:mx-6 after:hidden after:h-1 after:w-10 after:border-b after:border-gray-200 dark:after:border-gray-700 sm:after:inline-block sm:after:content-[''] md:w-full xl:after:mx-10\"\n// }\n// >\n// <div\n// className={clsx(\n// \"ring-buttonPrimary-200 m-2 mr-4 flex h-6 w-6 items-center justify-center rounded ring-2 ring-offset-2\",\n// props.current\n// ? \"bg-buttonPrimary-500 text-white\"\n// : \"bg-buttonPrimary-200\"\n// )}\n// >\n// {props.current ? <FaCheck fontSize={11} /> : props.stepNumber}\n// </div>\n// <div className=\"whitespace-nowrap\">{props.stepName}</div>\n// </div>\n// )\n// }\n","import React, { FC } from \"react\"\nimport { Card, CardContent, CardHeader, CardTitle } from \"./Card\"\nimport { Skeleton } from \"./Skeleton\"\n\ntype StatTypes = {\n label?: string\n color?: string\n number?: string\n helperText?: string\n chart?: any\n icon?: any\n variant?:\n | \"default\"\n | \"plain\"\n | \"contained\"\n | \"outlined\"\n | \"brutalist\"\n | \"dropshadow\"\n width?: \"full\" | \"min\" | \"normal\"\n isLoading?: boolean\n handleClick?: () => void\n}\nexport const HawaStats: FC<StatTypes> = ({ variant = \"default\", ...props }) => {\n return (\n <Card onClick={props.handleClick} clickable={Boolean(props.handleClick)}>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">{props.label}</CardTitle>\n {props.icon && props.icon}\n </CardHeader>\n <CardContent>\n {props.isLoading ? (\n <Skeleton className=\"h-8 w-3/4\" />\n ) : (\n <div className=\"text-2xl font-bold\">{props.number}</div>\n )}\n {props.isLoading && props.helperText ? (\n <Skeleton className=\"mt-2 h-4 w-1/2\" />\n ) : (\n props.helperText && (\n <p className=\"text-xs text-muted-foreground\">{props.helperText}</p>\n )\n )}\n {props.isLoading && props.chart ? (\n <Skeleton className=\"mt-2 h-4 w-1/2\" />\n ) : (\n props.chart\n )}\n </CardContent>\n </Card>\n )\n}\n","import * as React from \"react\"\nimport { cn } from \"../util\"\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n clickable?: boolean\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, clickable = false, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border bg-card text-card-foreground shadow-sm\",\n clickable &&\n \"cursor-pointer transition-all hover:drop-shadow-md dark:hover:shadow-dark\",\n className\n )}\n {...props}\n />\n )\n)\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nCardDescription.displayName = \"CardDescription\"\n\ntype CardContentProps = {\n headless?: boolean\n} & React.HTMLAttributes<HTMLDivElement>\n\nconst CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(\n ({ headless, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"p-6\", headless ? \"pt-6\" : \"pt-0\", className)}\n {...props}\n />\n )\n)\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n))\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","import React, { FC, useState } from \"react\"\nimport { Button } from \"./Button\"\nimport { Tooltip } from \"./Tooltip\"\nimport { cn } from \"../util\"\nimport { useClipboard } from \"../hooks/useClipboard\"\n\ntype CodeBlockTypes = {\n color?: \"dark\" | \"light\"\n language?: string\n width?: \"full\" | \"md\" | \"sm\"\n tabs?: TabsTypes[]\n fileName?: string\n code?: string\n}\ntype TabsTypes = {\n title: string\n code: string\n}\n\nexport const HawaCodeBlock: FC<CodeBlockTypes> = ({\n tabs,\n code,\n fileName,\n width = \"full\",\n}) => {\n const clipboard = useClipboard()\n const [selectedTab, setSelectedTab] = useState(0)\n\n let widthStyles = {\n full: \"w-full\",\n md: \"w-full max-w-md\",\n sm: \"w-full max-w-sm\",\n xs: \"w-full max-w-xs\",\n }\n\n return (\n <div\n className={cn(\n widthStyles[width],\n \"w-full flex-col items-center rounded bg-gray-200 text-left text-sm text-white dark:bg-gray-800 sm:text-base\"\n )}\n >\n {tabs && (\n <div className=\"flex flex-row gap-2 rounded-t bg-gray-100 p-2 pb-0 text-black dark:bg-gray-700 dark:text-white\">\n {tabs.map((tab, i) => (\n <div\n className={cn(\n selectedTab === i\n ? \" border-b-2 border-primary\"\n : \"bg-transparent\"\n )}\n >\n <div\n onClick={() => setSelectedTab(i)}\n className={cn(\n \"mb-1 w-full max-w-[52px] cursor-pointer rounded-inner p-2 py-1 text-center text-[0.75rem] hover:bg-gray-300 dark:hover:bg-gray-500\"\n )}\n >\n {tab.title}\n </div>\n </div>\n ))}\n </div>\n )}\n {fileName && (\n <div className=\"flex flex-row gap-2 rounded-t bg-gray-100 p-2 pb-0 text-black dark:bg-gray-700 dark:text-white\">\n <div\n className={cn(\n \"mb-1 w-full max-w-[52px] rounded-inner p-2 py-1 text-center text-[0.75rem]\"\n )}\n >\n {fileName}\n </div>\n </div>\n )}\n <pre>\n <code\n className={cn(\n \"flex w-full flex-row items-start justify-between rounded bg-gray-200 p-0 text-left text-sm text-black dark:bg-gray-800 dark:text-white sm:text-base\"\n )}\n >\n <div className=\"flex min-h-[37.75px] w-full flex-col justify-center p-4 \">\n {tabs ? tabs[selectedTab].code : code}\n </div>\n <div className=\"flex w-fit flex-row items-center gap-2 p-2\">\n <Tooltip\n open={clipboard.copied}\n side=\"left\"\n content={<div>Copied!</div>}\n >\n <Button\n size=\"icon\"\n onClick={() =>\n clipboard.copy(tabs ? tabs[selectedTab].code : code)\n }\n >\n <svg\n aria-label=\"Copy Icon\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1em\"\n width=\"1em\"\n >\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect>\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path>\n </svg>\n </Button>\n </Tooltip>\n </div>\n </code>\n </pre>\n </div>\n )\n}\n","\"use client\"\n\nimport React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\nimport { cn } from \"../util\"\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nconst TooltipArrow = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>\n>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn(className)} {...props} />\n))\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName\n\ntype TooltipTypes = {\n open?: any\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n content?: any\n children?: any\n defaultOpen?: any\n onOpenChange?: any\n delayDuration?: any\n}\n\nconst Tooltip: React.FunctionComponent<TooltipTypes> = ({\n side,\n open,\n content,\n children,\n defaultOpen,\n onOpenChange,\n delayDuration = 300,\n ...props\n}) => {\n return (\n <TooltipPrimitive.TooltipProvider delayDuration={delayDuration}>\n <TooltipPrimitive.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n >\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipContent side={side} align=\"center\" {...props}>\n {content}\n </TooltipContent>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.TooltipProvider>\n )\n}\n\nexport { Tooltip }\n","import { useState } from \"react\"\n\nexport function useClipboard({ timeout = 2000 } = {}) {\n const [error, setError] = useState<Error>(null)\n const [copied, setCopied] = useState(false)\n const [copyTimeout, setCopyTimeout] = useState(null)\n\n const handleCopyResult = (value: boolean) => {\n clearTimeout(copyTimeout)\n setCopyTimeout(setTimeout(() => setCopied(false), timeout))\n setCopied(value)\n }\n\n const copy = (valueToCopy: any) => {\n if (\"clipboard\" in navigator) {\n navigator.clipboard\n .writeText(valueToCopy)\n .then(() => handleCopyResult(true))\n .catch((err) => setError(err))\n } else {\n setError(new Error(\"useClipboard: navigator.clipboard is not supported\"))\n }\n }\n\n const reset = () => {\n setCopied(false)\n setError(null)\n clearTimeout(copyTimeout)\n }\n\n return { copy, reset, error, copied }\n}\n","import React, { FC, useState } from \"react\"\n\ntype DatepickerTypes = {}\n\nexport const HawaDatepicker: FC<DatepickerTypes> = () => {\n const [selectedDate, setSelectedDate] = useState(\"\")\n\n const handleDateChange = (event) => {\n setSelectedDate(event.target.value)\n }\n return (\n <div className=\"relative inline-block text-left\">\n <span className=\"rounded-md shadow-sm\">\n <input\n type=\"date\"\n value={selectedDate}\n onChange={handleDateChange}\n className=\"block w-full rounded border border-gray-300 bg-white p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500\"\n />\n </span>\n </div>\n )\n}\n","import React, { useEffect, useState } from \"react\"\nimport { useDropzone } from \"react-dropzone\"\nimport { HawaAlert } from \"./HawaAlert\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\n\n//TODO: This element needs more improvements and testing\n\ntype DragDropImagesTypes = {\n /** The text label above the component. Consistant with the other form input fields */\n label?: string\n files: [File]\n setFiles: any\n setDeletedFiles: any\n maxFiles: number\n accept: string\n onAcceptedFiles: any\n showPreview: any\n onDeleteFile: any\n onClearFiles: any\n maxSize: number\n errorMessages: string\n disclaimer?: boolean\n termsLink?: string\n privacyLink?: string\n /** The translation object, use this to replace the default text with any translated text you want.*/\n texts: {\n errorUploading: any\n clickHereToUpload: any\n maxFileSize: any\n tooManyFiles: any\n fileTooLarge: any\n acceptedFileTypes: any\n invalidFileType: any\n terms?: string\n privacyPolicy?: string\n disclaimer?: string\n and?: string\n }\n}\n\nexport const DragDropImages: React.FunctionComponent<DragDropImagesTypes> = ({\n texts,\n files,\n setFiles,\n setDeletedFiles,\n onAcceptedFiles,\n errorMessages,\n maxFiles,\n accept,\n showPreview,\n onDeleteFile,\n onClearFiles,\n disclaimer,\n maxSize,\n label,\n termsLink,\n privacyLink,\n}) => {\n const [cmp, setCmp] = useState(0)\n const [max, setMax] = useState<any>(0)\n\n const {\n getRootProps,\n getInputProps,\n fileRejections,\n acceptedFiles,\n isDragActive,\n } = useDropzone({\n multiple: true,\n accept: accept,\n maxSize: maxSize,\n maxFiles: maxFiles,\n onDrop: (acceptedFiles) => {\n setFiles(\n acceptedFiles.map((file, index) =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n })\n )\n )\n },\n })\n useEffect(\n () => () => {\n files?.forEach((file: any) => {\n URL.revokeObjectURL(file.preview)\n })\n },\n [files]\n )\n useEffect(() => {\n setFiles(acceptedFiles)\n }, [acceptedFiles, cmp])\n onClearFiles = () => {\n acceptedFiles.length = 0\n acceptedFiles.splice(0, acceptedFiles.length)\n setFiles([])\n }\n\n const clearAllFiles = () => {\n acceptedFiles.length = 0\n setFiles([])\n }\n\n useEffect(() => {\n if (maxSize > 0) {\n const k = 1024\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\n const i = Math.floor(Math.log(maxSize) / Math.log(1024))\n\n setMax(\n parseFloat((maxSize / Math.pow(1024, i)).toFixed(2)) + \" \" + sizes[i]\n )\n }\n }, [maxSize])\n const errs = fileRejections.map((rej, i) => {\n switch (rej.errors[0].code) {\n case \"file-too-large\":\n return (\n <HawaAlert\n text={rej.file.name}\n title={texts.fileTooLarge}\n severity=\"error\"\n />\n )\n case \"too-many-files\":\n return (\n <HawaAlert\n text={rej.file.name}\n title={texts.tooManyFiles}\n severity=\"error\"\n />\n )\n case \"file-invalid-type\":\n return (\n <HawaAlert\n text={rej.file.name}\n title={texts.invalidFileType}\n severity=\"error\"\n />\n )\n\n default:\n return (\n <HawaAlert\n text={rej.file.name}\n title={rej.errors[0].code}\n severity=\"error\"\n />\n )\n }\n })\n const thumbs = files?.map((file: any, index: any) => (\n <div className=\"relative rounded\">\n <button\n onClick={(e) => {\n e.stopPropagation()\n acceptedFiles.splice(acceptedFiles.indexOf(file), 1)\n setCmp(Math.random)\n onDeleteFile(file)\n }}\n type=\"button\"\n className=\"absolute left-0 ml-auto inline-flex items-center rounded-inner rounded-bl-none rounded-tr-none bg-gray-900 p-1.5 text-sm text-gray-400 transition-all hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white\"\n data-modal-toggle=\"defaultModal\"\n >\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"sr-only\">Close modal</span>\n </button>\n\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n overflow: \"hidden\",\n height: 100,\n width: 100,\n backgroundImage: `url(${file.preview})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n border: \"1px solid black\",\n }}\n className=\"rounded-lg\"\n key={file.name}\n />\n </div>\n ))\n\n return (\n <div>\n {label && (\n <div className=\"mb-2 block text-sm font-medium text-gray-900 dark:text-gray-300\">\n {label}\n </div>\n )}\n <div\n className={clsx(\n \"flex flex-col justify-center rounded border border-dashed bg-gray-50 p-6 transition-all hover:bg-gray-100 dark:bg-gray-950 dark:hover:bg-gray-800 \",\n isDragActive ? \"bg-gray-200 dark:bg-gray-700\" : \"bg-background\"\n )}\n >\n <div {...getRootProps({})}>\n <p {...getInputProps()} />\n <div className=\"flex flex-col items-center justify-center gap-2 pt-4 text-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1.5em\"\n width=\"1.5em\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M19 11v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\"></path>\n <path d=\"M13 13l9 3l-4 2l-2 4l-3 -9\"></path>\n <path d=\"M3 3l0 .01\"></path>\n <path d=\"M7 3l0 .01\"></path>\n <path d=\"M11 3l0 .01\"></path>\n <path d=\"M15 3l0 .01\"></path>\n <path d=\"M3 7l0 .01\"></path>\n <path d=\"M3 11l0 .01\"></path>\n <path d=\"M3 15l0 .01\"></path>\n </svg>\n {<texts.clickHereToUpload />}\n </div>\n <div className=\"pt-2 text-center text-xs\">\n {texts.acceptedFileTypes} {accept.split(\",\")}\n </div>\n <div className=\"pb-2 pt-1 text-center text-xs\">\n {texts.maxFileSize} {max}\n </div>\n </div>\n {acceptedFiles.length > 0 && (\n <div className=\"flex justify-center rounded-lg p-2 \">\n <Button onClick={clearAllFiles}>Clear All</Button>\n </div>\n )}\n {acceptedFiles.length > 0 && thumbs && showPreview ? (\n <aside className=\"flex flex-row flex-wrap justify-center gap-2 rounded-lg p-2\">\n {thumbs}\n </aside>\n ) : null}\n <div className=\"px-4\">{fileRejections[0]?.errors[0]?.code && errs}</div>\n </div>\n {disclaimer && (\n <div className=\"mt-2 text-sm text-muted-foreground/50\">\n {texts.disclaimer ?? \"By uploading a file you agree to our\"}{\" \"}\n <a\n href={termsLink}\n className=\"clickable-link text-muted-foreground/50\"\n >\n {texts.terms ?? \"Terms\"}\n </a>{\" \"}\n {texts.and ?? \"and\"}{\" \"}\n <a\n href={privacyLink}\n className=\"clickable-link text-muted-foreground/50\"\n >\n {texts.privacyPolicy ?? \"Privacy Policy\"}\n </a>\n </div>\n )}\n </div>\n )\n}\n","import React, { ReactElement, FC } from \"react\"\n\ntype DraggableCardTypes = {\n children: ReactElement\n}\n\nexport const DraggableCard: FC<DraggableCardTypes> = (props) => {\n return (\n <div className=\"flex flex-row rounded bg-layoutPrimary-500 p-4\">\n <button\n className=\"inline-flex items-center rounded bg-white p-2 text-center text-sm font-medium text-gray-900 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-50 dark:bg-gray-800 dark:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-600\"\n type=\"button\"\n >\n <svg\n className=\"h-6 w-6\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path d=\"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z\"></path>\n </svg>\n </button>\n\n <div className=\"p-4\">{props.children}</div>\n </div>\n )\n}\n","import React, { FC, ReactNode } from \"react\"\n\ntype TBreadcrumb = {\n /** The array of crumbs, each one with a label and a href link */\n breadcrumbLinks: [{ label: string; href: string }]\n /** The separator between each crumb, can be character or React Node. The default is \">\" */\n separator?: string | ReactNode\n}\n\nconst HawaBreadcrumb: FC<TBreadcrumb> = ({\n breadcrumbLinks,\n separator = \">\",\n}) => {\n return (\n <div className=\"flex flex-row items-center gap-2 text-sm\">\n {breadcrumbLinks.map((singleBreadcrumbLink, index) => (\n <div className=\"flex flex-row items-center justify-center gap-2\">\n <a\n href={singleBreadcrumbLink.href}\n className={\n index + 1 === breadcrumbLinks.length\n ? \"pointer-events-none\"\n : \"underline-offset-4 transition-all hover:text-primary hover:underline hover:decoration-2\"\n }\n >\n {singleBreadcrumbLink.label}\n </a>\n {index != breadcrumbLinks.length - 1 ? (\n typeof separator == \"string\" ? (\n <div>{separator}</div>\n ) : (\n <div>{separator}</div>\n )\n ) : null}\n </div>\n ))}\n </div>\n )\n}\n\nexport default HawaBreadcrumb\n","import React, { useState, FC } from \"react\"\nimport clsx from \"clsx\"\nimport { HawaChip } from \"./HawaChip\"\n\ntype SubsectionListTypes = {\n align?: any\n subsections: [\n {\n title: string\n sections: [\n {\n label: string\n action: () => void\n icon?: any\n value?: any\n }\n ]\n }\n ]\n}\nexport const SubsectionList: FC<SubsectionListTypes> = ({ subsections }) => {\n const [selectedSection, setSelectedSection] = useState(null)\n return (\n <div className=\"w-full max-w-2xs rounded bg-layoutPrimary-500 p-4 \">\n {subsections.map((ss, i) => (\n <div key={i} className=\"my-0\">\n {ss.title && <div className=\"my-4 font-bold\">{ss.title}</div>}\n {ss.sections.map((s, i) => (\n <SubsectionItem\n key={i}\n onItemClick={() => setSelectedSection(s.value)}\n selected={selectedSection}\n value={s.value}\n icon={s.icon}\n title={s.label}\n chip=\"Upgrade\"\n />\n ))}\n </div>\n ))}\n </div>\n )\n}\n\ntype TSubsectionItem = {\n chip?: string\n title: string\n value: string\n icon?: any\n selected?: any\n onItemClick?: () => void\n}\nconst SubsectionItem: FC<TSubsectionItem> = ({\n title,\n value,\n icon,\n chip,\n selected,\n onItemClick,\n}) => {\n return (\n <div\n onClick={onItemClick}\n className={clsx(\n \"flex w-full cursor-pointer flex-row items-center justify-between gap-2 rounded p-2 transition-all \",\n selected === value\n ? \"bg-primary text-white hover:bg-primary\"\n : \"hover:bg-layoutPrimary-300\"\n )}\n >\n <div className=\"flex w-full flex-row items-center justify-start gap-2\">\n {icon} <span>{title}</span>\n </div>\n {chip && <HawaChip label=\"Upgrade\" size=\"normal\" />}{\" \"}\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport { Tooltip } from \"./Tooltip\"\n\ntype UsageCardTypes = {\n tooltip?: any\n title: any\n percent: any\n currentUsage: any\n}\nexport const UsageCard: FC<UsageCardTypes> = (props) => {\n return (\n <div className=\"flex w-full flex-col gap-0 border p-4\">\n <div className=\"flex flex-row items-center gap-2\">\n <span className=\"bg-white-200\">{props.title}</span>\n {props.tooltip && (\n <Tooltip content={props.tooltip} side=\"right\">\n <svg\n stroke=\"currentColor\"\n aria-label=\"Exclamation Circle\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z\"></path>\n </svg>\n </Tooltip>\n )}\n </div>\n <div className=\"bg-white-100 flex flex-row\">\n <div>{props.currentUsage}</div>\n <div> ({props.percent}%)</div>\n </div>\n <div className=\"mt-2 h-2.5 w-full rounded-full bg-gray-200 dark:bg-gray-700\">\n <div\n className=\"h-2.5 rounded-full bg-primary\"\n style={{\n width: `${props.percent ?? 0}%`,\n }}\n ></div>\n </div>\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport clsx from \"clsx\"\nimport { HawaChip } from \"./HawaChip\"\nimport { HawaMenu } from \"./HawaMenu\"\n\ntype InvoiceAccordionTypes = {\n products: {\n usage?: string\n price?: string\n amount?: string\n plan?: string\n }[]\n texts: {\n total: string\n plan: string\n usage: string\n amount: string\n price: string\n }\n invoiceTitle: string\n invoiceSubtitle: string\n invoiceDescription?: string\n invoiceActions?: {\n icon?: JSX.Element\n label: string\n action?: (e: any) => void\n isButton?: boolean\n element?: any\n }[][]\n total: any\n direction?: \"rtl\" | \"ltr\"\n status?: \"paid\" | \"pending\" | \"overdue\"\n}\nexport const InvoiceAccordion: FC<InvoiceAccordionTypes> = ({\n direction = \"ltr\",\n texts = {\n total: \"Total\",\n plan: \"Plan\",\n usage: \"Usage\",\n amount: \"Amount\",\n price: \"Price\",\n },\n ...props\n}) => {\n const InvoiceItemProp = (props) => (\n <div\n className={clsx(\n props.start ? \"items-start\" : \"items-end\",\n \"flex w-full flex-col\"\n )}\n >\n <div className=\" text-sm text-gray-500\">{props.label}</div>\n <div className=\" whitespace-nowrap\">{props.text}</div>\n </div>\n )\n const [expanded, setExpanded] = useState(false)\n return (\n <div className=\"flex w-full flex-col\">\n <div className=\"flex w-full flex-row items-center gap-2 border p-4 \">\n {props.invoiceActions && (\n <div\n className={clsx(\n \"transition-all hover:cursor-pointer \",\n direction === \"rtl\" ? \"rotate-180\" : \"\",\n expanded ? \"rotate-90\" : \"\"\n )}\n onClick={() => setExpanded(!expanded)}\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"2em\"\n width=\"2em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </div>\n )}\n <div\n className=\"flex w-full cursor-pointer flex-col gap-0\"\n onClick={() => setExpanded(!expanded)}\n >\n <div className=\"flex flex-row items-center gap-2\">\n <span className=\"bg-white-200\">{props.invoiceTitle}</span>\n {props.status && <HawaChip size=\"small\" label={props.status} />}\n </div>\n <div className=\"font-sm text-gray-400\">{props.invoiceSubtitle}</div>\n </div>\n <div className=\"flex flex-row items-center gap-2\">\n <div className=\"whitespace-nowrap\">{props.total}</div>\n <HawaMenu\n direction={direction}\n position={direction === \"rtl\" ? \"bottom-right\" : \"bottom-left\"}\n menuItems={props.invoiceActions}\n >\n <div className=\" p-2\">\n {/* <BsThreeDotsVertical /> */}\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z\"></path>\n </svg>\n </div>\n </HawaMenu>\n </div>\n </div>\n {expanded && (\n <div\n className={clsx(\n expanded ? \"h-full\" : \"h-0 border-none p-0 px-4\",\n \"flex h-auto flex-col gap-4 overflow-clip border border-t-0 bg-gray-50 p-4 transition-all\"\n )}\n >\n <div className=\"border-b pb-2\">{props.invoiceDescription}</div>\n {props.products?.map((product, i) => (\n <div key={i} className=\"flex flex-row border-b pb-4\">\n <div className=\"w-full\">\n <InvoiceItemProp start label={texts.plan} text={product.plan} />\n </div>\n <div className=\"flex w-full flex-row gap-20 \">\n <InvoiceItemProp\n label={texts.usage}\n text={`${product.usage} SAR`}\n />\n <InvoiceItemProp\n label={texts.price}\n text={`${product.price} SAR`}\n />\n <InvoiceItemProp\n label={texts.amount}\n text={`${product.amount} SAR`}\n />\n </div>\n </div>\n ))}\n <div className=\"flex flex-row justify-between\">\n <div>{texts.total}</div> <div>{props.total}</div>\n </div>\n </div>\n )}\n </div>\n )\n}\n","import React, { FC, useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\n\ntype ComponentTypes = {\n title?: string\n question: string\n options?: []\n texts?: {\n least: string\n most: string\n }\n position?: \"bottom-right\" | \"bottom-left\"\n onOptionClicked?: (option) => void\n}\nexport const UserFeedback: FC<ComponentTypes> = ({\n position = \"bottom-right\",\n ...props\n}) => {\n const [closed, setClosed] = useState(false)\n const [answered, setAnswered] = useState(false)\n const [clickedOption, setClickedOption] = useState(null)\n const [closingTimer, setClosingTimer] = useState(5)\n const popUpRef = useRef(null)\n\n const boxPosition = {\n \"bottom-right\": \"right-4\",\n \"bottom-left\": \"left-4\",\n }\n useEffect(() => {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n if (closingTimer >= 0) {\n setClosingTimer(closingTimer - 1)\n }\n }, 1000)\n\n return () => {\n clearTimeout(timeoutHide)\n }\n }, [closingTimer])\n\n const slowClose = () => {\n setClosed(true)\n setTimeout(() => {\n popUpRef.current.removeChild(popUpRef.current.children[0])\n }, 200)\n }\n return (\n <div\n ref={popUpRef}\n className={clsx(\"fixed bottom-4 \", boxPosition[position])}\n >\n <div\n className={clsx(\n \"relative flex w-full max-w-sm flex-col gap-2 rounded border bg-background p-4 shadow-md transition-all\",\n closed ? \"opacity-0\" : \"opacity-100\"\n )}\n >\n <div className=\"absolute left-2 top-2 p-1.5 text-sm\">{props.title}</div>\n <button\n type=\"button\"\n className=\"absolute right-2 top-2 inline-flex h-8 w-8 rounded p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white\"\n data-dismiss-target=\"#toast-default\"\n aria-label=\"Close\"\n onClick={() => slowClose()}\n >\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n <div className=\"mt-8\">{props.question}</div>\n <div className=\"flex w-full flex-row gap-1 rounded\">\n {props.options.map((op) => (\n <span\n onClick={() => {\n props.onOptionClicked(op)\n setClickedOption(op)\n setAnswered(true)\n const timeoutDestroy = setTimeout(() => {\n setClosed(true)\n }, 4800)\n setTimeout(() => {\n popUpRef.current.removeChild(popUpRef.current.children[0])\n clearTimeout(timeoutDestroy)\n }, 5300)\n }}\n className={clsx(\n \"w-full cursor-pointer rounded border p-4 text-center transition-all \",\n clickedOption === op\n ? \"bg-gray-500 text-white\"\n : \"border bg-background hover:bg-gray-300 dark:hover:bg-gray-700\"\n )}\n >\n {op}\n </span>\n ))}\n </div>\n {props.texts && (\n <div className=\" flex flex-row justify-between text-xs\">\n <span>{props.texts.least}</span>\n <span>{props.texts.most}</span>\n </div>\n )}\n {answered && (\n <div className=\"absolute left-0 top-0 gap-2 flex h-full w-full flex-col items-center justify-center rounded bg-black bg-opacity-80 p-4 text-center transition-all\">\n <span className=\"font-bold text-white\">\n Thank you for your answer. This box will disappear in\n {\" \" + closingTimer} seconds\n </span>\n <div className=\"flex flex-row gap-2\">\n <Button onClick={() => slowClose()}>Close</Button>\n </div>\n </div>\n )}\n </div>\n </div>\n )\n}\n","import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype Item = {\n label?: string\n icon?: JSX.Element\n}\n\ntype ComponentTypes = {\n items: Item[]\n index?: number\n arrowSize?: number\n labelSize?: \"small\" | \"medium\" | \"big\"\n}\n\nconst Arrow = (props: {\n icon?: any\n size?: number\n onClick?: () => void\n disabled?: boolean\n direction?: \"right\" | \"left\"\n}) => {\n return (\n <svg\n onClick={props.onClick || (() => {})}\n className={clsx(\n \"h-6 w-6 shrink-0 transition-all disabled:bg-gray-200\",\n props.direction === \"right\" ? \"-rotate-90\" : \"rotate-90\",\n props.disabled ? \"text-gray-300\" : \"cursor-pointer hover:scale-150\"\n )}\n fill={props.disabled && \"grey\"}\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )\n}\n\nexport const ArrowCarousel: FC<ComponentTypes> = (props) => {\n const [index, setIndex] = useState(props.index || 0)\n\n useEffect(() => {\n console.log(`INDEX CHANGED TO: ${index}`)\n }, [index])\n\n const sizes = {\n small: [\"\", -8],\n medium: [\"2\", -11],\n big: [\"3\", -16],\n }\n\n return (\n <div className=\"align-center box-boorder relative flex h-min w-min flex-row items-center justify-center rounded bg-layoutPrimary-500 p-4 py-0 pb-2 pt-2 shadow-md\">\n <Arrow\n direction=\"left\"\n // size={props.arrowSize || 48}\n disabled={index == 0}\n onClick={() => {\n if (index != 0) setIndex(index - 1)\n }}\n />\n\n <div\n className={`relative m-5 my-0 box-border flex h-full flex-col items-center justify-center py-6 pt-0 `}\n >\n <div>{props.items[index].icon}</div>\n <div\n className={\"absolute bottom-1 mb-0 mt-2 select-none\"}\n // {`absolute bottom-0 text-${\n // sizes[props.labelSize || \"small\"][0]\n // }xl `}\n // style={{\n // marginBottom: sizes[props.labelSize || \"small\"][1],\n // }}\n >\n {props.items[index].label}\n </div>\n </div>\n\n <Arrow\n direction=\"right\"\n // size={props.arrowSize || 48}\n disabled={index == props.items.length - 1}\n onClick={() => {\n if (index != props.items.length - 1) setIndex(index + 1)\n }}\n />\n </div>\n )\n}\n","import React, { useRef, useState, useEffect } from \"react\"\nimport clsx from \"clsx\"\n\nconst Property = (props) => {\n return (\n <div\n className=\"border-box mr-[10px] flex h-[32px] w-[32px] items-center justify-center rounded bg-gray-300 p-2\"\n onMouseDown={props.onMouseDown}\n >\n {props.name}\n </div>\n )\n}\n\ntype ComponentTypes = {\n rtl?: \"enabled\" | \"disabled\" | \"auto\"\n onSubmit?: (\n content: string,\n stylings: { type: keyof typeof stylers; start: number; finish: number }[]\n ) => void\n}\n\nconst stylers = {\n bold: { css: \"font-bold\", content: \"B\" },\n italic: { id: \"italic\", css: \"italic\", content: \"I\" },\n under: { id: \"under\", css: \"underline\", content: \"U\" },\n strike: { id: \"strike\", css: \"line-through\", content: \"S\" },\n}\n\n// FIXME: ? Highlighting a part of styled text with a bit on the left with an overall length not equal to clipboard copied text will result in paste issues\n\n// FIXME: Highlighting the beginning characters of styled text and then pasting text sometimes doesn't register as right intersecting\n// This expecially happens when the selection is for example, [0, 2] and the styling is [0, 3], this might be failure of addition which doesn't offset the styling\n\n// TODO: Refactor styling splicing into one method\n// TODO: Refactor function that simplifies a list of stylings\n// TODO: Turn stylings into a class, this should also change .finish to .end\n\n// Possible logic changes:\n// Paste = Removal + Addition -> Styling Removal + Styling Addition\n// Drag & Drop = Removal + Addition -> Styling Removal + Styling Addition\n\n// FIXME:\n// - Creating a new line, and typing data in it, and then setting two different stylings on the same text\n// FIXME:\n// - Type characters, create new line, remove the new line immediately\n\n// FIXME: Line at first index of content editable\n\n// FIXME: Typing behind a line break identifier\n// One way to prevent it, is to check in the onChange event if the data added (removed might not be needed here), is behind a line break identifier\n// if so, move the start and end index by the length of the added, and replace the added, and then add the added back in the offset index\n\n// FIXME:\n// Deleting all text in a line removes that line entirely\n\nconst lineBreakIdentifier = \"\"\n\nexport const FloatingComment: React.FunctionComponent<ComponentTypes> = (\n props\n) => {\n const [text, _setText] = useState({\n content: \"\",\n stylings: [], // A styling is an object with 2 indices specifying a substring of text, and the applied effect\n revert: [0, 0],\n clipboard: [],\n events: {\n paste: { is: false, length: null },\n drop: { is: false, text: null, drag: null },\n },\n })\n\n const field = useRef(null)\n const _text = useRef(text)\n const setText = (data) => {\n _text.current = data\n _setText(data)\n }\n\n const getChildIndex = (child) => {\n for (var i = 0; (child = child.previousSibling); i++);\n return i\n }\n\n const getRelativePrecedingSum = (element, endIndex) => {\n let nodes: any = Array.from(element.childNodes)\n let sum = nodes\n .slice(0, endIndex)\n .map((node) => node.textContent.length)\n .reduce((a, b) => a + b, 0)\n return sum\n }\n\n const getLinePrecedingSum = (endIndex) => {\n let fieldNodes = Array.from(field.current.childNodes)\n let sum = fieldNodes\n .slice(0, endIndex)\n .map((lineNode: any) => {\n let lineNodes = Array.from(lineNode.childNodes)\n return getRelativePrecedingSum(lineNode, lineNodes.length)\n })\n .reduce((a, b) => a + b, 0)\n\n return sum\n }\n\n const getSelectionPrecedingSum = (name) => {\n let selection = window.getSelection()\n let nodes = Array.from(field.current.childNodes)\n\n // All current occurences for text or br:\n // Pasting on empty text (text)\n // Cutting/removing all text (br)\n // Typing the first character in empty text (text)\n // Dragging text to the end of the text (text)\n\n nodes = nodes.filter(\n (item: any) => ![\"#text\", \"BR\"].includes(item.nodeName)\n )\n\n let node = selection[name]\n let parent: any = node.parentNode\n let sum = 0\n // let special = 0\n\n const isNodeLine =\n node.nodeName == \"DIV\" && Array.from(node.classList).includes(\"line\")\n\n // If the parent node is a span, this must be a text node\n if (parent.nodeName == \"SPAN\") {\n // Get index of span within line\n let spanIndex = getChildIndex(parent)\n\n // Get relative sum within line\n sum += getRelativePrecedingSum(parent.parentNode, spanIndex)\n\n // Get parent line index\n let lineIndex = getChildIndex(parent.parentNode)\n\n // Get relative sum within entire field\n sum += getLinePrecedingSum(lineIndex)\n }\n\n // If the parent node is a line element, this must be a new line, so return the preceding sum\n if (Array.from(parent.classList).includes(\"line\")) {\n // If the node is a text node, then that must mean this is a non-styled drop\n if (node.nodeName == \"#text\") {\n let spanIndex = getChildIndex(node)\n\n sum += getRelativePrecedingSum(parent, spanIndex)\n }\n\n // Get line element index\n let lineIndex = getChildIndex(parent)\n\n // Get relative sum within entire field\n sum += getLinePrecedingSum(lineIndex)\n }\n\n if (isNodeLine) {\n // Get line element index\n let lineIndex = getChildIndex(node)\n\n // Get relative sum within entire field\n sum = getLinePrecedingSum(lineIndex)\n }\n\n // If the parent is the field, return zero\n // FIXME: Should we return zero here?\n if (parent == field.current && !isNodeLine) {\n return 0\n }\n\n // // Special case for dropping text near or inside styled text\n // if (!Array.from(parent.parentNode.classList).includes(\"selection-ignore\")) {\n // parent = parent.parentNode\n\n // let index = getChildIndex(selection[name].parentNode)\n // special = Array.from(parent.childNodes)\n // .slice(0, index)\n // .map((e: any) => e.textContent.length)\n // .reduce((a, b) => a + b, 0)\n // }\n\n // let index = parent == field.current ? nodes.length : getChildIndex(parent)\n\n // let sum =\n // nodes\n // .slice(0, index)\n // .map((span: any) => span.textContent.length)\n // .reduce((a, b) => a + b, 0) + special\n\n return sum\n }\n\n const getFieldSelection = () => {\n if (document.activeElement != field.current) return [0, 0]\n let selection = window.getSelection()\n\n let startPrecedingSum = getSelectionPrecedingSum(\"anchorNode\")\n let endPrecedingSum = getSelectionPrecedingSum(\"focusNode\")\n\n let result = [\n startPrecedingSum + selection.anchorOffset,\n endPrecedingSum + selection.focusOffset,\n ]\n\n // Sort to make the minimum selection the start selection\n return result.sort((a, b) => a - b)\n }\n\n useEffect(() => {\n setTimeout(function () {\n let [start, end] = _text.current.revert\n\n if (start == 0 && end == 0) return\n\n let startNode = null\n let endNode = null\n\n let total = 0\n // let nodes = Array.from(field.current.childNodes)\n let nodes = Array.from(field.current.getElementsByTagName(\"span\"))\n\n for (let i = 0; i < nodes.length; i++) {\n let node: any = nodes[i]\n let sum = node.textContent.length + total\n\n if (startNode == null && start >= total && start <= sum) {\n startNode = nodes[i]\n start -= total\n }\n\n if (endNode == null && end > total && end <= sum) {\n endNode = nodes[i]\n end -= total\n }\n\n total += node.textContent.length\n }\n\n var range = document.createRange()\n var sel = window.getSelection()\n\n range.setStart(startNode.firstChild, start)\n range.setEnd(endNode.firstChild, end)\n\n sel.removeAllRanges()\n sel.addRange(range)\n }, 1)\n }, [text.revert])\n\n // utility functions\n const getRange = (start, end) => {\n let result = []\n for (let i = start; i <= end; i++) {\n result.push(i)\n }\n return result\n }\n\n const intersection = (setA, setB) => {\n const _intersection = new Set()\n for (const elem of setB) {\n if (setA.has(elem)) {\n _intersection.add(elem)\n }\n }\n return _intersection\n }\n\n const getMinimum = (array) => {\n return array.sort((a, b) => a - b)[0]\n }\n\n const getMaximum = (array) => {\n return array.sort((a, b) => b - a)[0]\n }\n\n // -1 - types dont match\n // 0 - s1 is surrounded or on the edge of the s2\n // 1 - s1 intersects with s2\n // 2 - s1 does not intersect with s2\n const getCorrelation = (styling1, styling2) => {\n if (styling1.type != styling2.type) return -1\n\n if (\n styling2.start <= styling1.start &&\n styling2.finish >= styling1.finish\n ) {\n return 0\n }\n\n let indices1 = new Set(getRange(styling1.start - 1, styling1.finish - 1))\n let indices2 = new Set(getRange(styling2.start - 1, styling2.finish - 1))\n\n let result = intersection(indices1, indices2)\n\n return result.size == 0 ? 2 : 1\n }\n\n // Correlation handler\n const stylingSplice = (correlations, stylings, current, type) => {\n // Only one surround correlation is possible at one time, so use .find to fetch it\n\n let [_, index, styling] = correlations.find(([c, _, __]) => c == 0)\n\n // Remove correlated styling\n stylings = stylings.filter((_, _index) => _index != index)\n\n // Get splices\n let added = [\n {\n type: type,\n start: getMinimum([styling.start, current.start]),\n finish: getMaximum([styling.start, current.start]),\n },\n {\n type: type,\n start: getMinimum([styling.finish, current.finish]),\n finish: getMaximum([styling.finish, current.finish]),\n },\n ]\n\n // Remove empty splices (edge cases)\n added = added.filter((item) => item.start != item.finish)\n\n // Add to current stylings\n stylings = [...stylings, ...added]\n\n return stylings\n }\n\n // Correlation handler\n const stylingIntersect = (correlations, stylings, current, type) => {\n // Filter out all intersected stylings\n let intersections = correlations\n .filter(([c, _, __]) => c == 1)\n .map(([_, index, styling]) => {\n return [index, styling]\n })\n\n // Add current styling with no index for the sake for endpoint indices\n intersections.push([-1, current])\n\n // Get minimum intersection start index\n let start = intersections\n .map(([_, styling]) => styling.start)\n .sort((a, b) => a - b)[0]\n\n // Get maximum intersection start index\n let finish = intersections\n .map(([_, styling]) => styling.finish)\n .sort((a, b) => b - a)[0]\n\n // Get indices of all intersection\n let indices = intersections.map((e) => e[0])\n\n // Remove all from resulting styling array\n stylings = stylings.filter((_, index) => !indices.includes(index))\n\n // Add widest styling which encompasses all intersections\n stylings.push({\n type: type,\n start: start,\n finish: finish,\n })\n\n return stylings\n }\n\n const perform = (id) => {\n let stylings = _text.current.stylings.slice()\n let [selectionStart, selectionEnd] = getFieldSelection()\n\n if (selectionStart == selectionEnd) return\n\n let current = {\n type: id,\n start: selectionStart,\n finish: selectionEnd,\n }\n\n let correlations = []\n\n // Check the correlation between this requested styling and all other stylings\n for (let i = 0; i < stylings.length; i++) {\n let styling = stylings[i]\n let correlation = getCorrelation(current, styling)\n\n if (correlation != -1) correlations.push([correlation, i, styling])\n }\n\n let result\n\n if (correlations.find(([c, _, __]) => c == 1)) {\n result = stylingIntersect(correlations, stylings, current, id)\n } else if (correlations.find(([c, _, __]) => c == 0)) {\n result = stylingSplice(correlations, stylings, current, id)\n } else if (\n correlations.find(([c, _, __]) => c == 2) ||\n correlations.length == 0\n ) {\n result = [...stylings, current]\n }\n\n setText({\n ...text,\n stylings: result,\n revert: [selectionStart, selectionEnd],\n })\n }\n\n // Get stylings encompassing an index within it's range\n const getIntersectStylings = (\n stylings,\n index,\n startOffset = 0,\n finishOffset = 0\n ) => {\n // Find all stylings with encompassing range\n let matches = stylings.filter(\n ({ start, finish }) =>\n index >= start + startOffset && index < finish + finishOffset\n )\n\n return matches\n }\n\n const getStylingsInRange = (stylings, startIndex, endIndex) => {\n // Get all intersecting stylings within range\n let result = stylings.filter(\n ({ start, finish }) =>\n (finish > startIndex && start < endIndex) ||\n (start < endIndex && finish > startIndex)\n )\n\n // Clamp start and end values, and offset by start index to reach the relative minimum\n result = result.map((styling) => {\n return {\n ...styling,\n start: getMaximum([styling.start, startIndex]) - startIndex,\n finish: getMinimum([styling.finish, endIndex]) - startIndex,\n }\n })\n\n return result\n }\n\n const splitStyling = (styling, index, offset = 0) => {\n // Get first split\n let first = {\n ...styling,\n start: styling.start,\n finish: index,\n }\n\n // Get second split\n let second = {\n ...styling,\n start: index + offset,\n finish: styling.finish + offset,\n }\n\n return [first, second]\n }\n\n const additionTo = (stylings, startIndex, length, defaultBehavior = true) => {\n // console.log(`Adding text of length ${length} at index ${startIndex}`)\n\n // Required operations:\n // Offset succeeding stylings\n // Split intersecting stylings\n // Styling continuation at end (only for normal addition)\n\n stylings = stylings.map((styling) => {\n // A succeeding styling\n if (styling.start >= startIndex && styling.finish > startIndex) {\n console.log(\"succeeding\")\n return {\n ...styling,\n start: styling.start + length,\n finish: styling.finish + length,\n }\n }\n\n // An intersecting styling\n if (styling.start < startIndex && styling.finish > startIndex) {\n // Normal addition (non-drop & non-paste), adds to the length of the styling\n if (defaultBehavior) {\n return {\n ...styling,\n finish: styling.finish + length,\n }\n } else {\n // Special addition (drop & paste), splits the styling and offsets the second half by length of addition\n return splitStyling(styling, startIndex, length)\n }\n }\n\n // A connected styling at the end\n if (styling.finish == startIndex) {\n // Normal addition (non-drop & non-paste), continues the styling by addition length\n if (defaultBehavior) {\n return {\n ...styling,\n finish: styling.finish + length,\n }\n }\n }\n\n return styling\n })\n\n return stylings.flat()\n }\n\n const deletionOf = (stylings, startIndex, endIndex) => {\n // console.log(`Removing text from ${startIndex} to ${endIndex}`)\n\n let length = Math.abs(endIndex - startIndex)\n\n // Required operations:\n // Offset succeeding stylings\n // Remove stylings completely within range\n // Shrink stylings surrounding range\n // Clamp left resumptions and offset\n // Clamp right resumptions\n\n stylings = stylings.map((styling) => {\n // A succeeding styling, but not a right resumption\n if (\n styling.start >= startIndex &&\n styling.start >= endIndex &&\n styling.finish >= startIndex &&\n styling.finish >= endIndex\n ) {\n return {\n ...styling,\n start: styling.start - length,\n finish: styling.finish - length,\n }\n }\n\n // A styling completely within deletion range\n if (styling.start >= startIndex && styling.finish <= endIndex) {\n return null\n }\n\n // A styling surrounding deletion range\n if (styling.start <= startIndex && styling.finish >= endIndex) {\n return {\n ...styling,\n finish: styling.finish - length,\n }\n }\n\n // A styling not fully within deletion range, while the range exceeds to the left\n if (styling.start > startIndex && styling.start < endIndex) {\n return {\n ...styling,\n start: getMaximum([styling.start, endIndex]) - length,\n finish: styling.finish - length,\n }\n }\n\n // A styling not full within deletion range, while the range exceeds to the right\n if (styling.finish > startIndex && styling.finish < endIndex) {\n return {\n ...styling,\n finish: getMinimum([styling.finish, startIndex]),\n }\n }\n\n return styling\n })\n\n return stylings.flat().filter((styling) => styling)\n }\n\n const processNormal = (\n stylings,\n difference,\n selectionStart,\n selectionEnd\n ) => {\n if (difference == 0) return stylings\n\n if (difference > 0) {\n stylings = additionTo(stylings, selectionStart - difference, difference)\n } else {\n stylings = deletionOf(\n stylings,\n selectionStart,\n selectionEnd + Math.abs(difference)\n )\n }\n\n return stylings\n }\n\n const processPaste = (stylings, difference, selectionStart, selectionEnd) => {\n let pasteLength = _text.current.events.paste.length\n\n // console.log(\n // `Pasting for length ${pasteLength} at [${selectionStart}, ${selectionEnd}]`\n // )\n // console.log(\n // `Accompanied stylings: ${JSON.stringify(\n // _text.current.clipboard,\n // null,\n // 2\n // )}`\n // )\n\n // Get addition start index\n let additionStart = selectionStart - pasteLength\n\n // Get removal range\n let removalStart = additionStart\n let removalEnd = additionStart + pasteLength - difference\n\n // Compute deletion\n stylings = deletionOf(stylings, removalStart, removalEnd)\n\n // Compute addition\n stylings = additionTo(stylings, additionStart, pasteLength, false)\n\n // Add rich copied stylings offset by paste start index\n stylings = stylings.concat(\n _text.current.clipboard.map((styling) => {\n return {\n ...styling,\n start: styling.start + additionStart,\n finish: styling.finish + additionStart,\n }\n })\n )\n\n // console.log(`End result: ${JSON.stringify(stylings, null, 2)}`)\n\n return stylings\n }\n\n const processDrop = (stylings, difference, dropStart, dropEnd) => {\n console.log(`Dropped at: ${[dropStart, dropEnd]}`)\n\n let dropLength = _text.current.events.drop.text.length\n\n let [dragStart, dragEnd] = _text.current.events.drop.drag\n\n let dropDifference = dropStart - dragStart\n\n // Get stylings at drag range\n let dragStylings = getStylingsInRange(stylings, dragStart, dragEnd)\n\n // Removal range\n let removalStart = dragStart\n let removalEnd = dragEnd\n\n // If the drag precedes the drop (positive difference)\n if (dropDifference > 0) {\n // Addition start index\n let additionStart = dropEnd\n\n // Compute addition first\n stylings = additionTo(stylings, additionStart, dropLength, false)\n\n // Compute removal second\n stylings = deletionOf(stylings, removalStart, removalEnd)\n }\n\n // If the drop precedes the drag (negative difference)\n if (dropDifference < 0) {\n // Addition start index\n let additionStart = dropStart\n\n // Compute removal first\n stylings = deletionOf(stylings, removalStart, removalEnd)\n\n // Compute addition second\n stylings = additionTo(stylings, additionStart, dropLength, false)\n }\n\n // Add rich dragged stylings offset\n stylings = stylings.concat(\n dragStylings.map((styling) => {\n return {\n ...styling,\n start: styling.start + dropStart,\n finish: styling.finish + dropStart,\n }\n })\n )\n\n return stylings\n }\n\n const onChange = (value, selectionStart, selectionEnd) => {\n // Since drop events cause onChange to invoke twice, ignore the first incomplete event\n if (\n _text.current.events.drop.is &&\n value.length != _text.current.content.length\n )\n return\n\n console.log(`Changed at: ${[selectionStart, selectionEnd]}`)\n\n setTimeout(function () {\n // let [selectionStart, selectionEnd] = getFieldSelection()\n let difference = value.length - _text.current.content.length\n let stylings = _text.current.stylings\n\n // Paste event\n if (_text.current.events.paste.is) {\n stylings = processPaste(\n stylings,\n difference,\n selectionStart,\n selectionEnd\n )\n } else if (_text.current.events.drop.is) {\n stylings = processDrop(\n stylings,\n difference,\n selectionStart,\n selectionEnd\n )\n } else {\n stylings = processNormal(\n stylings,\n difference,\n selectionStart,\n selectionEnd\n )\n }\n\n setText({\n ..._text.current,\n content: value,\n stylings: stylings,\n revert: [selectionStart, selectionEnd],\n events: {\n paste: { is: false, length: null },\n drop: { is: false, text: null, drag: null },\n },\n })\n }, 0)\n }\n\n const getContent = () => {\n // console.clear()\n let content = _text.current.content\n let stylings = [..._text.current.stylings]\n\n let result = []\n\n // Get line indices\n let lineIndices = content\n .split(\"\")\n .map((character, index) => {\n if (character == lineBreakIdentifier) return index\n return null\n })\n .filter((item) => item)\n\n // Add end point\n lineIndices.unshift(0)\n lineIndices.push(content.length)\n\n // Ignore last element\n for (let i = 0; i < lineIndices.length - 1; i++) {\n let lineStart = lineIndices[i]\n let lineEnd = lineIndices[i + 1]\n\n let lineContent = content.slice(lineStart, lineEnd)\n\n // console.log(\n // `Line: ${lineStart} -> ${lineEnd}, with content: ${lineContent}`\n // )\n\n // Get all stylings within line\n let lineStylings = getStylingsInRange(stylings, lineStart, lineEnd)\n\n // Collect all spans relative to stylings within line\n let spans = []\n\n // Acquire all flattened unique indices\n let indices = lineStylings\n .map(({ start, finish }) => [start, finish])\n .flat()\n .sort((a, b) => a - b)\n\n indices = indices.filter(\n (element, index) => indices.indexOf(element) == index\n )\n\n // Add first index if not present\n if (indices[0] != 0) indices.unshift(0)\n\n // Add last index if not present\n let last = lineContent.length\n if (indices[indices.length - 1] != last) indices.push(last)\n\n // Iterate through all indices except the last\n for (let i = 0; i < indices.length - 1; i++) {\n let startIndex = indices[i]\n let endIndex = indices[i + 1]\n\n spans.push({\n content: lineContent.substring(startIndex, endIndex),\n types: getIntersectStylings(lineStylings, startIndex).map(\n (styling) => styling.type\n ),\n })\n }\n\n result.push(spans)\n }\n\n // // Get all styling indices\n // let indices = _text.current.stylings\n // .map(({ start, finish }) => [start, finish])\n // .flat()\n\n // // Sort ascendingly\n // indices = indices.sort((a, b) => a - b)\n\n // // Remove duplicates\n // indices = indices.filter(\n // (element, index) => indices.indexOf(element) == index\n // )\n\n // // Add first index if not present\n // if (indices[0] != 0) indices.unshift(0)\n\n // // Add last index if not present\n // let last = content.length\n // if (indices[indices.length - 1] != last) indices.push(last)\n\n // // let result = []\n\n // for (let i = 0; i < indices.length - 1; i++) {\n // result.push([indices[i], content.substring(indices[i], indices[i + 1])])\n // }\n\n return result\n }\n\n // dangerouslySetInnerHTML incorrectly renders when the entire text is highlighted, copied, and then pasted in succession\n useEffect(() => {\n let html = getContent()\n .map((line, index) => {\n return `<div class=\"line\" data-line-index=\"${index}\">${line\n .map((span, _index) => {\n return `<span class=\"${span.types\n .map((type) => stylers[type].css)\n .join(\" \")}\" data-child-index=\"${_index}\">${span.content}</span>`\n })\n .join(\"\")}</div>`\n })\n .join(\"\")\n\n // let html = getContent()\n // .map((_data, index) => {\n // let [start, data] = _data\n\n // // Get stylings encompassing an index within it's range\n // let stylings = getIntersectStylings(_text.current.stylings, start)\n // return `<span class=\"${stylings\n // .map((styling) => stylers[styling.type].css)\n // .join(\" \")}\" data-child-index=\"${index}\">${data}</span>`\n // })\n // .join(\"\")\n\n field.current.innerHTML = html\n }, [text.content, text.stylings, text.revert])\n\n const getTextDirection = () => {\n let value = props.rtl || \"disabled\"\n\n switch (value) {\n case \"enabled\":\n return \"rtl\"\n case \"disabled\":\n return \"ltr\"\n case \"auto\":\n return \"ltr\"\n }\n }\n\n return (\n <div className=\"align-center box-border flex h-min w-[400px] flex-col items-center justify-center rounded shadow-md\">\n <div className={clsx(\"flex w-full flex-row justify-start p-2\")}>\n {Object.entries(stylers).map(([id, data]) => {\n return (\n <Property\n name={data.content}\n key={`property-${id}`}\n onMouseDown={(event) => {\n event.preventDefault()\n perform(id)\n }}\n />\n )\n })}\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n {/* <div className=\"selection-ignore rtl h-[150px] w-full resize-none overflow-auto overflow-x-hidden border-none font-['Arial'] text-[16px] outline-none\">\n <div className=\"line\" data-line-index=\"0\">\n <span className=\"\" data-child-index=\"0\">\n asd\n </span>\n </div>\n <div className=\"line\" data-line-index=\"1\">\n <br />\n </div>\n </div>\n */}\n <div className=\"selection-ignore box-border w-full p-2\">\n <div\n ref={field}\n contentEditable=\"true\"\n className=\"selection-ignore rtl h-[150px] w-full resize-none overflow-auto overflow-x-hidden border-none font-['Arial'] text-[16px] outline-none\"\n style={{\n direction: getTextDirection(),\n }}\n onPaste={(event) => {\n // pastes all copied text from the content editable as plain text\n event.preventDefault()\n let data = event.clipboardData.getData(\"text/plain\")\n data = data.replaceAll(\"\\n\", \"\")\n data = data.replaceAll(\"\\r\", \"\")\n\n document.execCommand(\"insertHTML\", false, data)\n\n // selection.anchorOffset <= 1 &&\n // selection.focusOffset <= 1\n // ) {\n // let lineIndex = getChildIndex(anchorNode.parentNode.parentNode)\n\n // let _content = content\n // if (content.startsWith(lineBreakIdentifier)) {\n // _content = _content.slice(1)\n // }\n\n // let originalLine: any =\n // _content.split(lineBreakIdentifier)[lineIndex]\n\n // console.log(_content.split(lineBreakIdentifier))\n\n // originalLine = originalLine.split(\"\")\n // originalLine.splice(0, 0, eventData)\n // originalLine = originalLine.join(\"\")\n\n // let lines = _content.split(lineBreakIdentifier)\n\n // lines[lineIndex] = originalLine\n\n // textContent = lines.join(lineBreakIdentifier)\n\n // if (content.startsWith(lineBreakIdentifier)) {\n // textContent = lineBreakIdentifier + textContent\n // }\n\n // start += 1\n // end += 1\n // }\n\n setText({\n ..._text.current,\n events: {\n ..._text.current.events,\n paste: { is: true, length: data.length },\n },\n })\n }}\n onInput={(event: any) => {\n // console.log(event)\n // console.log(event.target.textContent)\n // console.log(event.target.textContent.split(\"\"))\n\n let [start, end] = getFieldSelection()\n let textContent = event.target.textContent\n let content = _text.current.content\n // Try creating twice the lines if the index is at 0,0\n // if (!textContent.startsWith(lineBreakIdentifier)) {\n // textContent = lineBreakIdentifier + textContent\n // }\n\n let eventType = event.nativeEvent.inputType\n\n if (eventType == \"insertParagraph\") {\n console.log(`Inserted new line at [${start}, ${end}]`)\n\n let split = textContent.split(\"\")\n\n split.splice(start, 0, lineBreakIdentifier)\n if (start == 0 && !content.startsWith(lineBreakIdentifier)) {\n split.splice(start, 0, lineBreakIdentifier)\n start += 1\n end += 1\n }\n\n textContent = split.join(\"\")\n\n // Increase selection by one to accomodate for the new line\n start += 1\n end += 1\n } else {\n let selection = window.getSelection()\n let { anchorNode, focusNode } = selection\n\n let eventData = event.nativeEvent.data\n\n // Handle typing behind lines\n if (\n anchorNode.parentNode == focusNode.parentNode &&\n anchorNode.parentNode.nodeName == \"SPAN\" &&\n selection.anchorOffset <= 1 &&\n selection.focusOffset <= 1 &&\n eventType == \"insertText\"\n ) {\n let lineIndex = getChildIndex(anchorNode.parentNode.parentNode)\n\n let _content = content\n if (content.startsWith(lineBreakIdentifier)) {\n _content = _content.slice(1)\n }\n\n let originalLine: any =\n _content.split(lineBreakIdentifier)[lineIndex]\n\n console.log(_content.split(lineBreakIdentifier))\n\n originalLine = originalLine.split(\"\")\n originalLine.splice(0, 0, eventData)\n originalLine = originalLine.join(\"\")\n\n let lines = _content.split(lineBreakIdentifier)\n\n lines[lineIndex] = originalLine\n\n textContent = lines.join(lineBreakIdentifier)\n\n if (content.startsWith(lineBreakIdentifier)) {\n textContent = lineBreakIdentifier + textContent\n }\n\n start += 1\n end += 1\n }\n }\n\n // if (\n // eventData != null &&\n // start - eventData.length == 0 &&\n // end - eventData.length == 0 &&\n // content.startsWith(lineBreakIdentifier)\n // ) {\n // console.log(\"STOP\")\n // }\n\n // console.log(event.nativeEvent.inputType)\n\n onChange(textContent, start, end)\n }}\n onCopy={() => {\n let [start, end] = getFieldSelection()\n\n let stylings = _text.current.stylings.slice()\n stylings = getStylingsInRange(stylings, start, end)\n\n setText({\n ...text,\n clipboard: stylings,\n })\n }}\n onDrop={(event) => {\n let text = event.dataTransfer.getData(\"text\")\n\n if (text.trim() == \"\") return\n\n setText({\n ..._text.current,\n events: {\n ..._text.current.events,\n drop: { is: true, text: text, drag: getFieldSelection() },\n },\n })\n }}\n ></div>\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n <button\n className=\"my-1 rounded bg-cyan-800 p-2 py-1 text-white\"\n onClick={() => {\n let onSubmit = props.onSubmit || (() => {})\n\n onSubmit(text.content, text.stylings)\n }}\n >\n Submit\n </button>\n </div>\n )\n}\n","// Import React dependencies.\nimport React, { useState, useCallback } from \"react\"\n// Import the Slate editor factory.\nimport { Editor, Transforms, Element, createEditor } from \"slate\"\n// Import the Slate components and React plugin.\nimport { Slate, Editable, withReact } from \"slate-react\"\n// TypeScript users only add this code\nimport { BaseEditor, Descendant } from \"slate\"\nimport { ReactEditor } from \"slate-react\"\n\ntype CustomElement = { type: \"paragraph\"; children: CustomText[] }\ntype CustomText = { text: string }\n\ndeclare module \"slate\" {\n interface CustomTypes {\n Editor: BaseEditor & ReactEditor\n Element: CustomElement\n Text: CustomText\n }\n}\n\nconst initialValue: Descendant[] = [\n {\n type: \"paragraph\",\n children: [{ text: \"\" }],\n },\n]\n\nlet styles = {\n bold: { fontWeight: \"bold\" },\n italic: { fontStyle: \"italic\" },\n underline: { textDecoration: \"underline\" },\n strikethrough: { textDecoration: \"line-through\" },\n}\n\nconst Leaf = (props) => {\n let data = Object.assign({}, props.leaf)\n delete data.text\n\n let keys = Object.entries(data)\n .filter(([key, value]) => value)\n .map(([key, _]) => key)\n\n let types = {}\n\n if (keys.length != 0) {\n keys.map((type) => {\n Object.entries(styles[type]).map(([key, value]) => {\n types[key] = value\n })\n })\n }\n\n return (\n <span {...props.attributes} style={types}>\n {props.children}\n </span>\n )\n}\n\nconst Property = (props) => {\n return (\n <div\n className=\"border-box mr-[5px] flex h-[32px] w-[32px] items-center justify-center rounded bg-gray-400 p-2\"\n onMouseDown={props.onMouseDown}\n >\n {props.name}\n </div>\n )\n}\n\nexport const FloatingCommentSlate = () => {\n const [editor] = useState(() => withReact(createEditor()))\n\n // Define a leaf rendering function that is memoized with `useCallback`.\n const renderLeaf = useCallback((props) => {\n return <Leaf {...props} />\n }, [])\n\n const perform = (event, type) => {\n event.preventDefault() // This does not take focus away from field which allows the function to retrieve the current selection data\n\n let current = Editor.marks(editor)[type] || false\n console.log(Editor.marks(editor))\n // if (!types.includes(type)) types.push(type)\n\n Editor.addMark(editor, type, !current)\n }\n\n return (\n <div className=\"align-center box-border flex h-min w-[400px] flex-col items-center justify-center rounded bg-blue-300 shadow-md\">\n <div className={\"flex w-full flex-row justify-start p-2\"}>\n <Property\n name=\"B\"\n onMouseDown={(event) => {\n perform(event, \"bold\")\n }}\n />\n <Property\n name=\"I\"\n onMouseDown={(event) => {\n perform(event, \"italic\")\n }}\n />\n <Property\n name=\"U\"\n onMouseDown={(event) => {\n perform(event, \"underline\")\n }}\n />\n <Property\n name=\"S\"\n onMouseDown={(event) => {\n perform(event, \"strikethrough\")\n }}\n />\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n <div className=\"w-full\">\n <Slate editor={editor} initialValue={initialValue}>\n <Editable\n renderLeaf={renderLeaf}\n className=\"h-[150px] p-2\"\n onKeyDown={(event) => {\n if (!event.ctrlKey) {\n return\n }\n\n switch (event.key) {\n // When \"B\" is pressed, bold the text in the selection.\n case \"b\": {\n event.preventDefault()\n Editor.addMark(editor, \"bold\", true)\n break\n }\n }\n }}\n />\n </Slate>\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n <button className=\"my-1 rounded bg-cyan-800 p-2 py-1 text-white\">\n Submit\n </button>\n </div>\n )\n}\n","import React from \"react\"\nimport ReactDOMServer from \"react-dom/server\"\n\nlet base64 =\n \"iVBORw0KGgoAAAANSUhEUgAAANUAAABhCAYAAABBG+TgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACEgSURBVHhe7Z0HWFRXFsfPG1SaFKWDgBUsWLH3lthN1cQYY5ItiellN9mYxGQ3m2rcbDYxuiamJ2qqaa4NK/aOFaWIIgqKIE1Rmbf3f+eNvJl5b2DgDWK8v++bj3nDlDdw/++ce+4550pl5ZdlEggEhmFSfgoEAoMQohIIDEaISiAwGCEqgcBghKgEAoMRohIIDEaISiAwGCEqgcBg6p2oZJmowkx0qULmN9wXCK4l6lVGRckFmbIKJcotluliheWxhh5EjT0tP70bSOTbiP1sKJOfp0SeDWSSJMnyRIGgnlBvRFVWTrQqXaYf98qUUyRzi2XFxHTjw8QU6CVRkC9RMLuF+xGF+UsU5idRqK9MIY0laiCcWUE9oF6ICidw8BTRrDVmOsEEVV18G0lMTDJFMnHFNpGoTQhR21CJmniz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kJggg==\"\n\ntype ComponentTypes = {}\nconst Property = (props) => {\n return (\n <div\n className=\"border-box mr-[10px] flex h-[32px] w-fit min-w-[32px] items-center justify-center rounded bg-gray-300 p-2 transition-all hover:opacity-50\"\n onMouseDown={props.onMouseDown}\n >\n {props.name}\n </div>\n )\n}\n\nconst Image = (props) => {\n return (\n <div className=\"group relative w-fit\">\n <img src={`data:image/pngg;charset=utf-8;base64,${base64}`} />\n <div className=\"absolute right-0 top-0 text-red-900 opacity-0 transition-all hover:opacity-50 group-hover:opacity-100\">\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"h-4 w-4\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </div>\n </div>\n )\n}\n\nconst styles = {\n bold: \"B\",\n italic: \"I\",\n underline: \"U\",\n strikeThrough: \"S\",\n subscript: \"SubS\",\n superscript: \"SuperS\",\n removeFormat: \"Plain\",\n}\n\nexport const FloatingCommentExec: React.FC<ComponentTypes> = (props) => {\n return (\n <div className=\"align-center box-border flex h-min w-[400px] flex-col items-center justify-center rounded shadow-md\">\n <div className={\"flex w-full flex-row justify-start p-2\"}>\n {Object.entries(styles).map(([id, acronym]) => {\n return (\n <Property\n name={acronym}\n key={`property-${id}`}\n onMouseDown={(event) => {\n event.preventDefault()\n document.execCommand(id, false, null)\n console.log(`Executing ${id}`)\n // perform(id)\n }}\n />\n )\n })}\n <Property\n name=\"Image\"\n key={`property-insertImage`}\n onMouseDown={(event) => {\n event.preventDefault()\n let html = ReactDOMServer.renderToString(<Image />)\n document.execCommand(\"insertHTML\", false, html)\n\n // const byteCharacters = atob(base64)\n // const byteNumbers = new Array(byteCharacters.length)\n // for (let i = 0; i < byteCharacters.length; i++) {\n // byteNumbers[i] = byteCharacters.charCodeAt(i)\n // }\n // const byteArray = new Uint8Array(byteNumbers)\n // const blob = new Blob([byteArray], { type: \"image/png\" })\n\n // let url = URL.createObjectURL(blob)\n\n // document.execCommand(\"insertImage\", false, url)\n }}\n />\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n\n <div className=\" box-border w-full p-2\">\n <div\n contentEditable=\"true\"\n className=\"rtl h-[150px] w-full resize-none overflow-auto overflow-x-hidden border-none font-['Arial'] text-[16px] outline-none\"\n\n // onKeyDown={(event) => {\n // if (event.key == \"Tab\") {\n // event.preventDefault()\n // document.execCommand(\"indent\", false, null)\n // return\n // }\n // }}\n ></div>\n </div>\n <div className=\"h-[1px] w-full bg-slate-600\"> </div>\n <button\n className=\"my-1 rounded bg-cyan-800 p-2 py-1 text-white\"\n onClick={() => {}}\n >\n Submit\n </button>\n </div>\n )\n}\n","import React, { FC, RefObject, useState, useEffect, useRef } from \"react\"\nimport { clsx } from \"clsx\"\nimport { Button } from \"./Button\"\nimport { cn } from \"../util\"\n\ntype BackToTopTypes = {\n paddingX?: number // Horizontal padding relative to the attached corner\n paddingY?: number // Vertical padding relative to the attached corner\n paddingThreshold?: number // Increase to the threshold of the scroll value that has to be passed for the button to appear\n corner?: \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\"\n anchor: RefObject<HTMLInputElement>\n}\n\nexport const BackToTop: FC<BackToTopTypes> = ({ ...props }) => {\n const [visible, setVisible] = useState<boolean>(false)\n const [rect, _setRect] = useState<DOMRect>(null)\n const _rect = useRef(rect)\n const setRect = (data) => {\n _rect.current = data\n _setRect(data)\n }\n\n const self = useRef(null)\n\n const getCoords = () => {\n let anchor = props.anchor.current\n return [anchor.scrollTop, anchor.scrollLeft]\n }\n\n const onScroll = () => {\n let [scrollTop, scrollLeft] = getCoords()\n\n let rect = props.anchor.current.getBoundingClientRect()\n\n setVisible(scrollTop >= rect.height + (props.paddingThreshold || 100))\n }\n\n const backToTop = () => {\n props.anchor.current.scrollTo({ top: 0, behavior: \"smooth\" })\n }\n\n // FIXME: Observers and listeners run twice\n useEffect(() => {\n if (!props.anchor.current) return\n\n props.anchor.current.addEventListener(\"scroll\", onScroll)\n\n // Listens to rect changes. Alternatives like ResizeObserver & IntersectionObserver fail to detect positional changes consistently\n let interval = setInterval(() => {\n if (!props.anchor.current) return\n\n let newRect = props.anchor.current.getBoundingClientRect()\n if (_rect.current == null) return setRect(newRect)\n\n if (\n !(\n _rect.current.top == newRect.top &&\n _rect.current.left == newRect.left &&\n _rect.current.width == newRect.width &&\n _rect.current.height == newRect.height\n )\n ) {\n setRect(newRect)\n }\n }, 1)\n\n return () => {\n props.anchor.current?.removeEventListener(\"scroll\", onScroll)\n clearInterval(interval)\n }\n }, [])\n\n const getStyles = () => {\n if (!props.anchor.current) return {}\n\n let corner = props.corner || \"bottom-right\"\n let [vertical, horizontal] = corner.split(\"-\")\n\n let anchorRect = props.anchor.current.getBoundingClientRect()\n let selfRect = self.current.getBoundingClientRect()\n\n let width = horizontal == \"right\" ? anchorRect.width - selfRect.width : 0\n let height = vertical == \"bottom\" ? anchorRect.height - selfRect.height : 0\n\n let style = {\n top:\n anchorRect.y +\n height +\n (vertical == \"bottom\" ? -1 : 1) * (props.paddingX || 10),\n left:\n anchorRect.x +\n width +\n (horizontal == \"right\" ? -1 : 1) * (props.paddingX || 25),\n }\n\n return style\n }\n\n return (\n <Button\n className={cn(\n \"fixed cursor-pointer rounded transition-all\",\n visible\n ? \"pointer-events-all opacity-100\"\n : \"pointer-events-none opacity-0\"\n )}\n onClick={backToTop}\n style={{\n ...getStyles(),\n transitionProperty: \"opacity, background-color\",\n }}\n ref={self}\n size=\"icon\"\n >\n <svg\n className={clsx(\n \"h-6 w-6 shrink-0 rotate-180 transition-all disabled:bg-gray-200\"\n )}\n aria-label=\"Arrow Icon\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"></path>\n </svg>\n </Button>\n )\n}\n","import React, { FC } from \"react\"\n\ntype InlineCodeTypes = {\n text: string\n}\n\nexport const HawaInlineCode: FC<InlineCodeTypes> = (props) => {\n return <code className=\"inline-code\">{props.text}</code>\n}\n","import React, { FC } from \"react\"\n\ntype TimelineTypes = {\n title: any\n steps: StepTypes[]\n}\ntype StepTypes = {\n date: string\n title: string\n description?: string\n actions?: any\n}\nexport const Timeline: FC<TimelineTypes> = (props) => {\n return (\n <div>\n <ol className=\"relative border-l border-gray-200 dark:border-gray-700\">\n {props.steps.map((step) => (\n <li className=\"mb-10 ml-4\">\n <div className=\"absolute -left-1.5 mt-1.5 h-3 w-3 rounded-full border border-white bg-gray-200 dark:border-gray-900 dark:bg-gray-700\"></div>\n <time className=\"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500\">\n {step.date}\n </time>\n <h3 className=\"text-lg font-semibold text-gray-900 dark:text-white\">\n {step.title}\n </h3>\n <p className=\"mb-4 text-base font-normal text-gray-500 dark:text-gray-400\">\n {step.description}\n </p>\n {step.actions}\n </li>\n ))}\n </ol>\n </div>\n )\n}\n","import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype PinInputTypes = {\n label?: string\n icon?: JSX.Element\n digits: number\n width?: \"normal\" | \"full\"\n getPins?: any\n}\nexport const HawaPinInput: FC<PinInputTypes> = ({\n label,\n icon,\n digits,\n width = \"normal\",\n getPins,\n ...props\n}) => {\n const [pin, setPin] = useState(Array.from(Array(digits)))\n\n const handleKeyDown = (e, index) => {\n let backTo = 0\n if (e.key === \"Backspace\") {\n e.target.value.length === 0 ? (backTo = index - 1) : (backTo = index)\n const previousInput = document.getElementById(`input-${backTo}`)\n previousInput?.focus()\n }\n }\n useEffect(() => {\n let unfilled = pin.includes(undefined)\n if (!unfilled) {\n getPins(pin)\n }\n })\n const handleChange = (e, index) => {\n if (!/^\\d*$/.test(e.target.value)) {\n const newPin = [...pin]\n newPin[index] = \"\"\n setPin(newPin)\n return\n } else {\n const newPin = [...pin]\n newPin[index] = e.target.value\n setPin(newPin)\n\n if (e.target.value.length === 1) {\n const nextInput = document.getElementById(`input-${index + 1}`)\n nextInput?.focus()\n } else if (e.target.value.length === 0) {\n const previousInput = document.getElementById(`input-${index - 1}`)\n previousInput?.focus()\n }\n }\n }\n\n return (\n <div className=\"flex w-full flex-row justify-center gap-2\">\n {pin.map((value, index) => (\n <input\n key={index}\n type=\"text\"\n maxLength={1}\n value={value}\n id={`input-${index}`}\n pattern=\"[0-9]*\"\n className={clsx(\n \"h-10 rounded border bg-background text-center\",\n width === \"full\" ? \"w-full\" : \"w-10\"\n )}\n onChange={(e) => handleChange(e, index)}\n onKeyDown={(e) => handleKeyDown(e, index)}\n onFocus={(e) => e.target.select()}\n {...props}\n />\n ))}\n </div>\n )\n}\n","import React, { useEffect, useState, FC } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\nimport { DropdownMenu, MenuItemType } from \"./DropdownMenu\"\n\ninterface ItemCardTypes {\n headerActions?: MenuItemType[]\n // headerActions?: THeaderActions[]\n header?: any\n content?: any\n /** a URL for the image of the card */\n cardImage?: string\n /** a function that fires when the card is clicked anywhere */\n onCardClick?: any\n /** a React node with HawaIconCount children to have counters at the bottom of the card */\n counts?: JSX.Element\n /** The action buttons on the bottom right of the card */\n actions?: JSX.Element\n /** The orientation of the card */\n orientation?: \"horizontal\" | \"vertical\"\n /** Enabling this blurs the image on hover and shows an action button */\n clickableImage?: boolean\n /** The function of the action button on the image of the card */\n clickableImageAction?: () => void\n /** The text of the action button on the image of the card */\n clickableImageActionText: string\n /** The icon of the action button on the image of the card */\n clickableImageActionIcon?: any\n}\n\ntype THeaderActions = {\n icon?: JSX.Element\n value?: string\n label: string\n action?: (e: any) => void\n isButton?: boolean\n}\nexport const HawaItemCard: FC<ItemCardTypes> = ({\n actions,\n counts,\n content,\n headerActions,\n clickableImage,\n clickableImageAction,\n clickableImageActionText,\n clickableImageActionIcon,\n header,\n cardImage,\n orientation = \"vertical\",\n ...props\n}) => {\n let defaultStyle =\n \"block rounded border border-gray-200 bg-white shadow-sm hover:shadow-lg transition-all dark:border-gray-700 dark:bg-gray-800 \"\n\n let orientationStyles = {\n vertical: \"max-w-sm\",\n horizontal: \"flex flex-row w-full\",\n }\n let imageStyles = {\n vertical: \"h-auto max-h-56 w-full rounded-t-lg object-cover\",\n horizontal:\n // \"h-auto w-full rounded-l-lg object-cover md:h-auto md:w-48 md:rounded-none md:rounded-l-lg\",\n // \"h-full w-full rounded-l-lg object-cover md:w-48 md:rounded-none md:rounded-l-lg\",\n \"h-full w-48 rounded-l object-cover\",\n }\n let headerActionsButtonStyle =\n \"inline-block rounded p-1 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700\"\n\n const [openActionHeader, setOpenActionHeader] = useState(false)\n\n function handleOpenActionHeader() {\n setOpenActionHeader(!openActionHeader)\n }\n\n useEffect((): any => {\n window.onclick = () => {\n if (openActionHeader) {\n setOpenActionHeader(false)\n }\n }\n return () => (window.onclick = null)\n }, [openActionHeader])\n\n return (\n <div\n className={clsx(defaultStyle, orientationStyles[orientation])}\n {...props}\n >\n {cardImage && (\n <div className=\"group relative overflow-clip\">\n <img\n src={\"https://via.placeholder.com/50\"}\n className={clsx(\n imageStyles[orientation],\n clickableImage\n ? \"overflow-clip transition-all group-hover:blur-lg\"\n : \"\"\n )}\n />\n {clickableImage && (\n <div className=\"absolute left-0 top-0 flex h-full w-full items-center justify-center opacity-0 transition-all group-hover:opacity-100 \">\n <Button\n // startIcon={clickableImageActionIcon}\n variant=\"secondary\"\n onClick={clickableImageAction}\n className=\"flex flex-row gap-2\"\n >\n {clickableImageActionIcon}\n {clickableImageActionText}\n </Button>\n </div>\n )}\n </div>\n )}\n <div className=\"relative w-full p-6\">\n {headerActions && (\n <div className=\"max-h- bg-red absolute right-0 top-0 flex justify-end pr-3 pt-3\">\n <DropdownMenu\n items={headerActions}\n trigger={\n <div\n className={clsx(headerActionsButtonStyle)}\n onClick={handleOpenActionHeader}\n >\n <span className=\"sr-only\">Open dropdown</span>\n <svg\n className=\"h-6 w-6\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path d=\"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z\"></path>\n </svg>\n </div>\n }\n />\n </div>\n )}\n\n {header && (\n <h5 className=\"mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white\">\n {header}\n </h5>\n )}\n {content && (\n <span className=\"w-full font-normal text-gray-700 dark:text-gray-400\">\n {content}\n </span>\n )}\n {actions || counts ? (\n <div\n className={clsx(\n \"mt-3 flex items-center rounded-b-lg dark:text-white \",\n actions && counts ? \"justify-between\" : \"justify-end\"\n )}\n >\n {counts}\n {actions}\n </div>\n ) : null}\n </div>\n </div>\n )\n}\n","import clsx from \"clsx\"\nimport React, { FC } from \"react\"\nimport { Button } from \"./Button\"\n\n// TODO: if feature.excluded is false, show gray and x\n// TODO: add badge to feature if soon\n// TODO: add a discount element\n\ntype PricingCardTypes = {\n direction?: \"rtl\" | \"ltr\"\n features: [{ included: boolean; text: string }]\n price: number\n texts: {\n title: string\n subtitle: string\n buttonText: string\n cycleText: string\n currencyText: string\n }\n onPlanClicked?: () => void\n currentPlan?: boolean\n size: \"small\" | \"medium\" | \"large\"\n}\n\nexport const HawaPricingCard: FC<PricingCardTypes> = ({\n size = \"medium\",\n direction = \"ltr\",\n currentPlan = false,\n ...props\n}) => {\n let isArabic = direction === \"rtl\"\n let cardSizes = {\n small:\n \"mx-1 w-full max-w-sm rounded border dark:border-gray-700 bg-background \",\n medium:\n \"mx-1 w-full rounded min-w-fit border dark:border-gray-700 bg-background \",\n large:\n \"mx-1 w-full max-w-lg rounded border dark:border-gray-700 bg-background \",\n }\n return (\n <div\n dir={isArabic ? \"rtl\" : \"ltr\"}\n className={clsx(\n currentPlan ? \"border-primary\" : \"bg-background\",\n cardSizes[size],\n \"flex flex-col gap-4 rounded border-2 p-4\"\n )}\n >\n <h5 className=\"text-md 0 font-bold text-primary/70\">\n {props.texts.title}\n </h5>\n <div className=\" text-primary/ flex items-baseline\">\n <>\n <span className=\"text-5xl font-extrabold tracking-tight\">\n {props.price}\n </span>\n <span className=\"mx-1 text-sm font-semibold\">\n {props.texts.currencyText}\n </span>\n </>\n <span className=\"ml-1 text-xl font-normal text-primary/70\">\n / {props.texts.cycleText}\n </span>\n </div>\n <h5 className=\"text-md font-normal text-primary/70\">\n {props.texts.subtitle}\n </h5>\n\n {props.features && (\n <ul role=\"list\" className=\"space-y-0 \">\n {props.features?.map((feature, o) => {\n return (\n <li key={o} className=\"flex \">\n <svg\n aria-label=\"Check Icon\"\n aria-hidden=\"true\"\n className=\"m-2 h-5 w-5 flex-shrink-0 text-primary\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"flex items-center text-center font-normal leading-tight text-primary/70 \">\n {feature.text}\n </span>\n </li>\n )\n })}\n </ul>\n )}\n <Button\n onClick={props.onPlanClicked}\n disabled={currentPlan}\n className=\"w-full\"\n >\n {props.texts.buttonText}\n </Button>\n </div>\n )\n}\n","import clsx from \"clsx\"\nimport React, { FC, useState, useEffect, useRef } from \"react\"\n\ntype AdCardTypes = {\n orientation: \"vertical\" | \"horizontal\"\n title: string\n description: string\n imageURL: string\n handleHide?: any\n handleCantHide?: () => void\n canHide: boolean\n}\nexport const HawaAdCard: FC<AdCardTypes> = ({ orientation, ...props }) => {\n const adRef = useRef(null)\n const [closed, setClosed] = useState(false)\n\n let duration = 0\n\n useEffect(() => {\n if (duration) {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n setClosed(true)\n }, duration)\n //To destroy the component after hiding it\n const timeoutDestroy = setTimeout(() => {\n setClosed(true)\n adRef.current.removeChild(adRef.current.children[0])\n }, duration + 1000)\n\n return () => {\n clearTimeout(timeoutHide)\n clearTimeout(timeoutDestroy)\n }\n }\n }, [duration])\n\n let cardStyles = {\n horizontal:\n \"flex flex-row max-w-xl rounded border-gray-200 bg-gray-100 shadow-md p-2 gap-2 items-center relative dark:border-gray-700 dark:bg-gray-800 \",\n vertical:\n \"flex flex-col max-w-[200px] justify-start rounded border-gray-200 bg-gray-100 gap-2 shadow-md p-2 relative dark:border-gray-700 dark:bg-gray-800 \",\n }\n\n let imageStyles = {\n horizontal: \"w-auto h-full bg-blue-500 rounded-inner\",\n vertical: \"bg-blue-500 rounded-inner w-auto \",\n }\n\n return (\n <div ref={adRef}>\n <div\n className={clsx(cardStyles[orientation], \"dark:text-white\")}\n {...props}\n >\n <div className=\"flex aspect-square w-full max-w-fit items-start \">\n <img\n src={\n props.imageURL ? props.imageURL : \"https://via.placeholder.com/50\"\n }\n className={imageStyles[orientation]}\n />\n </div>\n <div className=\"w-full text-xs\">\n <div className=\"font-bold\">{props.title}</div>\n <div className=\"text-[12px]\">{props.description}</div>\n </div>\n <span\n // onClick={props.handleHide}\n onClick={() => {\n if (props.canHide) {\n setClosed(true)\n setTimeout(() => {\n adRef.current.removeChild(adRef.current.children[0])\n }, 200)\n } else {\n props.handleCantHide()\n }\n }}\n className=\"absolute right-0 top-0 h-fit cursor-pointer select-none rounded-bl-lg rounded-tr-lg bg-blue-100 px-2.5 py-0.5 text-[10px] font-semibold text-blue-800 dark:bg-blue-200 dark:text-blue-800\"\n >\n Hide\n </span>\n </div>\n </div>\n )\n}\n","import clsx from \"clsx\"\nimport React, { FC } from \"react\"\n\ntype LandingCardTypes = {\n orientation: \"vertical\" | \"horizontal\"\n title: string\n description: string\n imageURL: string\n handleHide: any\n texts?: {\n titleTip?: string\n title?: string\n description?: string\n linkText?: string\n }\n buttonLink?: string\n className?: any\n}\nexport const HawaLandingCard: FC<LandingCardTypes> = ({\n orientation = \"horizontal\",\n ...props\n}) => {\n let cardStyles = {\n horizontal:\n \"flex max-w-xl rounded border-gray-200 bg-gray-100 shadow-md dark:border-gray-700 dark:bg-gray-800 \",\n vertical:\n \"flex max-w-xs rounded border-gray-200 bg-gray-100 shadow-md dark:border-gray-700 dark:bg-gray-800 \",\n }\n\n let imageStyles = {\n horizontal: \"w-8 h-8 rounded\",\n vertical: \"w-14 h-14 rounded\",\n }\n\n return (\n <div\n className={clsx(\n cardStyles[orientation],\n \"flex flex-col p-10\",\n \"relative overflow-hidden dark:text-white\",\n props.className\n )}\n {...props}\n >\n {props.texts?.titleTip && (\n <div className=\"text-sm text-red-600\">{props.texts?.titleTip}</div>\n )}\n {props.imageURL && (\n <img\n className=\"absolute -bottom-10 -right-10 h-40 w-auto \"\n src={props.imageURL}\n />\n )}\n\n {props.texts?.title && (\n <div className=\"mt-2 text-lg font-medium\">{props.texts?.title} </div>\n )}\n {props.texts?.description && (\n <div className=\"z-10 mt-4 text-sm\">{props.texts?.description}</div>\n )}\n {props.texts?.linkText && (\n <div className=\"z-10 mt-6 text-sm underline underline-offset-8\">\n {props.texts?.linkText}\n </div>\n )}\n </div>\n )\n}\n","import React, { FC, ButtonHTMLAttributes, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { HawaLoading } from \"./HawaLoading\"\n\ninterface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: \"contained\" | \"outlined\"\n feedback?: string\n tooltipDirection?: \"rtl\" | \"ltr\"\n color?: \"default\" | \"primary\" | \"secondary\" | \"light\" | \"dark\"\n width?: \"full\" | \"normal\" | \"half\"\n size?: \"xs\" | \"small\" | \"medium\" | \"large\" | \"noPadding\" | \"full\" | \"icon\"\n margins?: \"none\" | \"1\" | \"2\" | \"3\" | \"4\"\n tooltip?: string\n tooltipSize?: \"normal\" | \"small\" | \"large\"\n tooltipPosition?:\n | \"left-top\"\n | \"left-bottom\"\n | \"right-top\"\n | \"right-bottom\"\n | \"top-right\"\n | \"top-left\"\n | \"bottom-right\"\n | \"bottom-left\"\n startIcon?: any\n endIcon?: any\n isLoading?: boolean\n badge?: any\n edgeCorner?: any\n disabled?: boolean\n}\n\nconst disabledSyles = \"cursor-default pointer-events-none\"\nconst disabledVariantSyles = {\n contained: \"text-gray-300 bg-gray-100\",\n outlined: \"text-gray-300 border-gray-300\",\n}\nconst baseStyles =\n \"cursor-pointer justify-center items-center text-center font-medium transition-all \"\nconst sizeStyles = {\n icon: \"h-10 w-10\",\n xs: \"px-1.5 py-2 text-[9px] h-fit\",\n small: \"text-xs px-2.5 py-1.5\",\n medium: \"text-sm leading-4 px-3 py-2\",\n default: \"h-10 px-4 py-2\",\n large: \"text-sm px-4 py-2\",\n noPadding: \"p-0\",\n full: \"h-full max-h-full p-2\",\n}\nconst widthStyles = {\n full: \"w-full flex justify-center px-5 py-2.5 text-center inline-flex items-center\",\n half: \"w-full text-center flex items-center justify-center h-full\",\n normal:\n \"w-fit dark:bg-buttonPrimary-dark dark:hover:bg-buttonPrimary-700 dark:hover:brightness-90 dark:focus:ring-buttonPrimary-500\",\n}\nconst containerWidthStyles = {\n full: \"w-full flex justify-center text-center inline-flex items-center\",\n half: \"w-1/2\",\n normal: \"w-fit\",\n}\nconst variantStyles = {\n contained: \"border-transparent\",\n // outlined: \"bg-transparent border\",\n outlined:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n}\nconst colorStyles = {\n contained: {\n default:\n \"text-neutral-900 bg-buttonPrimary-500 hover:bg-buttonPrimary-700 bg-buttonPrimary-500 text-white\",\n primary:\n \"text-white bg-buttonPrimary-500 hover:bg-buttonPrimary-700 transition-all\",\n secondary:\n \"bg-buttonSecondary-500 hover:text-white hover:bg-buttonSecondary-700\",\n gray: \"text-neutral-900 bg-gray-200 hover:bg-gray-300\",\n dark: \"text-neutral-900 bg-gray-200 hover:bg-gray-300\",\n },\n outlined: {\n default:\n \"text-gray-600 border-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800 dark:text-white\",\n primary: \"text-black hover:bg-gray-50 dark:text-white\",\n secondary:\n \" dark:text-white text-secondary-800 border-secondary-800 hover:bg-buttonSecondary-700 hover:text-white\",\n gray: \"border-gray-300 hover:bg-gray-200\",\n dark: \"border-gray-900 hover:bg-gray-700\",\n },\n}\n\nexport const HawaButton: FC<ButtonProps> = ({\n className,\n variant = \"contained\",\n color = \"default\",\n size = \"default\",\n width = \"normal\",\n disabled = false,\n isLoading = false,\n tooltip,\n tooltipSize = \"normal\",\n tooltipPosition = \"top-left\",\n tooltipDirection = \"ltr\",\n margins = \"2\",\n children,\n badge,\n edgeCorner = false,\n feedback,\n ...props\n}) => {\n const [isClicked, setIsClicked] = useState(false)\n const [buttonText, setButtonText] = useState(children)\n\n const handleClick = (event) => {\n if (props.onClick) {\n props.onClick(event)\n }\n if (feedback && !isClicked) {\n setButtonText(feedback)\n setIsClicked(true)\n setTimeout(() => {\n setButtonText(children)\n setIsClicked(false)\n }, 2000)\n }\n }\n\n return (\n <div\n className={clsx(\n \"relative\",\n margins !== \"none\" ? `my-${margins}` : \"m-0\",\n containerWidthStyles[width]\n )}\n >\n <button\n className={\n disabled\n ? clsx(\n className,\n baseStyles,\n edgeCorner ? \"rounded-inner\" : \"rounded\",\n\n variantStyles[variant],\n sizeStyles[size],\n widthStyles[width],\n disabledSyles,\n disabledVariantSyles[variant]\n )\n : clsx(\n className,\n \"overflow-x-clip\",\n baseStyles,\n edgeCorner ? \"rounded-inner\" : \"rounded\",\n variantStyles[variant],\n sizeStyles[size],\n colorStyles[variant][color],\n widthStyles[width]\n )\n }\n disabled={disabled}\n // onClick={props.onClick}\n onClick={handleClick}\n >\n {!isLoading ? (\n <div\n className={clsx(\n \" s flex flex-col-reverse items-start justify-center gap-4 transition-all\",\n isClicked && feedback\n ? \" -translate-y-8 pb-1 pt-1\"\n : \"translate-y-0\"\n )}\n >\n {isClicked && feedback ? (\n <div className=\"w-full text-center\">{buttonText}</div>\n ) : null}\n <div className=\"flex w-full select-none flex-row items-center justify-center gap-2 whitespace-nowrap\">\n {props.startIcon && props.startIcon}\n {children}\n {props.endIcon && props.endIcon}\n </div>\n </div>\n ) : (\n <HawaLoading design=\"dots-pulse\" color={\"bg-white\"} size=\"button\" />\n )}\n </button>\n\n {badge && (\n <div\n className={clsx(\n typeof badge === \"boolean\"\n ? \"h-5 w-5\"\n : typeof badge === \"string\"\n ? \"h-5 w-7\"\n : \"h-6 w-6\",\n \"absolute -right-2 -top-2 inline-flex select-none items-center justify-center rounded-full border-2 border-white bg-red-500 text-[9px] font-bold text-white dark:border-gray-900\"\n )}\n >\n {typeof badge === \"number\" && badge > 100 ? \"+99\" : badge}\n </div>\n )}\n </div>\n )\n}\n","import React, { FC } from \"react\"\n\ntype StoreButtonsTypes = {\n store: \"apple\" | \"google\"\n mode: \"dark\" | \"light\"\n}\nexport const HawaStoreButtons: FC<StoreButtonsTypes> = (props) => {\n return (\n <div className=\"flex justify-center\">\n <div>\n {/* <!-- https://developer.apple.com/app-store/marketing/guidelines/#section-badges --> */}\n {props.store === \"apple\" ? (\n props.mode === \"dark\" ? (\n <div className=\"mt-3 flex h-14 w-48 items-center justify-center rounded-lg bg-black text-white\">\n <div className=\"mr-3\">\n <svg viewBox=\"0 0 384 512\" width=\"30\">\n <path\n fill=\"currentColor\"\n d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">Download on the</div>\n <div className=\"font-sans -mt-1 text-2xl font-semibold\">\n App Store\n </div>\n </div>\n </div>\n ) : (\n <div className=\"mt-3 flex h-14 w-48 items-center justify-center rounded-lg border border-black bg-transparent text-black\">\n <div className=\"mr-3\">\n <svg viewBox=\"0 0 384 512\" width=\"30\">\n <path\n fill=\"currentColor\"\n d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">Download on the</div>\n <div className=\"font-sans -mt-1 text-2xl font-semibold\">\n App Store\n </div>\n </div>\n </div>\n )\n ) : props.mode === \"dark\" ? (\n <div className=\"mt-3 flex h-14 w-48 items-center justify-center rounded-lg bg-black text-white\">\n <div className=\"mr-3\">\n <svg viewBox=\"30 336.7 120.9 129.2\" width=\"30\">\n <path\n fill=\"#FFD400\"\n d=\"M119.2,421.2c15.3-8.4,27-14.8,28-15.3c3.2-1.7,6.5-6.2,0-9.7 c-2.1-1.1-13.4-7.3-28-15.3l-20.1,20.2L119.2,421.2z\"\n />\n <path\n fill=\"#FF3333\"\n d=\"M99.1,401.1l-64.2,64.7c1.5,0.2,3.2-0.2,5.2-1.3 c4.2-2.3,48.8-26.7,79.1-43.3L99.1,401.1L99.1,401.1z\"\n />\n <path\n fill=\"#48FF48\"\n d=\"M99.1,401.1l20.1-20.2c0,0-74.6-40.7-79.1-43.1 c-1.7-1-3.6-1.3-5.3-1L99.1,401.1z\"\n />\n <path\n fill=\"#3BCCFF\"\n d=\"M99.1,401.1l-64.3-64.3c-2.6,0.6-4.8,2.9-4.8,7.6 c0,7.5,0,107.5,0,113.8c0,4.3,1.7,7.4,4.9,7.7L99.1,401.1z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">GET IT ON</div>\n <div className=\"font-sans -mt-1 text-xl font-semibold\">\n Google Play\n </div>\n </div>\n </div>\n ) : (\n <div className=\"mt-3 flex h-14 w-48 items-center justify-center rounded-lg border border-black bg-white text-black\">\n <div className=\"mr-3\">\n <svg viewBox=\"30 336.7 120.9 129.2\" width=\"30\">\n <path\n fill=\"#FFD400\"\n d=\"M119.2,421.2c15.3-8.4,27-14.8,28-15.3c3.2-1.7,6.5-6.2,0-9.7 c-2.1-1.1-13.4-7.3-28-15.3l-20.1,20.2L119.2,421.2z\"\n />\n <path\n fill=\"#FF3333\"\n d=\"M99.1,401.1l-64.2,64.7c1.5,0.2,3.2-0.2,5.2-1.3 c4.2-2.3,48.8-26.7,79.1-43.3L99.1,401.1L99.1,401.1z\"\n />\n <path\n fill=\"#48FF48\"\n d=\"M99.1,401.1l20.1-20.2c0,0-74.6-40.7-79.1-43.1 c-1.7-1-3.6-1.3-5.3-1L99.1,401.1z\"\n />\n <path\n fill=\"#3BCCFF\"\n d=\"M99.1,401.1l-64.3-64.3c-2.6,0.6-4.8,2.9-4.8,7.6 c0,7.5,0,107.5,0,113.8c0,4.3,1.7,7.4,4.9,7.7L99.1,401.1z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">GET IT ON</div>\n <div className=\"font-sans -mt-1 text-xl font-semibold\">\n Google Play\n </div>\n </div>\n </div>\n )}\n\n {/* <div className=\"mt-3 flex h-14 w-60 items-center justify-center rounded-xl bg-black text-white\">\n <div className=\"mr-3\">\n <svg viewBox=\"0 0 384 512\" width=\"30\">\n <path\n fill=\"currentColor\"\n d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\"\n />\n </svg>\n </div>\n <div>\n <div className=\"text-xs\">Download on the</div>\n <div className=\"font-sans -mt-1 text-2xl font-semibold\">\n Mac App Store\n </div>\n </div>\n </div> */}\n\n {/* <!-- https://play.google.com/intl/en_us/badges/ --> */}\n </div>\n </div>\n )\n}\n","import React, { FC, useState } from \"react\"\n\ntype ImageCardTypes = {\n children: any\n align?: any\n bottomElement?: any\n inCardActions?: any\n cardImage?: string\n title?: string\n subtitle?: string\n blank?: boolean\n}\nexport const ActionCard: FC<ImageCardTypes> = (props) => {\n const [hovered, setHovered] = useState(false)\n\n return (\n <div className=\"flex h-full w-full flex-col gap-1 \">\n <div\n className=\"group relative h-full w-full rounded border bg-background bg-cover bg-center transition-all duration-500 hover:drop-shadow-2xl\"\n style={{\n backgroundImage: `url(${props.blank ? \"\" : props.cardImage})`,\n }}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n >\n {props.blank ? (\n <div className=\"flex h-full flex-col items-center justify-center \">\n <svg\n className=\"h-10 w-10 text-foreground\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n stroke-width=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z\"></path>\n </svg>\n </div>\n ) : (\n <div className=\"absolute inset-0 rounded bg-black opacity-50\"></div>\n )}\n <div className=\"absolute bottom-2 right-2 z-10 opacity-0 transition-all duration-200 group-hover:opacity-100\">\n {props.inCardActions}\n </div>\n {!props.blank && (\n <div className=\"relative p-4\">\n <h1 className=\"text-white\">{props.title}</h1>\n <p className=\"text-white\">{props.subtitle}</p>\n </div>\n )}\n </div>\n <div\n className={`flex flex-row justify-between text-sm transition-all duration-200 ${\n hovered ? \"opacity-100\" : \"opacity-0\"\n }`}\n >\n {props.bottomElement}\n </div>\n </div>\n )\n}\n","import React from \"react\"\n\ninterface Feature {\n icon: React.ReactNode\n title: string\n description: string\n}\n\ntype StickyFeaturesType = {\n features?: Feature[]\n tag?: string\n title?: string\n description?: string\n}\n\nexport const StickyFeatures: React.FC<StickyFeaturesType> = (props) => {\n return (\n <div className=\"bg-white py-24 sm:py-32\">\n\n <div className=\"mx-auto flex max-w-5xl flex-col items-start gap-10 px-6 md:flex-row lg:px-8\">\n <div className=\"w-full md:sticky md:top-10 md:w-[28rem]\">\n <h2 className=\"text-lg font-semibold leading-8 tracking-tight text-indigo-600\">\n {props.tag}\n </h2>\n <p className=\"mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl\">\n {props.title}\n </p>\n <p className=\"mb-2 mt-6 text-base leading-7 text-gray-600\">\n {props.description}\n </p>\n </div>\n <div className=\"mt-5 w-full min-w-0 flex-1 md:mt-0\">\n <dl className=\"grid grid-cols-1 gap-x-8 gap-y-10 md:max-w-xl lg:max-w-none lg:gap-y-16\">\n {props.features.map((f) => (\n <div className=\"relative rounded-lg bg-gray-50 p-10\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-lg bg-indigo-600\">\n {f.icon}\n </div>\n\n <dt className=\"mt-4 text-lg font-semibold leading-7 text-gray-900\">\n {f.title}\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-600\">\n {f.description}\n </dd>\n </div>\n ))}\n </dl>\n </div>\n </div>\n </div>\n )\n}\n","import React, { FC, useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"./Button\"\nimport { HawaRadio } from \"./HawaRadio\"\nimport { Card, CardContent } from \"./Card\"\nimport { Textarea } from \"./Textarea\"\n\ntype ComponentTypes = {\n title?: string\n question: string\n options?: []\n texts?: {\n least: string\n most: string\n }\n position?: \"bottom-right\" | \"bottom-left\"\n onOptionClicked?: (option) => void\n}\nexport const UserReferralSource: FC<ComponentTypes> = ({\n position = \"bottom-right\",\n ...props\n}) => {\n const [closed, setClosed] = useState(false)\n const [answered, setAnswered] = useState(false)\n const [clickedOption, setClickedOption] = useState(null)\n const [closingTimer, setClosingTimer] = useState(5)\n const popUpRef = useRef(null)\n\n const boxPosition = {\n \"bottom-right\": \"right-4\",\n \"bottom-left\": \"left-4\",\n }\n useEffect(() => {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n if (closingTimer >= 0) {\n setClosingTimer(closingTimer - 1)\n }\n }, 1000)\n\n return () => {\n clearTimeout(timeoutHide)\n }\n }, [closingTimer])\n\n const slowClose = () => {\n setClosed(true)\n setTimeout(() => {\n popUpRef.current.removeChild(popUpRef.current.children[0])\n }, 200)\n }\n return (\n <Card\n ref={popUpRef}\n className={clsx(\"fixed bottom-4 p-4 \", boxPosition[position])}\n >\n <button\n type=\"button\"\n className=\"absolute right-2 top-2 inline-flex h-8 w-8 rounded p-1.5 text-gray-400 transition-all hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white\"\n data-dismiss-target=\"#toast-default\"\n aria-label=\"Close\"\n onClick={() => slowClose()}\n >\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n <CardContent headless>\n <div\n className={clsx(\n \"flex flex-col gap-4\", // \"relative flex w-full max-w-sm flex-col gap-2 rounded border bg-background p-4 shadow-md transition-all\",\n closed ? \"opacity-0\" : \"opacity-100\"\n )}\n >\n <div className=\"mt-4 font-bold\">{props.question}</div>\n <div className=\"flex w-full flex-row gap-1 rounded \">\n <HawaRadio\n orientation=\"vertical\"\n options={props.options}\n ></HawaRadio>\n </div>\n <div>\n <Textarea />\n </div>\n </div>\n <Button className=\"mt-4 w-full\">Submit</Button>\n </CardContent>\n </Card>\n )\n}\n","import * as React from \"react\"\nimport { cn } from \"../util\"\nimport { Label } from \"./Label\"\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n label?: string\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, label, ...props }, ref) => {\n return (\n <>\n {label && <Label htmlFor={props.id}>{label}</Label>}\n <textarea\n className={cn(\n \"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n </>\n )\n }\n)\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n","import React from \"react\"\n\ntype IconProps = React.HTMLAttributes<SVGElement>\n\nexport const Icons = {\n logo: (props: IconProps) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\" {...props}>\n <rect width=\"256\" height=\"256\" fill=\"none\" />\n <line\n x1=\"208\"\n y1=\"128\"\n x2=\"128\"\n y2=\"208\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"16\"\n />\n <line\n x1=\"192\"\n y1=\"40\"\n x2=\"40\"\n y2=\"192\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"16\"\n />\n </svg>\n ),\n mail: (props: IconProps) => (\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"></path>\n <polyline points=\"22,6 12,13 2,6\"></polyline>\n </svg>\n ),\n phone: (props: IconProps) => (\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3\"\n ></path>\n </svg>\n ),\n twitter: (props: IconProps) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M21.543 7.104c.015.211.015.423.015.636 0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041 4.93 4.93 0 0 1-4.6-3.42 4.916 4.916 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.887 4.887 0 0 0 2.235.616A4.928 4.928 0 0 1 1.67 3.148a13.98 13.98 0 0 0 10.15 5.144 4.929 4.929 0 0 1 8.39-4.49 9.868 9.868 0 0 0 3.128-1.196 4.941 4.941 0 0 1-2.165 2.724A9.828 9.828 0 0 0 24 4.555a10.019 10.019 0 0 1-2.457 2.549z\"\n />\n </svg>\n ),\n microsoft: (props: IconProps) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M7.462 0H0v7.19h7.462V0zM16 0H8.538v7.19H16V0zM7.462 8.211H0V16h7.462V8.211zm8.538 0H8.538V16H16V8.211z\"\n ></path>\n </svg>\n ),\n gitHub: (props: IconProps) => (\n <svg viewBox=\"0 0 438.549 438.549\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z\"\n ></path>\n </svg>\n ),\n radix: (props: IconProps) => (\n <svg viewBox=\"0 0 25 25\" fill=\"none\" {...props}>\n <path\n d=\"M12 25C7.58173 25 4 21.4183 4 17C4 12.5817 7.58173 9 12 9V25Z\"\n fill=\"currentcolor\"\n ></path>\n <path d=\"M12 0H4V8H12V0Z\" fill=\"currentcolor\"></path>\n <path\n d=\"M17 8C19.2091 8 21 6.20914 21 4C21 1.79086 19.2091 0 17 0C14.7909 0 13 1.79086 13 4C13 6.20914 14.7909 8 17 8Z\"\n fill=\"currentcolor\"\n ></path>\n </svg>\n ),\n aria: (props: IconProps) => (\n <svg role=\"img\" viewBox=\"0 0 24 24\" fill=\"currentColor\" {...props}>\n <path d=\"M13.966 22.624l-1.69-4.281H8.122l3.892-9.144 5.662 13.425zM8.884 1.376H0v21.248zm15.116 0h-8.884L24 22.624Z\" />\n </svg>\n ),\n npm: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n yarn: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n pnpm: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n react: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n tailwind: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M12.001,4.8c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 C13.666,10.618,15.027,12,18.001,12c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C16.337,6.182,14.976,4.8,12.001,4.8z M6.001,12c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 c1.177,1.194,2.538,2.576,5.512,2.576c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C10.337,13.382,8.976,12,6.001,12z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n google: (props: IconProps) => (\n <svg role=\"img\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z\"\n />\n </svg>\n ),\n apple: (props: IconProps) => (\n <svg role=\"img\" viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n paypal: (props: IconProps) => (\n <svg role=\"img\" viewBox=\"0 0 24 24\" {...props}>\n <path\n d=\"M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n spinner: (props: IconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...props}\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n ),\n}\n","import React from \"react\"\nimport useCarousel from \"../hooks/useCarousel\"\n\ninterface CarouselProps {\n images: string[]\n}\n\nexport const Carousel: React.FC<CarouselProps> = ({ images }) => {\n const imageWidth = 1000 + 16 // Adjust according to your image width\n const {\n containerRef,\n handleMouseDown,\n handleMouseLeave,\n handleMouseUp,\n handleMouseMove,\n } = useCarousel(imageWidth)\n\n return (\n <div\n className=\"flex cursor-pointer snap-x items-center justify-center gap-4 overflow-x-hidden\"\n onMouseDown={handleMouseDown}\n onMouseLeave={handleMouseLeave}\n onMouseUp={handleMouseUp}\n onMouseMove={handleMouseMove}\n ref={containerRef}\n >\n {images.map((image, index) => (\n <div key={index} className=\"h-96 w-[1000px] flex-shrink-0\">\n {/* <div key={index} className=\"h-40 w-60 flex-shrink-0\"> */}\n <img\n src={image}\n alt={`Carousel Image ${index}`}\n width={imageWidth}\n className=\"h-full w-full rounded-lg object-cover\"\n />\n </div>\n ))}\n </div>\n )\n}\n","import { useState, useRef } from 'react';\n\nconst useCarousel = (imageWidth: number) => {\n const [isDragging, setIsDragging] = useState(false);\n const [startDragX, setStartDragX] = useState(0);\n const [scrollLeft, setScrollLeft] = useState(0);\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n const findClosestSnapPoint = (scrollLeft: number): number => {\n return Math.round(scrollLeft / imageWidth) * imageWidth;\n };\n\n const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {\n setIsDragging(true);\n setStartDragX(e.pageX - containerRef.current!.offsetLeft);\n setScrollLeft(containerRef.current!.scrollLeft);\n };\n\n const handleMouseLeave = () => {\n if (isDragging) {\n handleDragEnd();\n }\n };\n\n const handleMouseUp = () => {\n if (isDragging) {\n handleDragEnd();\n }\n };\n\n const handleDragEnd = () => {\n setIsDragging(false);\n const closestSnapPoint = findClosestSnapPoint(containerRef.current!.scrollLeft);\n containerRef.current!.scrollTo({\n left: closestSnapPoint,\n behavior: 'smooth',\n });\n };\n\n const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isDragging) return;\n e.preventDefault();\n const x = e.pageX - containerRef.current!.offsetLeft;\n const walk = x - startDragX;\n containerRef.current!.scrollLeft = scrollLeft - walk;\n };\n\n return {\n containerRef,\n handleMouseDown,\n handleMouseLeave,\n handleMouseUp,\n handleMouseMove,\n };\n};\n\nexport default useCarousel;\n","import * as React from \"react\"\nimport { cn } from \"../util\"\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n preview?: boolean\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, preview, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n preview &&\n \" disabled:cursor-default disabled:opacity-100 border-opacity-25 \"\n )}\n disabled={preview}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import React, { FC, useState } from \"react\"\nimport { HawaRadio } from \"./HawaRadio\"\nimport { cn } from \"../util\"\n\ntype TypographyTypes = {\n handleLanguage: (e) => void\n currentLanguage: any\n handleColorMode: (e) => void\n currentColorMode: any\n orientation?: \"vertical\" | \"horizontal\"\n width?: \"default\" | \"full\"\n}\nexport const InterfaceSettings: FC<TypographyTypes> = ({\n orientation = \"horizontal\",\n width = \"default\",\n ...props\n}) => {\n const [color, setColor] = useState(props.currentColorMode)\n const [language, setLanguage] = useState(props.currentLanguage)\n let orientationStyle = {\n horizontal: \"flex flex-row justify-between\",\n vertical: \"flex flex-col items-center gap-2\",\n }\n return (\n <div className={cn(orientationStyle[orientation])}>\n <HawaRadio\n width={width}\n defaultValue={language}\n onChangeTab={(e) => {\n props.handleLanguage(e)\n setLanguage(e)\n }}\n design=\"tabs\"\n options={[\n { value: \"ar\", label: \"عربي\" },\n { value: \"en\", label: \"English\" },\n ]}\n />\n <HawaRadio\n width={width}\n defaultValue={color}\n onChangeTab={(e) => {\n props.handleColorMode(e)\n setColor(e)\n }}\n design=\"tabs\"\n options={[\n {\n value: \"light\",\n label: (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90\"\n >\n <path\n d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n fill=\"currentColor\"\n ></path>\n </svg>\n ),\n },\n {\n value: \"dark\",\n label: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n className=\"h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100\"\n >\n <path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"></path>\n </svg>\n ),\n },\n ]}\n />\n </div>\n )\n}\n","import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\nimport { cn } from \"../util\"\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 rounded border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:shadow-dark\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\ninterface PopoverProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n trigger: React.ReactNode\n children: React.ReactNode\n className?: string\n sideOffset?: number\n}\n\nconst Popover: React.FC<PopoverProps> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n}) => (\n <PopoverPrimitive.Root>\n <PopoverPrimitive.Trigger>{trigger}</PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n)\n\nexport { Popover }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\nimport { cn } from \"../util\"\n\nconst TabsContext = React.createContext<{\n orientation?: \"vertical\" | \"horizontal\"\n}>({ orientation: \"vertical\" })\n\ntype TabsRootProps = React.ComponentPropsWithoutRef<\n typeof TabsPrimitive.Root\n> & { orientation?: \"vertical\" | \"horizontal\" }\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n TabsRootProps\n>(({ className, orientation, ...props }, ref) => (\n <TabsPrimitive.Root\n ref={ref}\n className={cn(\n \"flex gap-2\",\n orientation === \"horizontal\" ? \"flex-row\" : \"flex-col\",\n className\n )}\n {...props}\n >\n <TabsContext.Provider value={{ orientation }}>\n {props.children}\n </TabsContext.Provider>\n </TabsPrimitive.Root>\n))\nTabs.displayName = TabsPrimitive.Root.displayName\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const { orientation } = React.useContext(TabsContext)\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"flex w-fit flex-wrap items-center justify-start gap-1 rounded border bg-muted p-1 text-muted-foreground dark:border-primary/10 \",\n orientation === \"horizontal\" ? \"flex-col\" : \"flex-row\",\n className\n )}\n {...props}\n />\n )\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex w-full flex-1 select-none items-center justify-center whitespace-nowrap rounded border px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm dark:border-primary/10\",\n className\n )}\n {...props}\n />\n )\n})\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"w-full ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n","import * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\nimport { cn } from \"../util\"\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n )\n)\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n","import * as React from \"react\"\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../util\"\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n },\n severity: {\n info: \"info group text-info-foreground bg-info\",\n warning: \"warning group text-warning-foreground bg-warning\",\n error: \"error group border-error bg-error text-error-foreground\",\n success: \"success group text-success-foreground bg-success\",\n none: \"\",\n },\n },\n\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst ToastProvider = ToastPrimitives.Provider\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants> & {\n severity?: \"info\" | \"warning\" | \"error\" | \"success\" | \"none\"\n direction?: \"rtl\" | \"ltr\"\n }\n>(({ className, variant, severity = \"none\", direction, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(\n toastVariants({ variant, severity }),\n className,\n direction === \"rtl\"\n ? \"p-6 pl-0 pr-10 data-[state=closed]:slide-out-to-left-full\"\n : \"p-6 pr-8 data-[state=closed]:slide-out-to-right-full\"\n )}\n dir={direction}\n {...props}\n />\n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => {\n return (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n \"group-[.info]:border-muted/40 group-[.info]:hover:border-info/30 group-[.info]:hover:bg-info group-[.info]:hover:text-info-foreground group-[.info]:focus:ring-info\",\n \"group-[.error]:border-muted/40 group-[.error]:hover:border-error/30 group-[.error]:hover:bg-error group-[.error]:hover:text-error-foreground group-[.error]:focus:ring-error\",\n \"group-[.success]:border-muted/40 group-[.success]:hover:border-success/30 group-[.success]:hover:bg-success group-[.success]:hover:text-success-foreground group-[.success]:focus:ring-success\",\n \"group-[.warning]:border-muted/40 group-[.warning]:hover:border-warning/30 group-[.warning]:hover:bg-warning group-[.warning]:hover:text-warning-foreground group-[.warning]:focus:ring-warning\",\n className\n )}\n {...props}\n />\n )\n})\nToastAction.displayName = ToastPrimitives.Action.displayName\n\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"h-4 w-4\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </ToastPrimitives.Close>\n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>\ntype ToastActionElement = React.ReactElement<typeof ToastAction>\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n}\n","import React from \"react\"\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"./Toast\"\nimport { useToast } from \"../hooks/useToast\"\nimport { cn } from \"../util\"\n\nexport function Toaster(props) {\n const { toasts } = useToast()\n let isRTL = props.direction === \"rtl\"\n return (\n <ToastProvider swipeDirection={isRTL ? \"left\" : \"right\"}>\n {toasts.map(function ({ id, title, description, action, ...toastProps }) {\n return (\n <Toast direction={props.direction} key={id} {...toastProps}>\n <div className={\"grid gap-1 text-start\"}>\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && (\n <ToastDescription>{description}</ToastDescription>\n )}\n </div>\n {action}\n <ToastClose />\n </Toast>\n )\n })}\n <ToastViewport className={cn(\"gap-2\", isRTL && \"fixed left-0\")} />\n </ToastProvider>\n )\n}\n","// Inspired by react-hot-toast library\nimport * as React from \"react\"\n\nimport type { ToastActionElement, ToastProps } from \"../elements/Toast\"\n\nconst TOAST_LIMIT = 5\nconst TOAST_REMOVE_DELAY = 100000\n\ntype ToasterToast = ToastProps & {\n id: string\n title?: React.ReactNode\n description?: React.ReactNode\n severity?: \"info\" | \"warning\" | \"error\" | \"success\" | \"none\"\n action?: ToastActionElement\n}\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const\n\nlet count = 0\n\nfunction genId() {\n count = (count + 1) % Number.MAX_VALUE\n return count.toString()\n}\n\ntype ActionType = typeof actionTypes\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"]\n toast: ToasterToast\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"]\n toast: Partial<ToasterToast>\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n\ninterface State {\n toasts: ToasterToast[]\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>()\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n })\n }, TOAST_REMOVE_DELAY)\n\n toastTimeouts.set(toastId, timeout)\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n }\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n }\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId)\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id)\n })\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined ? { ...t, open: false } : t\n ),\n }\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return { ...state, toasts: [] }\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n }\n }\n}\n\nconst listeners: Array<(state: State) => void> = []\n\nlet memoryState: State = { toasts: [] }\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((listener) => {\n listener(memoryState)\n })\n}\n\ntype Toast = Omit<ToasterToast, \"id\">\n\nfunction toast({ ...props }: Toast) {\n const id = genId()\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss()\n },\n },\n })\n\n return {\n id: id,\n dismiss,\n update,\n }\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) {\n listeners.splice(index, 1)\n }\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n }\n}\n\nexport { useToast, toast }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { cn } from \"../util\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = ({\n className,\n ...props\n}: DialogPrimitive.DialogPortalProps) => (\n <DialogPrimitive.Portal className={cn(className)} {...props} />\n)\nDialogPortal.displayName = DialogPrimitive.Portal.displayName\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n {/* <X className=\"h-4 w-4\" /> */}\n\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n","import React from \"react\"\n\nexport const Box = (props: any) => {\n return <div>{props.children}</div>\n}\n","import React from \"react\"\n\ntype BottomAppBarTypes = {\n sx: any\n color: any\n appBarContent: any\n}\nexport const HawaBottomAppBar: React.FunctionComponent<BottomAppBarTypes> = (\n props\n) => {\n return (\n <div className=\"fixed bottom-0 top-auto left-0 m-0 w-full max-w-full p-1\">\n <div\n // elevation={3}\n // style={{\n // width: \"100%\",\n // display: \"flex\",\n // flexDirection: \"row\",\n // justifyContent: \"space-evenly\",\n // borderRadius: 10,\n // alignContent: \"center\",\n // padding: 10,\n // }}\n className=\"flex w-full flex-row items-center justify-evenly rounded bg-gray-200\"\n // variant=\"outlined\"\n >\n {props.appBarContent.map((singleContent: any, i) => (\n <div\n key={i}\n className=\"m-1 flex h-full w-full flex-col items-center justify-center rounded p-2 transition-all hover:cursor-pointer hover:bg-buttonPrimary-700 hover:text-white\"\n onClick={singleContent.action}\n >\n <div\n // sx={{\n // ml: 1,\n // \"&.MuiButtonBase-root:hover\": {\n // color: \"blue\",\n // bgcolor: \"transparent\",\n // },\n // }}\n >\n {singleContent.icon}\n </div>\n <div\n // sx={{ display: { xs: \"none\", sm: \"none\", md: \"block\" } }}\n className=\"mt-2 text-sm\"\n >\n {singleContent.label}\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n}\n","import React, { useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport useDiscloser from \"../hooks/useDiscloser\"\nimport useBreakpoint from \"../hooks/useBreakpoint\"\n\ntype HawaSiteLayoutTypes = {\n navItems: {\n label: string\n icon: any\n slug: string\n action: () => void\n subItems?: any\n }[]\n direction?: \"rtl\" | \"ltr\"\n currentPage: string\n pageTitle?: string\n logoSymbol?: any\n logoLink?: string\n logoText?: any\n children?: any\n stickyNav?: boolean\n topBar?: boolean\n navigationSize?: \"sm\" | \"md\" | \"lg\"\n floating?: boolean\n}\n\nexport const HawaSiteLayout: React.FunctionComponent<HawaSiteLayoutTypes> = ({\n direction = \"rtl\",\n navigationSize = \"md\",\n ...props\n}) => {\n const [openSideMenu, setOpenSideMenu] = useState(false)\n const [openSubItem, setOpenSubItem] = useState(false)\n const { isOpen, onClose, onOpen } = useDiscloser(false)\n const ref = useRef(null)\n const drawerItemRef = useRef(null)\n\n let size\n if (typeof window !== \"undefined\") {\n size = useBreakpoint()\n } else {\n size = 1200\n }\n const [keepOpen, setKeepOpen] = useState(false)\n useEffect(() => {\n const handleClickOutside = (event) => {\n if (ref.current && !ref.current.contains(event.target) && !keepOpen) {\n // onClickOutside && onClickOutside()\n\n setOpenSideMenu(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [keepOpen])\n\n //States of the side menu\n //larger than 600\n //as a bar and expands when hover\n //less than 600\n //as nothing and expands as button is clicked\n let ltrDrawerStyle = [\n \" fixed top-0 left-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-layoutPrimary-500 transition-all\",\n size > 600 ? \"w-14 hover:w-40\" : \"w-0\",\n openSideMenu ? \"w-40\" : \"w-14\",\n ]\n let rtlDrawerStyle = [\n \"fixed top-0 right-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-layoutPrimary-500 transition-all\",\n size > 600 ? \"w-14 hover:w-40\" : \"w-0\",\n openSideMenu ? \"w-40\" : \"w-14\",\n ]\n\n let navigationSizeStyles = {\n sm: \"h-10\",\n md: \"\",\n lg: \"h-24\",\n }\n let ltrChildrenStyle = [\n // \"w-full overflow-y-auto\",\n // \"top-14 h-[calc(100%-3.5rem)]\",\n ]\n let rtlChildrenStyle = [\n // \"overflow-y-auto\",\n // \"w-full\",\n // \"top-14 h-[calc(100%-3.5rem)]\",\n ]\n return (\n <div className=\"h-full w-full\">\n <div\n className={clsx(\n \"z-30 flex w-auto select-none flex-row items-start justify-between bg-layoutPrimary-500 transition-all\",\n navigationSizeStyles[navigationSize],\n \"rounded p-3 \",\n openSideMenu ? \"h-44\" : \"h-14\",\n // props.floating ? \"rounded-[30px]\" : \"rounded\",\n props.stickyNav ? \"fixed left-4 right-4 top-4\" : \"\",\n direction === \"rtl\" ? \"flex-row\" : \"flex-row-reverse\"\n )}\n >\n {size > 600 ? (\n <div className=\"flex flex-row h-8 items-center gap-4 px-3\">\n {props.navItems?.map(({ label }, i) => (\n <div\n onClick={() => setOpenSideMenu(!openSideMenu)}\n key={i}\n className=\"cursor-pointer rounded bg-none text-gray-600 transition-all hover:text-black\"\n >\n {label}\n </div>\n ))}\n </div>\n ) : (\n <div className=\"flex items-center justify-center\">\n <div\n onClick={() => setOpenSideMenu(!openSideMenu)}\n className=\"cursor-pointer rounded p-1 transition-all hover:bg-gray-100\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>{\" \"}\n </div>\n {props.pageTitle ? <div>{props.pageTitle}</div> : <div></div>}\n </div>\n )}\n <div className=\"h-full\">\n <img\n className=\"h-full max-h-8 \"\n src={`https://sikka-images.s3.ap-southeast-1.amazonaws.com/seera/seera-horizontal-wordmark-${\n direction === \"rtl\" ? \"ar\" : \"en\"\n }-white.svg`}\n />\n </div>\n </div>\n\n <div\n className={clsx(\" relative top-14\")}\n // className={clsx(\n // direction === \"rtl\" ? rtlChildrenStyle : ltrChildrenStyle\n // )}\n >\n {props.children}\n </div>\n </div>\n )\n}\n","import React, { useState } from \"react\"\n\ntype TUseDiscloser = {\n isOpen: boolean\n onOpen: () => void\n onClose: () => void\n}\n\nconst useDiscloser = (value: boolean = false): TUseDiscloser => {\n const [open, setOpen] = useState<boolean>(value)\n const onOpen = () => setOpen(true)\n const onClose = () => setOpen(false)\n\n return {\n isOpen: open,\n onOpen: onOpen,\n onClose: onClose,\n }\n}\n\nexport default useDiscloser\n","import React, { useState, useEffect } from \"react\"\n\nconst useBreakpoint = () => {\n const [breakpoint, setBreakpoint] = useState(window?.innerWidth)\n const resize = () => {\n setBreakpoint(window?.innerWidth)\n }\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n // Client-side-only code\n\n window?.addEventListener(\"resize\", resize)\n\n return () => {\n window?.removeEventListener(\"resize\", resize)\n }\n }\n }, [])\n\n return breakpoint\n}\n\nexport default useBreakpoint\n","import React, { useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport useBreakpoint from \"../hooks/useBreakpoint\"\nimport { Button, DropdownMenu, MenuItemType, Tooltip } from \"../elements\"\nimport { SidebarGroup } from \"./Sidebar\"\n\ntype AppLayoutTypes = {\n design?: \"default\" | \"bubbles\" | \"floating\"\n /** The pages of the side drawer */\n drawerItems: Item[]\n // The direction of the layout\n direction?: \"rtl\" | \"ltr\"\n // The title of the current selected page, make sure it's the same as the drawerItem slug\n currentPage: string\n pageTitle?: string\n logoSymbol?: any\n logoLink?: string\n logoText?: any\n children?: any\n topBar?: boolean\n username?: string\n email?: string\n avatarImage?: any\n drawerSize?: \"sm\" | \"md\" | \"large\"\n profileMenuItems?: MenuItemType[]\n profileMenuWidth: \"default\" | \"sm\" | \"lg\" | \"parent\"\n onSettingsClick?: () => void\n onDrawerExpand?: (e) => void\n keepDrawerOpen?: boolean\n DrawerFooterActions?: any\n clickedItem?: any\n texts?: {\n expandSidebar?: string\n collapseSidebar?: string\n }\n}\ntype Item = {\n value: string\n label: string\n icon?: any\n subitems?: SubItem[]\n onClick?: () => void\n}\ntype SubItem = {\n value: string\n label: string\n icon?: any\n onClick?: () => void\n}\n\nexport const AppLayout: React.FunctionComponent<AppLayoutTypes> = ({\n direction = \"ltr\",\n drawerSize = \"md\",\n onSettingsClick,\n DrawerFooterActions,\n currentPage,\n clickedItem,\n design = \"default\",\n ...props\n}) => {\n let closeDrawerWidth = 56\n let openDrawerWidth = 200\n let drawerSizeStyle = {\n opened: {\n sm: \"100\",\n md: openDrawerWidth,\n lg: \"250\",\n },\n closed: {\n sm: closeDrawerWidth,\n md: closeDrawerWidth,\n lg: closeDrawerWidth,\n },\n }\n\n const ref = useRef(null)\n const isRTL = direction === \"rtl\"\n\n const [openedSidebarItem, setOpenedSidebarItem] = useState(\"\")\n const [selectedItem, setSelectedItem] = useState(currentPage)\n\n let size\n if (typeof window !== \"undefined\") {\n size = useBreakpoint()\n } else {\n size = 1200\n }\n const [keepOpen, setKeepOpen] = useState(() => {\n if (size > 600) {\n // If size is larger than 600, use prop.isDrawerOpen if it exists, or default to true.\n return props.keepDrawerOpen !== undefined ? props.keepDrawerOpen : true\n } else {\n // If size is less than or equal to 600, set keepOpen to false.\n return false\n }\n })\n const [openSideMenu, setOpenSideMenu] = useState(size > 600 ? true : false)\n\n let drawerSizeCondition =\n size > 600 ? drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][drawerSize] : 0\n\n useEffect(() => {\n const handleClickOutside = (event) => {\n if (ref.current && !ref.current.contains(event.target) && !keepOpen) {\n setOpenSideMenu(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [keepOpen])\n\n return (\n <div className=\"fixed left-0\">\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Top Bar\n * ----------------------------------------------------------------------------------------------------\n */}\n {props.topBar && (\n <div\n className={clsx(\n \"fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* Nav Side Of Navbar */}\n {size > 600 ? (\n <div\n className={clsx(\n \"dark:text-white\",\n isRTL\n ? [size > 600 ? \"mr-14\" : \"mr-2\", keepOpen ? \"mr-40\" : \"\"]\n : [size > 600 ? \"ml-14\" : \"ml-2\", keepOpen ? \"ml-40\" : \"\"]\n )}\n style={\n isRTL\n ? {\n marginRight: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n : {\n marginLeft: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n }\n >\n {props.pageTitle}\n </div>\n ) : (\n // Mobile Drawer Menu Button\n <div\n dir={direction}\n className=\"flex items-center justify-center gap-0.5\"\n >\n <div\n onClick={() => setOpenSideMenu(true)}\n className=\"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth={0}\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n ></path>\n </svg>\n </div>\n {/* Mobile Page Title */}\n {props.pageTitle ? (\n <div className=\"text-sm\">{props.pageTitle}</div>\n ) : (\n <div></div>\n )}\n </div>\n )}\n\n <div\n className={clsx(\n \"flex gap-2 dark:text-white\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* User Info */}\n {size > 600 ? (\n <div\n className={isRTL ? \"text-left text-xs\" : \"text-right text-xs\"}\n >\n <div className=\"font-bold\">{props.username}</div>{\" \"}\n <div>{props.email}</div>\n </div>\n ) : null}\n {/* Profile Icon & Menu */}\n <DropdownMenu\n triggerClassname=\"mx-2\"\n align=\"end\"\n alignOffset={8}\n side={\"bottom\"}\n sideOffset={5}\n width={props.profileMenuWidth}\n direction={isRTL ? \"rtl\" : \"ltr\"}\n items={props.profileMenuItems}\n onItemSelect={(e) => console.log(\"selecting item \", e)}\n trigger={\n <div className=\"relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600\">\n {props.avatarImage ? (\n <img src={props.avatarImage} alt=\"User Avatar\" />\n ) : (\n <svg\n aria-label=\"Avatar Icon\"\n className=\"absolute -left-1 h-10 w-10 text-gray-400\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )}\n </div>\n }\n />\n </div>\n </div>\n )}\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed z-40 flex flex-col justify-between overflow-x-clip transition-all\",\n design === \"floating\"\n ? isRTL\n ? \"right-5 top-5\"\n : \"bottom-5 left-5 top-5\"\n : isRTL\n ? \"right-0 top-0 h-full\"\n : \"left-0 top-0 h-full\"\n )}\n style={{\n width:\n size > 600\n ? openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : `${drawerSizeStyle[\"closed\"][drawerSize]}px`\n : openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : \"0px\",\n }}\n onMouseEnter={() => {\n setOpenSideMenu(true)\n }}\n onMouseLeave={() => {\n if (keepOpen) {\n setOpenSideMenu(true)\n } else {\n setOpenedSidebarItem(\"\")\n setOpenSideMenu(false)\n }\n // keepOpen ? setOpenSideMenu(true) : setOpenSideMenu(false)\n }}\n ref={ref}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Header\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n dir={direction}\n className={\n \"fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all\"\n }\n style={{\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Full Logo\n * ----------------------------------------------------------------------------------------------------\n */}\n <img\n className={clsx(\n \"h-9 opacity-0 transition-all\",\n !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n )}\n src={props.logoLink}\n />\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Logo Symbol\n * ----------------------------------------------------------------------------------------------------\n */}\n {size > 600 ? (\n <img\n className={clsx(\n \"fixed h-9 transition-all\",\n // isRTL ? \"right-2.5\" : \"left-2.5\",\n\n design === \"floating\"\n ? isRTL\n ? \"right-7.5 top-7\"\n : \"left-7.5 top-7\"\n : isRTL\n ? \"right-2.5 top-2.5\"\n : \"left-2.5 top-2.5\",\n\n openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n )}\n src={props.logoSymbol}\n />\n ) : null}\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Content Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed bottom-14 bg-primary-foreground p-2 py-2 transition-all\",\n design === \"floating\" ? \"top-[76px]\" : \"top-14\",\n openSideMenu ? \"overflow-auto\" : \"overflow-hidden\"\n )}\n style={{\n height:\n design === \"floating\"\n ? \"calc(100% - 152px)\"\n : \"calc(100% - 112px)\",\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Items\n * ----------------------------------------------------------------------------------------------------\n */}\n <SidebarGroup\n direction={direction}\n onItemClick={(values) => {\n // console.log(\"vals \", values)\n // setSelectedItem(values)\n if (clickedItem) {\n clickedItem(values)\n }\n }}\n onSubItemClick={(values) => {\n // setSelectedItem(values)\n if (clickedItem) {\n clickedItem(values)\n }\n }}\n selectedItem={currentPage}\n openedItem={openedSidebarItem}\n setOpenedItem={(e) => setOpenedSidebarItem(e)}\n isOpen={openSideMenu}\n items={props.drawerItems}\n />\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Footer\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all\",\n direction === \"rtl\" ? \"flex-row-reverse\" : \"flex-row\",\n design === \"floating\" ? \"bottom-5\" : \"bottom-0\"\n )}\n style={{\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {DrawerFooterActions && openSideMenu ? (\n <>{DrawerFooterActions}</>\n ) : null}\n\n {/* Expand Button */}\n {size > 600 && openSideMenu ? (\n <Tooltip\n side={\"left\"}\n delayDuration={500}\n content={\n keepOpen\n ? props.texts?.collapseSidebar || \"Collapse Sidebar\"\n : props.texts?.expandSidebar || \"Expand Sidebar\"\n }\n >\n <Button\n variant=\"light\"\n onClick={() => {\n setKeepOpen(!keepOpen)\n if (props.onDrawerExpand) {\n props.onDrawerExpand(keepOpen)\n }\n }}\n size=\"smallIcon\"\n >\n <svg\n className={clsx(\n \"h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 \",\n keepOpen\n ? isRTL\n ? \"-rotate-90\"\n : \"rotate-90\"\n : isRTL\n ? \"rotate-90\"\n : \"-rotate-90\"\n )}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </Button>\n </Tooltip>\n ) : null}\n </div>\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Children Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className=\"fixed overflow-y-auto transition-all\"\n style={\n design === \"floating\"\n ? isRTL\n ? {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition + 20}px)`,\n left: \"0px\",\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition + 20}px)`,\n left: `${drawerSizeCondition + 20}px`,\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : isRTL\n ? {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: \"0px\",\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: `${drawerSizeCondition}px`,\n top: props.topBar ? \"56px\" : \"0px\",\n }\n }\n >\n {props.children}\n </div>\n </div>\n )\n}\n","import * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { cn } from \"../util\"\n\nconst Accordion = AccordionPrimitive.Root\n\nlet triggerStyles =\n \"flex flex-1 items-center select-none cursor-pointer bg-primary-foreground rounded justify-between p-2 px-3 font-medium transition-all [&[data-state=open]>svg]:-rotate-90\"\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item ref={ref} className={cn(className)} {...props} />\n))\nAccordionItem.displayName = \"AccordionItem\"\n\ntype AccordionTriggerProps = React.ComponentPropsWithoutRef<\n typeof AccordionPrimitive.Trigger\n> & {\n showArrow?: any\n}\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n AccordionTriggerProps\n>(({ className, showArrow, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(triggerStyles, className)}\n {...props}\n >\n {children}\n {showArrow && (\n <svg\n aria-label=\"Chevron Right Icon\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n className=\"h-4 w-4 shrink-0 rotate-90 transition-transform duration-200\"\n >\n <path d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"></path>\n </svg>\n )}\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className={cn(\n \"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\",\n className\n )}\n {...props}\n >\n <div>{children}</div>\n </AccordionPrimitive.Content>\n))\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\ntype Item = {\n value: string\n label: string\n icon?: any\n subitems?: SubItem[]\n onClick?: () => void\n}\ntype SubItem = {\n value: string\n label: string\n icon?: any\n onClick?: () => void\n}\ninterface SidebarGroupProps {\n title?: string\n items: Item[]\n openedItem?: any\n setOpenedItem?: any\n selectedItem?: any\n isOpen?: boolean\n onItemClick?: (value: string[]) => void\n onSubItemClick?: (values: string[]) => void\n direction?: \"rtl\" | \"ltr\"\n}\n\nconst SidebarGroup: React.FC<SidebarGroupProps> = ({\n title,\n items,\n selectedItem,\n openedItem,\n setOpenedItem,\n onItemClick,\n onSubItemClick,\n direction,\n isOpen,\n}) => {\n // console.log(\"selected item is \", selectedItem)\n return (\n <div>\n {title && <h3 className=\"mb-1 font-bold\">{title}</h3>}\n <ul className=\"flex flex-col gap-2\">\n <Accordion\n value={openedItem}\n type=\"single\"\n onValueChange={(e) => {\n setOpenedItem(e)\n }}\n collapsible\n className=\"flex flex-col gap-1\"\n >\n {items.map((item, idx) => (\n <SidebarItem\n isOpen={isOpen}\n selectedItem={selectedItem}\n key={idx}\n direction={direction}\n item={item}\n onItemClick={onItemClick}\n onSubItemClick={onSubItemClick}\n />\n ))}\n </Accordion>\n </ul>\n </div>\n )\n}\nconst SidebarItem: React.FC<{\n item: Item\n selectedItem?: any\n direction?: \"rtl\" | \"ltr\"\n onItemClick?: (value: string[]) => void\n onSubItemClick?: (values: string[]) => void\n isOpen?: boolean\n}> = ({\n item,\n onItemClick,\n onSubItemClick,\n direction,\n isOpen = true,\n ...props\n}) => {\n const getSelectedStyle = (value: string) => {\n return props.selectedItem === value\n ? \"bg-primary text-primary-foreground cursor-default\"\n : \"hover:bg-primary/10\"\n }\n if (item.subitems) {\n return (\n <AccordionItem\n value={item.value}\n className=\"overflow-x-clip\"\n dir={direction}\n >\n <AccordionTrigger\n className={cn(\n \"overflow-x-clip\",\n props.selectedItem === item.value\n ? \"cursor-default bg-primary text-primary-foreground\"\n : \"hover:bg-primary/10\",\n item.subitems &&\n item.subitems.some(\n (subitem) => props.selectedItem === subitem.value\n )\n ? \"bg-primary text-primary-foreground hover:bg-primary\"\n : \"\"\n )}\n showArrow={isOpen}\n >\n <div\n className={cn(\n !isOpen && \"py-1\",\n \"flex w-fit flex-row items-center gap-2\"\n )}\n >\n {item.icon}\n {isOpen && (\n <span\n className={cn(\n \"transition-all \",\n isOpen ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {item.label}\n </span>\n )}\n </div>\n </AccordionTrigger>\n {item.subitems && (\n <AccordionContent className=\" mt-1 h-full rounded \">\n <div\n className={cn(\"flex h-full flex-col gap-2 bg-foreground/5 p-1\")}\n >\n {item.subitems.map((subitem, idx) => (\n <li\n key={idx}\n onClick={(e) => {\n e.stopPropagation()\n subitem.onClick()\n if (onSubItemClick) {\n onSubItemClick([item.value, subitem.value])\n }\n }}\n className={cn(\n \"flex h-full cursor-pointer flex-row items-center gap-2 rounded p-2 transition-all\",\n // bg-foreground/10\n getSelectedStyle(subitem.value)\n )}\n >\n {subitem.icon}\n {subitem.label}\n </li>\n ))}\n </div>\n </AccordionContent>\n )}\n </AccordionItem>\n )\n } else {\n return (\n <div\n dir={direction}\n onClick={() => {\n item.onClick()\n if (onItemClick) {\n onItemClick([item.value])\n }\n }}\n className={cn(\n triggerStyles,\n getSelectedStyle(item.value),\n \"overflow-x-clip \"\n )}\n >\n <div className={\"flex flex-row items-center gap-2 \"}>\n {item.icon}\n <span\n className={cn(\n \"whitespace-nowrap transition-all\",\n isOpen ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {item.label}\n </span>\n </div>\n </div>\n )\n }\n}\nexport { SidebarGroup, SidebarItem }\n","import React, { useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { FaChevronRight } from \"react-icons/fa\"\nimport useDiscloser from \"../hooks/useDiscloser\"\nimport useBreakpoint from \"../hooks/useBreakpoint\"\nimport { HawaMenu } from \"../elements\"\n\n// TODO: when no pagetitle, navbar gets messy\n\ntype HawaAppLayoutTypes = {\n drawerItems: {\n label: string\n icon: any\n slug: string\n action: () => void\n subItems?: any\n }[][]\n direction?: \"rtl\" | \"ltr\"\n currentPage: string\n pageTitle?: string\n logoSymbol?: any\n logoLink?: string\n logoText?: any\n children?: any\n topBar?: boolean\n username?: string\n email?: string\n drawerSize?: \"sm\" | \"md\" | \"large\"\n profileMenuItems?: MenuItems[][]\n onSettingsClick?: () => void\n}\n\ntype MenuItems = {\n icon?: JSX.Element\n label: string\n action?: (e: any) => void\n isButton?: boolean\n}\nexport const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = ({\n direction = \"rtl\",\n drawerSize = \"md\",\n onSettingsClick,\n ...props\n}) => {\n const [openSideMenu, setOpenSideMenu] = useState(false)\n const [openSubItem, setOpenSubitem] = useState(\"\")\n const { isOpen, onClose, onOpen } = useDiscloser(false)\n const [keepOpen, setKeepOpen] = useState(false)\n const ref = useRef(null)\n const isRTL = direction === \"rtl\"\n let size\n if (typeof window !== \"undefined\") {\n size = useBreakpoint()\n } else {\n size = 1200\n }\n useEffect(() => {\n const handleClickOutside = (event) => {\n if (ref.current && !ref.current.contains(event.target) && !keepOpen) {\n setOpenSideMenu(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [keepOpen])\n\n let drawerDefaultStyle =\n \"fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-layoutPrimary-500 transition-all\"\n\n let drawerSizeStyle = {\n opened: {\n sm: \"100\",\n md: \"160\",\n lg: \"250\",\n },\n closed: {\n sm: \"56\",\n md: \"56\",\n lg: \"56\",\n },\n }\n let drawerSizeCondition =\n size > 600 ? drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][drawerSize] : 0\n return (\n <div className=\"fixed\">\n {/* Top Bar Component */}\n {props.topBar && (\n <div\n className={clsx(\n \"fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-layoutPrimary-500 p-2\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* Nav Side Of Navbar */}\n {size > 600 ? (\n props.pageTitle ? (\n // Title of the page\n <div\n className={clsx(\n isRTL\n ? [size > 600 ? \"mr-14\" : \"mr-2\", keepOpen ? \"mr-40\" : \"\"]\n : [size > 600 ? \"ml-14\" : \"ml-2\", keepOpen ? \"ml-40\" : \"\"]\n )}\n style={\n isRTL\n ? {\n marginRight: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n : {\n marginLeft: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n }\n >\n {props.pageTitle}\n </div>\n ) : null\n ) : (\n // Mobile Drawer Menu Button\n <div\n dir={direction}\n className=\"flex items-center justify-center gap-0.5 \"\n >\n <div\n onClick={() => setOpenSideMenu(true)}\n className=\"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>{\" \"}\n </div>\n {/* Mobile Page Title */}\n {props.pageTitle ? (\n <div className=\"text-sm\">{props.pageTitle}</div>\n ) : (\n <div></div>\n )}\n </div>\n )}\n\n <div\n className={clsx(\n \"flex gap-2\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n // dir={direction}\n >\n {/* User Info */}\n {size > 600 ? (\n <div\n className={clsx(\n isRTL ? \"text-left text-xs\" : \"text-right text-xs\"\n )}\n >\n <div className=\"font-bold\">{props.username}</div>{\" \"}\n <div>{props.email}</div>\n </div>\n ) : null}\n\n {/* Profile Icon & Menu */}\n <HawaMenu\n direction={direction}\n // buttonPosition={isRTL ? \"top-left\" : \"top-right\"}\n withHeader={size > 600 ? false : true}\n headerTitle={size > 600 ? \"\" : props.username}\n headerSubtitle={size > 600 ? \"\" : props.email}\n menuItems={props.profileMenuItems}\n // handleClose={onClose}\n // handleOpen={onOpen}\n // open={isOpen}\n position={\"bottom-left\"}\n // position={isRTL ? \"bottom-left\" : \"bottom-left\"}\n // position={isRTL ? \"right-bottom\" : \"bottom-left\"}\n >\n <div className=\"relative h-8 w-8 cursor-pointer overflow-hidden rounded-full ring-1 ring-buttonPrimary-500 dark:bg-gray-600\">\n <svg\n className=\"absolute -left-1 h-10 w-10 text-gray-400\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </div>\n </HawaMenu>\n </div>\n </div>\n )}\n\n {/* Drawer Container */}\n <div\n onMouseEnter={() => {\n setOpenSideMenu(true)\n }}\n onMouseLeave={() =>\n keepOpen ? setOpenSideMenu(true) : setOpenSideMenu(false)\n }\n ref={ref}\n className={clsx(\n drawerDefaultStyle,\n drawerSizeStyle[drawerSize],\n isRTL ? \"right-0\" : \"left-0\"\n )}\n style={{\n width:\n size > 600\n ? openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : `${drawerSizeStyle[\"closed\"][drawerSize]}px`\n : openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : \"0px\",\n }}\n >\n {/* Drawer Content Container */}\n <div\n className={clsx(\n \"no-scrollbar\",\n\n props.topBar ? \"\" : \"mt-2\",\n openSideMenu ? \"overflow-auto\" : \"overflow-hidden\"\n )}\n >\n {/* Drawer Header */}\n <div\n dir={direction}\n className={clsx(\n \"fixed z-50 mb-2 flex h-14 flex-row items-center transition-all \",\n size > 600 || openSideMenu\n ? \"bg-layoutPrimary-500\"\n : \"w-0 bg-transparent\"\n )}\n style={{\n width:\n size > 600\n ? `${\n drawerSizeStyle[openSideMenu ? \"opened\" : \"closed\"][\n drawerSize\n ] - 16\n }px`\n : \"full\",\n }}\n >\n {/* Full Logo */}\n <img\n className={clsx(\n \"fixed top-2.5 h-9 opacity-0 transition-all\",\n isRTL ? \"right-2.5\" : \"left-2.5\",\n !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n // size > 600 ? \"\" : \"right-4\"\n )}\n // className={clsx(\n // \"fixed top-2.5 h-9 transition-all\",\n // isRTL ? \"right-2.5\" : \"left-2.5\",\n // !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n // )}\n src={props.logoLink}\n />\n\n {/* Logo Symbol */}\n {size > 600 ? (\n <img\n className={clsx(\n \"fixed top-2.5 h-9 transition-all\",\n isRTL ? \"right-2.5\" : \"left-2.5\",\n openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n )}\n src={props.logoSymbol}\n />\n ) : null}\n </div>\n {/* Drawer Items */}\n <div className=\"mb-10 mt-14\">\n {props.drawerItems?.map((dSection, dIndex) => (\n <div\n key={dIndex}\n className={clsx(\"flex flex-col items-stretch justify-center\")}\n >\n {dSection?.map((dItem, i) => {\n return (\n <div key={i} id={\"test\"} className=\"flex flex-col\">\n <div\n onClick={() => {\n dItem.subItems\n ? openSubItem === dItem.slug\n ? // ||\n // dItem.subItems.find(\n // (e) => e.slug === props.currentPage\n // )\n setOpenSubitem(\"\")\n : setOpenSubitem(dItem.slug)\n : dItem.action()\n }}\n className={clsx(\n props.currentPage === dItem.slug ||\n dItem.subItems?.find(\n (e) => e.slug === props.currentPage\n )\n ? \"bg-buttonPrimary-500 text-white\"\n : \"hover:bg-layoutPrimary-300\",\n \"m-2 my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all \",\n isRTL ? \"flex-row-reverse pr-3\" : \"\"\n )}\n >\n <div className=\"flex flex-row\" dir={direction}>\n <div className=\"flex items-center justify-center\">\n {dItem.icon}\n </div>\n <div\n className={clsx(\n \"mx-2 whitespace-nowrap text-sm transition-all\",\n openSideMenu ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {dItem.label}\n </div>\n </div>\n {dItem.subItems && (\n <div\n className={clsx(\n openSubItem && dItem.slug === openSubItem\n ? \"-rotate-90\"\n : \"rotate-90\"\n )}\n >\n <FaChevronRight fontSize={11} />\n </div>\n )}\n </div>\n\n {dItem.subItems && (\n <div\n className={clsx(\n \"m-1 flex cursor-pointer flex-col gap-0 overflow-clip whitespace-nowrap rounded bg-layoutPrimary-300 p-1 transition-all\",\n openSubItem == dItem.slug && openSideMenu\n ? \"\"\n : \"my-0 py-0\",\n isRTL ? \"text-right\" : \"text-left\"\n )}\n style={{\n height:\n openSubItem == dItem.slug && openSideMenu\n ? 6 + 33 * dItem.subItems?.length\n : 0,\n }}\n >\n {dItem.subItems?.map((subIt, s) => (\n <div\n key={s}\n className={clsx(\n \"flex flex-row gap-2 overflow-x-clip rounded p-2 px-2 text-xs\",\n isRTL ? \"text-right\" : \"text-left\",\n props.currentPage === subIt.slug\n ? \"bg-buttonPrimary-500 text-white hover:bg-buttonPrimary-500\"\n : \"hover:bg-layoutPrimary-500\"\n )}\n dir={direction}\n onClick={() => {\n subIt.action()\n // setOpenSubitem(dItem.slug)\n }}\n >\n <div className=\"flex items-center justify-center\">\n {subIt.icon}\n </div>\n <div className=\"flex flex-row justify-between\">\n {subIt.label}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n )\n })}\n {dIndex !== props.drawerItems.length - 1 && (\n <div className=\"my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 text-center \"></div>\n )}\n </div>\n ))}\n </div>\n {/* Drawer Footer */}\n {openSideMenu && (\n <div\n className={clsx(\n \"fixed bottom-0 flex flex-row items-center bg-layoutPrimary-500 p-4 transition-all\",\n openSideMenu ? \"bg-layoutPrimary-500 \" : \"bg-red-500\",\n onSettingsClick ? \"justify-between\" : \"justify-end\",\n direction === \"rtl\" ? \"right-0\" : \"left-0\"\n )}\n style={{\n width: `${\n drawerSizeStyle[openSideMenu ? \"opened\" : \"closed\"][\n drawerSize\n ] - 16\n }px`,\n }}\n >\n {onSettingsClick && (\n <div\n className=\" cursor-pointer rounded p-2 transition-all hover:bg-layoutPrimary-700\"\n onClick={() => onSettingsClick()}\n >\n {/* <FiSettings /> */}\n <svg\n aria-label=\"Settings Icon\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1em\"\n width=\"1em\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n </div>\n )}\n {/* Expand Button */}\n {size > 600 ? (\n <div\n className={clsx(\"w-fit transition-all\")}\n // style={isRTL ? {} : {left: }}\n style={\n isRTL\n ? {\n right: `${\n drawerSizeStyle[openSideMenu ? \"opened\" : \"closed\"][\n drawerSize\n ] - 35\n }px`,\n }\n : {\n left: `${\n drawerSizeStyle[openSideMenu ? \"opened\" : \"closed\"][\n drawerSize\n ] - 35\n }px`,\n }\n }\n >\n <div\n dir={direction}\n className={clsx(\n \"relative left-0 top-0 transition-all\",\n openSideMenu ? \" opacity-100\" : \" opacity-0\"\n )}\n >\n <div\n onClick={() => setKeepOpen(!keepOpen)}\n className={\n \"w-fit cursor-pointer rounded bg-gray-300 p-2 transition-all hover:bg-gray-400\"\n }\n >\n <FaChevronRight\n fontSize={14}\n className={clsx(\n \"transition-all\",\n isRTL\n ? keepOpen\n ? \"rotate-0\"\n : \"rotate-180\"\n : keepOpen\n ? \"rotate-180\"\n : \"rotate-0\"\n )}\n />\n </div>\n </div>\n </div>\n ) : null}\n </div>\n )}\n </div>\n </div>\n {/* \n \n {/* Children Container */}\n <div\n className=\"fixed overflow-y-auto\"\n style={\n isRTL\n ? {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: \"0px\",\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: `${drawerSizeCondition}px`,\n top: props.topBar ? \"56px\" : \"0px\",\n }\n }\n >\n {props.children}\n </div>\n </div>\n )\n}\n","import React, { useEffect, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport useDiscloser from \"../hooks/useDiscloser\"\nimport useBreakpoint from \"../hooks/useBreakpoint\"\nimport { Button, DropdownMenu, MenuItemType, Tooltip } from \"../elements\"\n\ntype HawaAppLayoutTypes = {\n /** The pages of the side drawer */\n drawerItems: {\n label: string\n icon: any\n slug: string\n action: () => void\n subItems?: any\n }[][]\n // The direction of the layout\n direction?: \"rtl\" | \"ltr\"\n // The title of the current selected page, make sure it's the same as the drawerItem slug\n currentPage: string\n pageTitle?: string\n logoSymbol?: any\n logoLink?: string\n logoText?: any\n children?: any\n topBar?: boolean\n username?: string\n email?: string\n drawerSize?: \"sm\" | \"md\" | \"large\"\n profileMenuItems?: MenuItemType[]\n onSettingsClick?: () => void\n DrawerFooterActions?: any\n texts?: {\n expandSidebar?: string\n collapseSidebar?: string\n }\n}\n\nexport const HawaAppLayoutSimplified: React.FunctionComponent<\n HawaAppLayoutTypes\n> = ({\n direction = \"rtl\",\n drawerSize = \"md\",\n onSettingsClick,\n DrawerFooterActions,\n ...props\n}) => {\n const [openSideMenu, setOpenSideMenu] = useState(false)\n const [openSubItem, setOpenSubitem] = useState(\"\")\n const { isOpen, onClose, onOpen } = useDiscloser(false)\n const [keepOpen, setKeepOpen] = useState(false)\n const ref = useRef(null)\n const isRTL = direction === \"rtl\"\n let size\n if (typeof window !== \"undefined\") {\n size = useBreakpoint()\n } else {\n size = 1200\n }\n useEffect(() => {\n const handleClickOutside = (event) => {\n if (ref.current && !ref.current.contains(event.target) && !keepOpen) {\n setOpenSideMenu(false)\n }\n }\n document.addEventListener(\"click\", handleClickOutside, true)\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true)\n }\n }, [keepOpen])\n\n let drawerDefaultStyle =\n \"fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip bg-card transition-all\"\n //The width of the drawer when closed\n let closeDrawerWidth = 56\n //The width of the drawer when opened\n let openDrawerWidth = 200\n let drawerSizeStyle = {\n opened: {\n sm: \"100\",\n md: openDrawerWidth,\n lg: \"250\",\n },\n closed: {\n sm: \"56\",\n md: \"56\",\n lg: \"56\",\n },\n }\n\n let drawerSizeCondition =\n size > 600 ? drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][drawerSize] : 0\n return (\n <div className=\"fixed left-0\">\n {props.topBar && (\n <div\n className={clsx(\n \"fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* Nav Side Of Navbar */}\n {size > 600 ? (\n <div\n className={clsx(\n \"dark:text-white\",\n isRTL\n ? [size > 600 ? \"mr-14\" : \"mr-2\", keepOpen ? \"mr-40\" : \"\"]\n : [size > 600 ? \"ml-14\" : \"ml-2\", keepOpen ? \"ml-40\" : \"\"]\n )}\n style={\n isRTL\n ? {\n marginRight: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n : {\n marginLeft: `${\n drawerSizeStyle[keepOpen ? \"opened\" : \"closed\"][\n drawerSize\n ]\n }px`,\n }\n }\n >\n {props.pageTitle}\n </div>\n ) : (\n // Mobile Drawer Menu Button\n <div\n dir={direction}\n className=\"flex items-center justify-center gap-0.5\"\n >\n <div\n onClick={() => setOpenSideMenu(true)}\n className=\"z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </div>\n {/* Mobile Page Title */}\n {props.pageTitle ? (\n <div className=\"text-sm\">{props.pageTitle}</div>\n ) : (\n <div></div>\n )}\n </div>\n )}\n\n <div\n className={clsx(\n \"flex gap-2 dark:text-white\",\n isRTL ? \"flex-row-reverse\" : \"flex-row\"\n )}\n >\n {/* User Info */}\n {size > 600 ? (\n <div\n className={isRTL ? \"text-left text-xs\" : \"text-right text-xs\"}\n >\n <div className=\"font-bold\">{props.username}</div>{\" \"}\n <div>{props.email}</div>\n </div>\n ) : null}\n {/* Profile Icon & Menu */}\n <DropdownMenu\n triggerClassname=\"mx-2\"\n align=\"end\"\n alignOffset={8}\n side={\"bottom\"}\n sideOffset={5}\n direction={isRTL ? \"rtl\" : \"ltr\"}\n trigger={\n <div className=\"relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600\">\n <AvatarIcon />\n </div>\n }\n items={props.profileMenuItems}\n onItemSelect={(e) => console.log(\"selecting item \", e)}\n />\n </div>\n </div>\n )}\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip transition-all\",\n isRTL ? \"right-0\" : \"left-0\"\n )}\n style={{\n width:\n size > 600\n ? openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : `${drawerSizeStyle[\"closed\"][drawerSize]}px`\n : openSideMenu\n ? `${drawerSizeStyle[\"opened\"][drawerSize]}px`\n : \"0px\",\n }}\n onMouseEnter={() => {\n setOpenSideMenu(true)\n }}\n onMouseLeave={() =>\n keepOpen ? setOpenSideMenu(true) : setOpenSideMenu(false)\n }\n ref={ref}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Header\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n dir={direction}\n className={clsx(\n \"fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all\"\n )}\n style={{\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Full Logo\n * ----------------------------------------------------------------------------------------------------\n */}\n <img\n className={clsx(\n \"h-9 opacity-0 transition-all\",\n // isRTL ? \"right-2.5\" : \"left-2.5\",\n !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n // size > 600 ? \"\" : \"right-4\"\n )}\n // className={clsx(\n // \"fixed top-2.5 h-9 transition-all\",\n // isRTL ? \"right-2.5\" : \"left-2.5\",\n // !openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n // )}\n src={props.logoLink}\n />\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Logo Symbol\n * ----------------------------------------------------------------------------------------------------\n */}\n {size > 600 ? (\n <img\n className={clsx(\n \"fixed top-2.5 h-9 transition-all\",\n isRTL ? \"right-2.5\" : \"left-2.5\",\n openSideMenu ? \"invisible opacity-0\" : \"visible opacity-100\"\n )}\n src={props.logoSymbol}\n />\n ) : null}\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Content Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n // \"no-scrollbar\", TODO: make this optional to hide scrollbar or not\n \"fixed bottom-14 top-14 bg-primary-foreground py-2 transition-all\",\n // bg-yellow-400\n openSideMenu ? \"overflow-auto\" : \"overflow-hidden\"\n )}\n style={{\n height: \"calc(100% - 112px)\",\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Items\n * ----------------------------------------------------------------------------------------------------\n */}\n\n {props.drawerItems?.map((dSection, dIndex) => (\n <div\n key={dIndex}\n className={clsx(\n \"flex select-none flex-col items-stretch justify-center transition-all\"\n )}\n >\n {dSection?.map((dItem, i) => {\n return (\n <div key={i} id={\"test\"} className=\"flex flex-col\">\n <div\n onClick={() => {\n dItem.subItems\n ? openSubItem === dItem.slug\n ? // ||\n // dItem.subItems.find(\n // (e) => e.slug === props.currentPage\n // )\n setOpenSubitem(\"\")\n : setOpenSubitem(dItem.slug)\n : dItem.action()\n }}\n className={clsx(\n props.currentPage === dItem.slug ||\n dItem.subItems?.find(\n (e) => e.slug === props.currentPage\n )\n ? \"bg-primary text-primary-foreground \"\n : \"hover:bg-primary/20\",\n \"my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all \",\n isRTL ? \"flex-row-reverse pr-3\" : \"\",\n openSideMenu ? \"m-2\" : \"m-2\"\n )}\n >\n <div className=\"flex flex-row\" dir={direction}>\n <div className=\"flex items-center justify-center \">\n {dItem.icon}\n </div>\n <div\n className={clsx(\n \"mx-2 whitespace-nowrap text-sm transition-all\",\n openSideMenu ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {dItem.label}\n </div>\n </div>\n {dItem.subItems && (\n <ArrowIcon\n // color={\n // props.currentPage === dItem.slug ||\n // dItem.subItems?.find(\n // (e) => e.slug === props.currentPage\n // )\n // ? \"white\"\n // : \"black\"\n // }\n pointing={\n openSubItem && dItem.slug === openSubItem\n ? \"up\"\n : \"down\"\n }\n />\n )}\n </div>\n\n {dItem.subItems && (\n <div\n className={clsx(\n \"m-1 mx-2 flex cursor-pointer flex-col gap-[2px] overflow-clip whitespace-nowrap rounded bg-primary/10 p-1 transition-all\",\n openSubItem == dItem.slug && openSideMenu\n ? \"\"\n : \"my-0 py-0\",\n isRTL ? \"text-right\" : \"text-left\"\n )}\n style={{\n height:\n openSubItem == dItem.slug && openSideMenu\n ? 6 + 35 * dItem.subItems?.length\n : 0,\n }}\n >\n {dItem.subItems?.map((subIt, s) => (\n <div\n key={s}\n className={clsx(\n \"flex flex-row gap-2 overflow-x-clip rounded-inner p-2 px-2 text-xs\",\n isRTL ? \"text-right\" : \"text-left\",\n props.currentPage === subIt.slug\n ? \"bg-primary text-white\"\n : \"hover:bg-primary-foreground hover:text-primary \"\n )}\n dir={direction}\n onClick={() => {\n subIt.action()\n // setOpenSubitem(dItem.slug)\n }}\n >\n <div className=\"flex items-center justify-center\">\n {subIt.icon}\n </div>\n <div className=\"flex flex-row justify-between\">\n {subIt.label}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n )\n })}\n {dIndex !== props.drawerItems.length - 1 && (\n <div className=\"my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 bg-red-500 text-center \"></div>\n )}\n </div>\n ))}\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Drawer Footer\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className={clsx(\n \"fixed bottom-0 flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all\",\n direction === \"rtl\" ? \"flex-row-reverse\" : \"flex-row\"\n )}\n style={{\n width:\n size > 600\n ? `${openSideMenu ? openDrawerWidth : 56}px`\n : `${openSideMenu ? openDrawerWidth : 0}px`,\n }}\n >\n {DrawerFooterActions && openSideMenu ? (\n <>{DrawerFooterActions}</>\n ) : null}\n\n {/* Expand Button */}\n {size > 600 && openSideMenu ? (\n <Tooltip\n side={\"left\"}\n delayDuration={500}\n content={\n keepOpen\n ? props.texts?.collapseSidebar || \"Collapse Sidebar\"\n : props.texts?.expandSidebar || \"Expand Sidebar\"\n }\n >\n <Button\n variant=\"light\"\n onClick={() => setKeepOpen(!keepOpen)}\n size=\"smallIcon\"\n >\n <svg\n className={clsx(\n \"h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 \",\n keepOpen\n ? isRTL\n ? \"-rotate-90\"\n : \"rotate-90\"\n : isRTL\n ? \"rotate-90\"\n : \"-rotate-90\"\n )}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </Button>\n </Tooltip>\n ) : null}\n </div>\n </div>\n {/*\n * ----------------------------------------------------------------------------------------------------\n * Children Container\n * ----------------------------------------------------------------------------------------------------\n */}\n <div\n className=\"fixed overflow-y-auto\"\n style={\n isRTL\n ? {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: \"0px\",\n top: props.topBar ? \"56px\" : \"0px\",\n }\n : {\n height: `calc(100% - ${props.topBar ? \"56\" : \"0\"}px)`,\n width: `calc(100% - ${drawerSizeCondition}px)`,\n left: `${drawerSizeCondition}px`,\n top: props.topBar ? \"56px\" : \"0px\",\n }\n }\n >\n {props.children}\n </div>\n </div>\n )\n}\n\nconst AvatarIcon = () => (\n <svg\n className=\"absolute -left-1 h-10 w-10 text-gray-400\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n)\n\nconst ArrowIcon = ({ pointing }) => {\n let directionStyle\n switch (pointing) {\n case \"right\":\n directionStyle = \"-rotate-90\"\n break\n case \"left\":\n directionStyle = \"rotate-90\"\n break\n case \"up\":\n directionStyle = \"-rotate-180\"\n break\n case \"down\":\n directionStyle = \"rotate-0\"\n break\n\n default:\n break\n }\n return (\n <svg\n className={clsx(\n \"h-6 w-6 shrink-0 text-primary-foreground transition-all disabled:bg-gray-200 \",\n directionStyle\n )}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )\n}\n\nconst SettingsIcon = () => (\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1em\"\n width=\"1em\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n)\n","import React from \"react\"\nimport clsx from \"clsx\"\n\ntype ContainerTypes = {\n maxWidth?: \"full\" | \"small\" | \"normal\"\n children: React.ReactNode\n variant?: \"contained\" | \"outlined\" | \"neobrutalism\"\n direction?: \"rtl\" | \"ltr\"\n centered?: boolean\n}\nexport const HawaContainer: React.FunctionComponent<ContainerTypes> = ({\n maxWidth = \"normal\",\n variant = \"contained\",\n centered = false,\n direction = \"ltr\",\n ...props\n}) => {\n let defaultStyle = \"flex w-full flex-col rounded p-4\"\n let maxWidthStyles: any = {\n full: \"md:max-w-xl\",\n small: \"md:max-w-sm w-1/3 min-w-min\",\n normal: \"max-w-sm md:max-w-md\",\n }\n let variantStyles = {\n contained: \"bg-background border\",\n outlined: \"bg-transparent border border-black w-fit\",\n neobrutalism: \"shadow-neobrutalism border-4 border-black bg-white\",\n }\n\n return (\n <div\n className={clsx(\n defaultStyle,\n maxWidthStyles[maxWidth],\n variantStyles[variant],\n centered ? \"flex items-center text-center\" : \"\"\n )}\n dir={direction}\n >\n {props.children}\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport clsx from \"clsx\"\n\ntype GridTypes = {\n children?: any\n}\n\nexport const HawaGrid: FC<GridTypes> = (props) => {\n return (\n // [&>*:not(:first-child)]:mt-8\n <div className=\" columns-1 gap-5 sm:columns-2 sm:gap-8 md:columns-3 lg:columns-4 [&>*:not(:first-child)]:mt-8\">\n {props.children}\n </div>\n )\n}\n","import React from \"react\"\n\ninterface Props {\n isOpen: boolean\n onClose: () => void\n items: { label: string; onClick: () => void }[]\n}\n\nexport const AppSidebar: React.FC<Props> = ({ isOpen, onClose, items }) => {\n if (!isOpen) {\n return null\n }\n\n return (\n <div className=\"fixed inset-0 z-40 flex bg-gray-600 bg-opacity-75\">\n <div className=\"w-1/3 rounded-l-lg bg-gray-800 shadow-2xl\">\n <button\n onClick={onClose}\n className=\"p-4 text-gray-400 hover:text-white focus:text-white focus:outline-none\"\n >\n Close\n </button>\n <nav>\n {items.map((item, i) => (\n <a\n key={i}\n href=\"#\"\n onClick={item.onClick}\n className=\"block p-4 font-bold text-white hover:bg-gray-700 hover:text-gray-400\"\n >\n {item.label}\n </a>\n ))}\n </nav>\n </div>\n <div className=\"w-2/3 bg-gray-50\"></div>\n </div>\n )\n}\n","import { BsInstagram, BsTwitter } from \"react-icons/bs\"\nimport { FaSnapchatGhost, FaTiktok } from \"react-icons/fa\"\nimport { Button } from \"../elements\"\nimport { cn } from \"../util\"\n\ntype FooterTypes = {\n logoText?: string\n logoURL?: string\n copyRights?: string\n variation?: \"default\" | \"minimal\"\n socialLinks?: {\n twitter?: string\n instagram?: string\n tiktok?: string\n snapchat?: string\n }\n footerLinks?: {\n title: string\n pages: {\n label: string\n link: string\n }[]\n }[]\n}\n\nexport const Footer: React.FunctionComponent<FooterTypes> = ({\n variation = \"default\",\n ...props\n}) => {\n let variationStyles = {\n default: \"rounded border\",\n minimal: \"border-t\",\n }\n return (\n <div\n className={cn(\n \"flex w-full flex-row items-center justify-between gap-8 rounded bg-background p-4\",\n variationStyles[variation]\n )}\n >\n <div className=\"flex flex-col items-center gap-2\">\n <div className=\"flex flex-row items-center gap-2\">\n {props.logoURL && (\n <div>\n <img className=\"h-8\" src={props.logoURL} />\n </div>\n )}\n {props.logoText && (\n <div>\n <div className=\"text-2xl font-bold text-primary\">\n {props.logoText}\n </div>\n </div>\n )}\n </div>\n {props.copyRights && props.footerLinks && (\n <div className=\"text-xs text-muted-foreground\">\n © {props.copyRights} {new Date().getFullYear()}\n </div>\n )}\n </div>\n {props.copyRights && !props.footerLinks && (\n <div className=\"text-xs text-muted-foreground\">\n © {props.copyRights} {new Date().getFullYear()}\n </div>\n )}\n {props.footerLinks?.map((pagesSection) => (\n <div className=\"flex w-32 flex-col gap-2\">\n <div className=\"text-lg font-bold\">{pagesSection.title}</div>\n <div className=\"flex flex-col gap-1\">\n {pagesSection.pages.map((singlePage) => (\n <a\n className=\"transition-all hover:font-bold\"\n href={singlePage.link}\n >\n {singlePage.label}\n </a>\n ))}\n </div>\n </div>\n ))}\n {props.socialLinks && (\n <div className=\"flex flex-row gap-2\">\n {props.socialLinks.twitter && (\n <Button size=\"smallIcon\" variant=\"ghost\">\n <BsTwitter />\n </Button>\n )}\n {props.socialLinks.instagram && (\n <Button size=\"smallIcon\" variant=\"ghost\">\n <BsInstagram />\n </Button>\n )}\n {props.socialLinks.tiktok && (\n <Button size=\"smallIcon\" variant=\"ghost\">\n <FaTiktok />\n </Button>\n )}\n {props.socialLinks.snapchat && (\n <Button size=\"smallIcon\" variant=\"ghost\">\n <FaSnapchatGhost />\n </Button>\n )}\n </div>\n )}\n </div>\n )\n}\n","import React, { FC, useRef, useState } from \"react\"\nimport clsx from \"clsx\"\nimport { Button } from \"../elements\"\n\ntype BannerTypes = {\n showBanner?: boolean\n direction?: \"rtl\" | \"ltr\"\n logoURL?: string\n title?: string\n text?: string\n actionText?: string\n onActionClick?: () => void\n position?: \"top\" | \"bottom\"\n design: \"default\" | \"floating\"\n}\n\nexport const HawaBanner: FC<BannerTypes> = ({\n design = \"floating\",\n ...props\n}) => {\n const bannerRef = useRef(null)\n const [closed, setClosed] = useState(false)\n let bannerStyle = {\n floating:\n \"left-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 lg:max-w-7xl p-4 rounded\",\n default: \"w-[calc(100%)] left-0 z-50 right-0 rounded-none p-2\",\n }\n return (\n <div ref={bannerRef}>\n <div\n dir={props.direction}\n className={clsx(\n bannerStyle[design],\n \"fixed flex flex-col justify-between border border-gray-100 bg-white shadow-sm transition-all dark:border-gray-600 dark:bg-gray-700 md:flex-row md:gap-4 \",\n props.position === \"top\"\n ? design === \"floating\"\n ? \"top-6\"\n : \"top-0\"\n : design === \"floating\"\n ? \"bottom-6\"\n : \"bottom-0\",\n closed ? \"opacity-0\" : \"opacity-100\"\n )}\n >\n <div className=\"mb-3 flex w-full flex-col items-center justify-start md:mb-0 md:flex-row md:items-center\">\n <div\n className={clsx(\n props.direction === \"rtl\"\n ? \"md:ml-4 md:border-l md:pl-4\"\n : \"md:mr-4 md:border-r md:pr-4\",\n \"mb-2 flex items-center border-gray-200 dark:border-gray-600 md:mb-0 md:mr-4 md:pr-4\"\n )}\n >\n {props.logoURL && (\n <img\n src={props.logoURL}\n className=\"mr-2 h-6\"\n alt=\"Flowbite Logo\"\n />\n )}\n {props.title && (\n <span className=\"self-center whitespace-nowrap text-lg font-semibold dark:text-white\">\n {props.title}\n </span>\n )}\n </div>\n {props.text && (\n <p\n className={clsx(\n \"m-0 flex items-center text-center text-sm font-normal text-gray-500 dark:text-gray-400 \",\n props.direction === \"rtl\" ? \"md:text-right\" : \"md:text-left\"\n )}\n >\n {props.text}\n </p>\n )}\n </div>\n {props.actionText && (\n <div\n className={clsx(\n \"flex flex-shrink-0 items-center justify-center \",\n props.direction === \"rtl\" ? \"ml-0 md:ml-10\" : \"mr-0 md:mr-10\"\n )}\n >\n <Button onClick={props.onActionClick}>{props.actionText}</Button>\n </div>\n )}\n <button\n type=\"button\"\n className={clsx(\n \"absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white\",\n props.direction === \"rtl\" ? \"left-2\" : \"right-2\"\n )}\n data-dismiss-target=\"#alert-default\"\n aria-label=\"Close\"\n onClick={() => {\n setClosed(true)\n setTimeout(() => {\n bannerRef.current.removeChild(bannerRef.current.children[0])\n }, 200)\n }}\n >\n <span className=\"sr-only\">Close</span>\n <svg\n aria-hidden=\"true\"\n className=\"h-5 w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n </div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport { HawaPhoneInput, HawaTextField } from \"../../elements\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype UserProfileFormTypes = {\n inputs: any\n texts: any\n handleUpdateProfile: any\n}\n\nexport const UserProfileForm: FC<UserProfileFormTypes> = (props) => {\n const methods = useForm()\n const { inputs } = props\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n return (\n <Card>\n <form onSubmit={handleSubmit((e) => props.handleUpdateProfile(e))}>\n <CardContent headless>\n <FormProvider {...methods}>\n <Controller\n control={control}\n name=\"fullName\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts.fullNameLabel}\n placeholder={props.texts.fullNamePlaceholder}\n helpertext={errors.fullName?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n <Controller\n control={control}\n name=\"phoneNumber\"\n render={({ field }) => <HawaPhoneInput label=\"Phone number\" />}\n />\n <Controller\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts.emailLabel}\n helpertext={errors.email?.message}\n placeholder={props.texts.emailPlaceholder}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts.emailInvalidText,\n },\n }}\n />\n <Controller\n control={control}\n name=\"password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n label={props.texts.passwordLabel}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.passwordRequiredText,\n }}\n />\n\n <Controller\n control={control}\n name=\"confirmPassword\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n label={props.texts.confirmPasswordLabel}\n placeholder={props.texts.confirmPasswordPlaceholder}\n helpertext={errors.confirmPassword?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.confirmPasswordRequiredText,\n }}\n />\n </FormProvider>\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\" type=\"submit\">\n {props.texts.updateProfile}\n </Button>\n </CardFooter>\n </form>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\n\ntype UserSettingsFormTypes = {\n children: any\n handleSaveSettings?: any\n saveSettingsText?: string\n blockTitle?: string\n}\n\nexport const UserSettingsForm: FC<UserSettingsFormTypes> = (props) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"mb-2 text-sm font-bold\">{props.blockTitle}</div>\n <div className=\"flex flex-col gap-4 rounded p-2\">{props.children}</div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaRadio } from \"../../elements\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\nimport { Icons } from \"../../elements/Icons\"\n\ntype AppLandingTypes = {\n texts?: {\n newUserText?: string\n createAccount?: string\n continueWithGoogle?: string\n continueWithTwitter?: string\n continueWithApple?: string\n continueWithMicrosoft?: string\n continueWithGithub?: string\n continueWithEmail?: string\n continueWithPhone?: string\n }\n viaGoogle?: boolean\n viaTwitter?: boolean\n viaGithub?: boolean\n viaMicrosoft?: boolean\n viaEmail?: boolean\n viaPhone?: boolean\n viaApple?: boolean\n\n withoutSignUp?: boolean\n size: \"small\" | \"normal\" | \"full\"\n direction: \"rtl\" | \"ltr\"\n handleSignIn: () => void\n handleSignUp: () => void\n handleLanguage: () => void\n handleColorMode: () => void\n handleRouteToSignUp?: () => void\n handleGoogle?: () => void\n handleTwitter?: () => void\n handleApple?: () => void\n handleMicrosoft?: () => void\n handleGithub?: () => void\n handleEmail?: () => void\n handlePhone?: () => void\n}\n\nexport const AppLanding: FC<AppLandingTypes> = (props) => {\n return (\n <div dir={props.direction}>\n <Card>\n <CardContent headless className=\"flex flex-col gap-6\">\n {props.viaGoogle && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGoogle}\n >\n <Icons.google className=\"h-4 w-4\" />\n {props.texts?.continueWithGoogle ?? \"Continue With Google\"}\n </Button>\n )}\n {props.viaGithub && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGithub}\n >\n <Icons.gitHub className=\"h-4 w-4\" />\n {props.texts?.continueWithGithub ?? \"Continue With Github\"}\n </Button>\n )}\n {props.viaTwitter && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleTwitter}\n >\n <Icons.twitter className=\"h-4 w-4\" />\n {props.texts?.continueWithTwitter ?? \"Continue With Twitter\"}\n </Button>\n )}\n {props.viaApple && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleApple}\n >\n <Icons.apple className=\"h-4 w-4\" />\n {props.texts?.continueWithApple ?? \"Continue With Apple\"}\n </Button>\n )}\n {props.viaMicrosoft && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleMicrosoft}\n >\n <Icons.microsoft className=\"h-4 w-4\" />\n {props.texts?.continueWithMicrosoft ?? \"Continue With Microsoft\"}\n </Button>\n )}\n {props.viaEmail && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleEmail}\n >\n <Icons.mail className=\"h-4 w-4\" />\n {props.texts?.continueWithEmail ?? \"Continue With Email\"}\n </Button>\n )}\n {props.viaPhone && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handlePhone}\n >\n <Icons.phone className=\"h-4 w-4\" />\n {props.texts?.continueWithPhone ?? \"Continue With Phone\"}\n </Button>\n )}\n\n {!props.withoutSignUp && (\n <div className=\"p-3 text-center text-sm font-normal dark:text-gray-300\">\n {props.texts.newUserText}\n <span\n onClick={props.handleRouteToSignUp}\n className=\"clickable-link\"\n >\n {props.texts.createAccount}\n </span>\n </div>\n )}\n </CardContent>\n </Card>\n <div className=\"mt-6 flex flex-row justify-between\">\n <HawaRadio\n onChangeTab={props.handleLanguage}\n design=\"tabs\"\n options={[\n { value: \"ar\", label: \"عربي\" },\n { value: \"en\", label: \"English\" },\n ]}\n />\n <HawaRadio\n onChangeTab={props.handleColorMode}\n design=\"tabs\"\n options={[\n {\n value: \"light\",\n label: (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90\"\n >\n <path\n d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n ),\n },\n {\n value: \"dark\",\n label: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100\"\n >\n <path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"></path>\n </svg>\n ),\n },\n ]}\n />\n </div>\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { Controller, useForm } from \"react-hook-form\"\nimport { HawaPhoneInput } from \"../../elements\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype SignInPhoneTypes = {\n value: any\n onSubmit: any\n country: any\n label: any\n handlePhoneChange: any\n phoneRequiredText: any\n SignInButtonText: any\n handleSignIn: any\n}\n\nexport const SignInPhone: FC<SignInPhoneTypes> = (props) => {\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n const [userPhone, setUserPhone] = useState(\"\")\n return (\n <Card>\n <CardContent headless>\n <form\n onSubmit={(e) => {\n e.preventDefault()\n props.handleSignIn(userPhone)\n }}\n >\n <Controller\n control={control}\n name=\"phone\"\n render={({ field }) => (\n <HawaPhoneInput\n country={props.country ?? \"\"}\n label={props.label ?? \"\"}\n handleChange={(e: any) => setUserPhone(e.target.value)}\n {...field}\n />\n )}\n rules={{\n required: props.phoneRequiredText,\n }}\n />\n <div className=\"mt-2\"></div>\n <Button className=\"w-full\">{props.SignInButtonText}</Button>\n </form>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Controller, useForm } from \"react-hook-form\"\nimport {\n HawaTextField,\n HawaAlert,\n HawaPhoneInput,\n InterfaceSettings,\n} from \"../../elements\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\nimport { Icons } from \"../../elements/Icons\"\nimport { cn } from \"../../util\"\n\nexport const SignInForm: FC<SignInFormTypes> = (props) => {\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = useForm()\n\n return (\n <div className=\"flex flex-col gap-4\">\n <Card dir={props.direction}>\n <CardContent headless>\n <form onSubmit={handleSubmit((e) => props.handleSignIn(e))}>\n {/* an attempt to animate the alert showing */}\n {/* <div\n className={clsx(\n \"h-0 overflow-clip bg-blue-500 transition-all\",\n props.showError ? \"h-auto\" : \"\"\n )}\n >\n <HawaAlert\n title={props.errorTitle}\n text={props.errorText}\n severity=\"error\"\n />\n </div> */}\n {props.showError && (\n <HawaAlert\n title={props.errorTitle}\n text={props.errorText}\n severity=\"error\"\n />\n )}\n {props.signInType === \"email\" ? (\n <Controller\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n autoComplete=\"email\"\n label={props.texts.emailLabel}\n helpertext={errors.email?.message}\n placeholder={props.texts.emailPlaceholder}\n value={field.value ?? \"\"}\n onChange={field.onChange}\n />\n )}\n rules={{\n required: props.texts.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts.emailInvalidText,\n },\n }}\n />\n ) : props.signInType === \"username\" ? (\n <Controller\n control={control}\n name=\"username\"\n render={({ field }) => {\n return (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n autoComplete=\"username\"\n label={props.texts.usernameLabel}\n helpertext={errors.username?.message}\n placeholder={props.texts.usernamePlaceholder}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )\n }}\n rules={{\n required: props.texts.usernameRequired,\n }}\n />\n ) : (\n <Controller\n control={control}\n name=\"phone\"\n render={({ field }) => <HawaPhoneInput label=\"Phone number\" />}\n rules={{ required: props.texts.phoneRequiredText }}\n />\n )}\n {props.signInType !== \"phone\" && (\n <>\n <Controller\n control={control}\n name=\"password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n autoComplete=\"current-password\"\n type=\"password\"\n label={props.texts.passwordLabel}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.passwordRequiredText,\n minLength: 5,\n }}\n />\n {!props.withoutResetPassword && (\n <div\n onClick={props.handleForgotPassword}\n className=\"mb-3 w-fit cursor-pointer text-xs dark:text-gray-300\"\n >\n {props.texts.forgotPasswordText}\n </div>\n )}\n </>\n )}\n\n <Button className=\"mt-4 w-full\" isLoading={props.isLoading}>\n {props.texts.signInText}\n </Button>\n {!props.withoutSignUp && (\n <div className=\"p-3 text-center text-sm font-normal dark:text-gray-300\">\n {props.texts.newUserText}{\" \"}\n <span\n onClick={props.handleRouteToSignUp}\n className=\"clickable-link\"\n >\n {props.texts.createAccount}\n </span>\n </div>\n )}\n </form>\n </CardContent>\n\n {/* 3rd Party Sign Auth Buttons */}\n {props.viaGithub || props.viaGoogle || props.viaTwitter ? (\n <CardFooter\n className={cn(\n props.logosOnly ? \"flex flex-row gap-2 justify-center\" : \"grid grid-cols-1 gap-2\"\n )}\n >\n {props.viaGoogle && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGoogleSignIn}\n >\n <Icons.google className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signInViaGoogleLabel}\n </Button>\n )}\n {props.viaGithub && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGithubSignIn}\n >\n <Icons.gitHub className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signInViaGithubLabel}\n </Button>\n )}\n {props.viaTwitter && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleTwitterSignIn}\n >\n <Icons.twitter className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signInViaTwitterLabel}\n </Button>\n )}\n </CardFooter>\n ) : null}\n </Card>\n <InterfaceSettings\n currentColorMode={props.currentColorMode}\n currentLanguage={props.currentLanguage}\n handleColorMode={props.handleColorMode}\n handleLanguage={props.handleLanguage}\n />\n </div>\n )\n}\n\ntype SignInFormTypes = {\n handleLanguage?: () => void\n currentLanguage?: any\n handleColorMode?: () => void\n currentColorMode?: any\n logosOnly?: boolean\n direction?: \"rtl\" | \"ltr\"\n showError?: any\n errorTitle?: string\n errorText?: string\n signInType?: \"email\" | \"username\" | \"phone\"\n texts?: {\n emailLabel?: string\n emailPlaceholder?: string\n emailRequiredText?: string\n emailInvalidText?: string\n usernameLabel?: string\n usernamePlaceholder?: string\n usernameRequired?: string\n phoneRequiredText?: string\n passwordLabel?: string\n passwordPlaceholder?: string\n passwordRequiredText?: string\n forgotPasswordText?: string\n newUserText?: string\n createAccount?: string\n signInText?: string\n signInViaGoogleLabel?: string\n signInViaGithubLabel?: string\n signInViaTwitterLabel?: string\n }\n withoutResetPassword?: boolean\n withoutSignUp?: boolean\n /**\n *show spinner if true\n */\n isLoading?: any\n viaGoogle?: boolean\n viaGithub?: boolean\n viaTwitter?: boolean\n /**\n * Handle the sign in .\n */\n handleSignIn?: (e: any) => void\n /**\n * Handle routing to sign up page\n */\n handleRouteToSignUp?: () => void\n handleForgotPassword?: () => void\n handleGoogleSignIn?: () => void\n handleGithubSignIn?: () => void\n handleTwitterSignIn?: () => void\n}\n","import { Icons } from \"../../elements/Icons\"\nimport { Button } from \"../../elements/Button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { Input } from \"../../elements/Input\"\nimport { Label } from \"../../elements/Label\"\n\nexport function SignInBlock() {\n return (\n <Card>\n <CardHeader className=\"space-y-1\">\n <CardTitle className=\"text-2xl\">Create an account</CardTitle>\n <CardDescription>\n Enter your email below to create your account\n </CardDescription>\n </CardHeader>\n <CardContent className=\"grid gap-4\">\n <div className=\"grid grid-cols-2 gap-6\">\n <Button variant=\"outline\">\n <Icons.gitHub className=\"mr-2 h-4 w-4\" />\n Github\n </Button>\n <Button variant=\"outline\">\n <Icons.google className=\"mr-2 h-4 w-4\" />\n Google\n </Button>\n </div>\n <div className=\"relative\">\n <div className=\"absolute inset-0 flex items-center\">\n <span className=\"w-full border-t\" />\n </div>\n <div className=\"relative flex justify-center text-xs uppercase\">\n <span className=\"bg-background px-2 text-muted-foreground\">\n Or continue with\n </span>\n </div>\n </div>\n <div className=\"grid gap-2\">\n <Label htmlFor=\"email\">Email</Label>\n <Input id=\"email\" type=\"email\" placeholder=\"m@example.com\" />\n </div>\n <div className=\"grid gap-2\">\n <Label htmlFor=\"password\">Password</Label>\n <Input id=\"password\" type=\"password\" />\n </div>\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\">Create account</Button>\n </CardFooter>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport {\n HawaTextField,\n InterfaceSettings,\n HawaAlert,\n HawaCheckbox,\n HawaSelect,\n} from \"../../elements\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\nimport { Icons } from \"../../elements/Icons\"\nimport { cn } from \"../../util\"\n\ntype SignUpFormTypes = {\n handleLanguage?: () => void\n currentLanguage?: any\n handleColorMode?: () => void\n currentColorMode?: any\n direction?: \"rtl\" | \"ltr\"\n logosOnly?: boolean\n texts: {\n fullNameLabel: string\n fullNamePlaceholder: string\n fullNameRequiredText: string\n emailLabel: string\n emailPlaceholder: string\n emailRequiredText: string\n emailInvalidText: string\n usernameLabel: string\n usernamePlaceholder: string\n usernameRequired: string\n passwordLabel: string\n passwordPlaceholder: string\n passwordRequiredText: string\n passwordTooShortText: string\n confirmPasswordLabel: string\n confirmPasswordPlaceholder: string\n subscribeToNewsletter: string\n forgotPasswordText: string\n termsText: string\n iAcceptText: string\n termsRequiredText: string\n newUserText: string\n signUpText: string\n signInText: string\n existingUserText: string\n signUpViaGoogleLabel: string\n signUpViaGithubLabel: string\n signUpViaTwitterLabel: string\n refCode: string\n }\n showUserSource: any\n viaGoogle: boolean\n viaGithub: boolean\n viaTwitter: boolean\n showNewsletterOption: boolean\n showRefCode: boolean\n showTermsOption: boolean\n handleSignUp: (e: any) => void\n handleRouteToSignIn: () => void\n handleGoogleSignUp: () => void\n handleGithubSignUp: () => void\n handleTwitterSignUp: () => void\n handleRouteToTOS: () => void\n showError: any\n errorTitle: any\n errorText: any\n signUpFields: any[]\n isLoading?: boolean\n}\n\nexport const SignUpForm: FC<SignUpFormTypes> = (props) => {\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n return (\n <div className=\"flex flex-col gap-4\">\n <Card dir={props.direction}>\n <CardContent headless>\n <div>\n {props.showError && (\n <HawaAlert\n title={props.errorTitle}\n text={props.errorText}\n severity=\"error\"\n />\n )}\n <FormProvider {...methods}>\n <form onSubmit={handleSubmit((e) => props.handleSignUp(e))}>\n <div>\n {props.signUpFields.map((fld, i) => {\n if (fld === \"fullname\") {\n return (\n <Controller\n key={i}\n control={control}\n name=\"fullName\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts.fullNameLabel}\n placeholder={props.texts.fullNamePlaceholder}\n helpertext={errors.fullName?.message}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.fullNameRequiredText,\n }}\n />\n )\n }\n if (fld === \"email\") {\n return (\n <Controller\n key={i}\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n autoComplete=\"email\"\n label={props.texts.emailLabel}\n helpertext={errors.email?.message}\n placeholder={props.texts.emailPlaceholder}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts.emailInvalidText,\n },\n }}\n />\n )\n }\n if (fld === \"username\") {\n return (\n <Controller\n key={i}\n control={control}\n name=\"username\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n autoComplete=\"username\"\n label={props.texts.usernameLabel}\n helpertext={errors.username?.message}\n placeholder={props.texts.usernamePlaceholder}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.usernameRequired,\n }}\n />\n )\n }\n })}\n </div>\n <Controller\n control={control}\n name=\"password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n autoComplete=\"new-password\"\n // defaultValue={field.value ?? \"\"}\n label={props.texts.passwordLabel}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{ required: props.texts.passwordRequiredText }}\n />\n <Controller\n control={control}\n name=\"confirm_password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n autoComplete=\"new-password\"\n // defaultValue={field.value ?? \"\"}\n label={props.texts.confirmPasswordLabel}\n placeholder={props.texts.confirmPasswordPlaceholder}\n helpertext={errors.confirm_password?.message}\n onChange={field.onChange}\n value={field.value ?? \"\"}\n />\n )}\n rules={{ required: props.texts.passwordRequiredText }}\n />\n {props.showRefCode && (\n <Controller\n control={control}\n name=\"refCode\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n // defaultValue={field.value ?? \"\"}\n label={props.texts.refCode}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n value={field.value ?? \"\"}\n onChange={field.onChange}\n />\n )}\n />\n )}\n {props.showUserSource && (\n <div>\n <Controller\n control={control}\n name=\"reference\"\n render={({ field }) => (\n <HawaSelect\n label=\"How did you learn about us?\"\n isCreatable={false}\n isMulti={false ?? false}\n isSearchable={false}\n isClearable={false ?? false}\n options={[\n { value: \"friend\", label: \"From a friend\" },\n { value: \"ad\", label: \"Advertisement\" },\n { value: \"other\", label: \"Other\" },\n ]}\n onChange={(e: any) => {\n field.onChange(e.value)\n }}\n />\n )}\n />\n </div>\n )}\n {props.showTermsOption && (\n <Controller\n control={control}\n name=\"terms_accepted\"\n render={({ field }) => (\n <HawaCheckbox\n id=\"terms_accepted\"\n helperText={errors.terms_accepted?.message}\n onChange={(e) => field.onChange(e)}\n label={\n <span>\n {props.texts.iAcceptText}{\" \"}\n <a\n onClick={props.handleRouteToTOS}\n className=\"clickable-link\"\n >\n {props.texts.termsText}\n </a>\n </span>\n }\n />\n )}\n rules={{ required: props.texts.termsRequiredText }}\n />\n )}\n {props.showNewsletterOption && (\n <Controller\n control={control}\n name=\"newsletter_accepted\"\n render={({ field }) => (\n <HawaCheckbox\n id=\"newsletter_accepted\"\n label={props.texts.subscribeToNewsletter}\n onChange={field.onChange}\n />\n )}\n />\n )}\n\n <Button className=\"w-full\" isLoading={props.isLoading}>\n {props.texts.signUpText}\n </Button>\n </form>\n </FormProvider>\n <div className=\"flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-normal dark:text-white\">\n <span>{props.texts.existingUserText}</span>\n <span\n onClick={props.handleRouteToSignIn}\n className=\"clickable-link\"\n >\n {props.texts.signInText}\n </span>\n </div>\n </div>\n </CardContent>\n\n {props.viaGithub || props.viaGoogle || props.viaTwitter ? (\n <CardFooter\n className={cn(\n props.logosOnly\n ? \"flex flex-row justify-center gap-2\"\n : \"grid grid-cols-1 gap-2\"\n )}\n >\n {props.viaGoogle && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGoogleSignUp}\n >\n <Icons.google className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signUpViaGoogleLabel}\n </Button>\n )}\n {props.viaGithub && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleGithubSignUp}\n >\n <Icons.gitHub className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signUpViaGithubLabel}\n </Button>\n )}\n {props.viaTwitter && (\n <Button\n className=\"flex flex-row items-center gap-2\"\n variant=\"outline\"\n onClick={props.handleTwitterSignUp}\n >\n <Icons.twitter className=\"h-4 w-4\" />\n {!props.logosOnly && props.texts.signUpViaTwitterLabel}\n </Button>\n )}\n </CardFooter>\n ) : null}\n </Card>\n <InterfaceSettings\n currentColorMode={props.currentColorMode}\n currentLanguage={props.currentLanguage}\n handleColorMode={props.handleColorMode}\n handleLanguage={props.handleLanguage}\n />\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { HawaTextField, HawaAlert } from \"../../elements\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype NewPasswordTypes = {\n handleNewPassword: () => void\n direction?: \"rtl\" | \"ltr\"\n headless?: boolean\n passwordChanged: any\n texts: {\n passwordPlaceholder: string\n updatePassword: string\n passwordRequiredText: string\n passwordLabel: string\n confirmPasswordPlaceholder: string\n confirmPasswordLabel: string\n confirmPasswordRequiredText: string\n passwordMatchError: string\n passwordChanged: string\n }\n}\n\nexport const NewPasswordForm: FC<NewPasswordTypes> = (props) => {\n const [matchError, setMatchError] = useState(false)\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n const handleSubmission = (e: any) => {\n if (e.password === e.confirmPassword) {\n props.handleNewPassword()\n } else {\n setMatchError(true)\n }\n }\n\n return (\n <Card dir={props.direction}>\n {matchError && (\n <HawaAlert text={props.texts.passwordMatchError} severity=\"error\" />\n )}\n {props.passwordChanged ? (\n <CardContent headless>\n <div className=\"text-center\">{props.texts.passwordChanged}</div>\n </CardContent>\n ) : (\n <FormProvider {...methods}>\n <form onSubmit={handleSubmit(handleSubmission)}>\n {!props.headless && (\n <CardHeader>\n <CardTitle>Create Password</CardTitle>\n <CardDescription>\n Set a new password for your account\n </CardDescription>\n </CardHeader>\n )}\n <CardContent headless={props.headless}>\n <Controller\n control={control}\n name=\"password\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n autoComplete=\"new-password\"\n label={props.texts.passwordLabel}\n placeholder={props.texts.passwordPlaceholder}\n helpertext={errors.password?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.passwordRequiredText,\n }}\n />\n <Controller\n control={control}\n name=\"confirmPassword\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"password\"\n autoComplete=\"new-password\"\n label={props.texts.confirmPasswordLabel}\n placeholder={props.texts.confirmPasswordPlaceholder}\n helpertext={errors.confirmPassword?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts.confirmPasswordRequiredText,\n }}\n />\n </CardContent>\n\n <CardFooter>\n <Button className=\"w-full\" type=\"submit\">\n {props.texts.updatePassword}\n </Button>\n </CardFooter>\n </form>\n </FormProvider>\n )}\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Controller, useForm } from \"react-hook-form\"\nimport { HawaTextField } from \"../../elements\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype ResetPasswordType = {\n handleResetPassword: () => void\n handleRouteToSignUp: () => void\n sent: any\n texts?: {\n emailLabel: string\n emailPlaceholder: string\n emailRequiredText: string\n emailInvalidText: string\n emailSentText: string\n resetPassword: string\n signUpText: string\n dontHaveAccount: string\n }\n headless?: boolean\n direction?: \"rtl\" | \"ltr\"\n}\n\nexport const ResetPasswordForm: FC<ResetPasswordType> = (props) => {\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n register,\n control,\n } = methods\n return (\n <Card dir={props.direction}>\n {!props.sent ? (\n <>\n {!props.headless && (\n <CardHeader>\n <CardTitle>Reset Password</CardTitle>\n <CardDescription>\n Enter your email to reset your account password\n </CardDescription>\n </CardHeader>\n )}\n <form onSubmit={handleSubmit(props.handleResetPassword)}>\n <CardContent headless={props.headless}>\n <Controller\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.emailLabel}\n helpertext={errors.email?.message}\n placeholder={props.texts?.emailPlaceholder}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts?.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts?.emailInvalidText,\n },\n }}\n />\n <div className=\"pb-2 text-start text-sm dark:text-gray-300\">\n {props.texts?.dontHaveAccount ?? \"Don't have an account? \"}\n <span\n onClick={props.handleRouteToSignUp}\n className=\"clickable-link\"\n >\n {props.texts?.signUpText ?? \"Sign Up\"}\n </span>\n </div>\n </CardContent>\n <CardFooter>\n <Button type=\"submit\" className=\"w-full\">\n {props.texts?.resetPassword}\n </Button>\n </CardFooter>\n </form>\n </>\n ) : (\n <CardContent headless>\n <div className=\"text-center\">{props.texts?.emailSentText}</div>\n </CardContent>\n )}\n </Card>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { HawaAlert, HawaPinInput } from \"../../elements\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype TConfirmation = {\n showError?: any\n errorTitle?: any\n errorText?: any\n texts?: {\n checkYourPhone: string\n weSentCode: string\n didntGetCode: string\n resendCode: string\n codeLabel: string\n codePlaceholder: string\n codeRequiredText: string\n confirm: string\n cancel: string\n }\n phoneNumber?: string\n submitConfirmation?: any\n handleSignIn?: any\n}\n\nexport const CodeConfirmation: FC<TConfirmation> = (props) => {\n const [pins, setPins] = useState(null)\n return (\n <Card>\n <CardContent headless>\n {props.showError && (\n <HawaAlert\n title={props.errorTitle}\n text={props.errorText}\n severity=\"error\"\n />\n )}\n <div className=\"mb-4 dark:text-white\">\n <div className=\"text-lg font-bold\">\n {props.texts.checkYourPhone ?? \"Please check your phone\"}\n </div>\n <div className=\"text-muted-foreground\">\n <span>{props.texts.weSentCode ?? \"We've sent a code to \"}</span>\n <span>{props.phoneNumber}</span>\n </div>{\" \"}\n </div>\n <form\n onSubmit={(e) => {\n e.preventDefault()\n if (pins) {\n props.submitConfirmation(pins)\n }\n }}\n >\n <HawaPinInput width=\"full\" digits={6} getPins={(e) => setPins(e)} />\n <div className=\" py-2 text-center text-xs text-muted-foreground\">\n <span>{props.texts.didntGetCode ?? \"Didn't get the code?\"}</span>{\" \"}\n <span className=\"clickable-link\">\n {props.texts.resendCode ?? \"Click to resend\"}\n </span>\n </div>\n <div className=\"mt-4 grid grid-cols-2 gap-2\">\n <Button variant=\"secondary\">\n {props.texts.cancel ?? \"Cancel\"}\n </Button>\n <Button>{props.texts.confirm ?? \"Confirm\"}</Button>\n </div>\n </form>\n </CardContent>\n </Card>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { HawaAlert, HawaPinInput } from \"../../elements\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype CheckEmailBlocks = {\n texts?: {\n checkEmail: string\n resendEmail: string\n pleaseVerify: string\n }\n handleResend?: () => void\n}\n\nexport const CheckEmail: FC<CheckEmailBlocks> = ({ texts, handleResend }) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"flex flex-col items-center justify-center text-center\">\n <div className=\"flex h-16 w-16 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground\">\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n height=\"0.5em\"\n width=\"0.5em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n // {...props}\n >\n <path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"></path>\n <polyline points=\"22,6 12,13 2,6\"></polyline>\n </svg>\n </div>\n <div className=\"m-2 text-xl font-bold\">\n {texts?.checkEmail ?? \"Check you email\"}\n </div>\n\n <div className=\"text-sm\">\n {texts?.pleaseVerify ??\n \"Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account.\"}\n </div>\n </div>\n </CardContent>\n <CardFooter className=\"flex flex-col justify-center \">\n <span className=\"clickable-link text-sm\" onClick={handleResend}>\n {texts?.resendEmail ?? \"Resend Email\"}\n </span>\n </CardFooter>\n </Card>\n )\n}\n","import React, { FC, useState } from \"react\"\nimport { Button } from \"../../elements\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { cn } from \"../../util\"\n\ntype SelectPaymentTypes = {\n viaMada: boolean\n viaWallet: boolean\n viaSTCPay: boolean\n viaPayPal: boolean\n viaApplePay: boolean\n viaCreditCard: boolean\n viaGooglePay: boolean\n madaLabel: string\n stcPayLabel: string\n paypalLabel: string\n walletLabel: string\n applePayLabel: string\n visaMasterLabel: string\n googlePayLabel: string\n handleContinue: (string) => void\n}\n\nexport const SelectPayment: FC<SelectPaymentTypes> = (props) => {\n const [selectedMethod, setSelectedMethod] = useState(\"\")\n return (\n <Card>\n <CardHeader>\n <CardTitle>Choose Payment Method</CardTitle>\n <CardDescription>\n And you'll be directed to the next step to complete the payment\n </CardDescription>\n </CardHeader>\n <CardContent className=\"grid grid-cols-2 gap-4\">\n <Button\n className={cn(\n \"flex w-full flex-col gap-2 pt-6\",\n selectedMethod === \"mada\" && \"outline outline-4 outline-primary\"\n )}\n variant=\"outline\"\n size=\"heightless\"\n disabled={!props.viaMada}\n onClick={() => setSelectedMethod(\"mada\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png\"\n className=\"h-6\"\n />\n <span>{props.madaLabel}</span>\n </Button>\n\n <Button\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"apple-pay\" &&\n \"outline outline-4 outline-primary\"\n )}\n variant=\"outline\"\n size=\"heightless\"\n disabled={!props.viaApplePay}\n onClick={() => setSelectedMethod(\"apple-pay\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png\"\n className=\"h-11\"\n />\n <span>{props.applePayLabel}</span>\n </Button>\n\n <Button\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"visa-master\" &&\n \"outline outline-4 outline-primary\"\n )}\n variant=\"outline\"\n size=\"heightless\"\n disabled={!props.viaCreditCard}\n onClick={() => setSelectedMethod(\"visa-master\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png\"\n className=\"h-6\"\n />\n <span>{props.visaMasterLabel}</span>\n </Button>\n\n <Button\n variant=\"outline\"\n size=\"heightless\"\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"wallet\" && \"outline outline-4 outline-primary\"\n )}\n disabled={!props.viaWallet}\n onClick={() => setSelectedMethod(\"wallet\")}\n >\n <svg\n version=\"1.1\"\n fill=\"currentColor\"\n viewBox=\"0 0 223 223\"\n className=\"h-6 w-6\"\n >\n <g>\n <path\n d=\"M223,94.5c0-6.075-4.925-11-11-11h-63c-6.075,0-11,4.925-11,11v33c0,6.075,4.925,11,11,11h63c6.075,0,11-4.925,11-11V94.5z\n M169.515,123.967c-7.082,0-12.823-5.741-12.823-12.823c0-7.082,5.741-12.823,12.823-12.823c7.082,0,12.823,5.741,12.823,12.823\n C182.338,118.225,176.597,123.967,169.515,123.967z\"\n />\n <path\n d=\"M123.509,68.5H205v-33c0-8.271-6.395-15-14.667-15h-175C7.062,20.5,0,27.229,0,35.5v152c0,8.271,7.062,15,15.333,15h175\n c8.271,0,14.667-6.729,14.667-15v-34h-81.342L123.509,68.5z\"\n />\n </g>\n </svg>\n <span>{props.walletLabel}</span>\n </Button>\n <Button\n variant=\"outline\"\n size=\"heightless\"\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"stc-pay\" && \"outline outline-4 outline-primary\"\n )}\n disabled={!props.viaSTCPay}\n onClick={() => setSelectedMethod(\"stc-pay\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png\"\n className=\"h-6\"\n />\n <span>{props.stcPayLabel}</span>\n </Button>\n\n <Button\n variant=\"outline\"\n size=\"heightless\"\n className={cn(\n \"flex w-full flex-col gap-2\",\n selectedMethod === \"google-pay\" &&\n \"outline outline-4 outline-primary\"\n )}\n disabled={!props.viaGooglePay}\n onClick={() => setSelectedMethod(\"google-pay\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png\"\n className=\"h-6\"\n />\n <span>{props.googlePayLabel}</span>\n </Button>\n <Button\n variant=\"outline\"\n size=\"heightless\"\n className={cn(\n \"col-span-2 flex w-full flex-col gap-2\",\n selectedMethod === \"paypal\" && \"outline outline-4 outline-primary\"\n )}\n disabled={!props.viaPayPal}\n onClick={() => setSelectedMethod(\"paypal\")}\n >\n <img\n src=\"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png\"\n className=\"h-6\"\n />\n <span>{props.paypalLabel}</span>\n </Button>\n </CardContent>\n <CardFooter>\n <Button\n onClick={() => props.handleContinue(selectedMethod)}\n className=\"w-full\"\n disabled={!selectedMethod}\n >\n Continue\n </Button>\n </CardFooter>\n </Card>\n )\n}\n","import React, { FC, useEffect, useState } from \"react\"\nimport { HawaTextField } from \"../../elements\"\nimport { Controller, useForm } from \"react-hook-form\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype CreditCardFormTypes = {\n handle: any\n handlePayWithCreditCard: any\n}\n\nexport const CreditCardForm: FC<CreditCardFormTypes> = (props) => {\n const [cardNumber, setCardNumber] = useState(\"\")\n const [cardType, setCardType] = useState(\"\")\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n\n const getCardType = (card_bin) => {\n const visa_regex = /^4[0-9]{0,15}$/m\n const mastercard_regex = /^5$|^5[0-5][0-9]{0,16}$/m\n const amex_regex = /^3$|^3[47][0-9]{0,13}$/m\n const mada_regex =\n /^(440647|440795|446404|457865|968208|457997|474491|636120|417633|468540|468541|468542|468543|968201|446393|409201|458456|484783|462220|455708|410621|455036|486094|486095|486096|504300|440533|489318|489319|445564|968211|410685|406996|432328|428671|428672|428673|968206|446672|543357|434107|407197|407395|412565|431361|604906|521076|529415|535825|543085|524130|554180|549760|968209|524514|529741|537767|535989|536023|513213|520058|558563|588982|589005|531095|530906|532013|968204|422817|422818|422819|428331|483010|483011|483012|589206|968207|419593|439954|530060|531196|420132)/\n const meeza_regex =\n /^507803[0-6][0-9]|507808[3-9][0-9]|507809[0-9][0-9]|507810[0-2][0-9]/\n let card_type = \"visa\"\n if (card_bin.replace(/[^\\d]/g, \"\").match(mada_regex)) {\n card_type = \"mada\"\n } else if (card_bin.replace(/[^\\d]/g, \"\").match(meeza_regex)) {\n card_type = \"meeza\"\n } else if (card_bin.replace(/[^\\d]/g, \"\").match(visa_regex)) {\n card_type = \"visa\"\n } else if (card_bin.replace(/[^\\d]/g, \"\").match(mastercard_regex)) {\n card_type = \"mastercard\"\n } else if (card_bin.replace(/[^\\d]/g, \"\").match(amex_regex)) {\n card_type = \"amex\"\n }\n return card_type\n }\n const onCardNumberChange = (event) => {\n let { value, name } = event.target\n let cardNumber = value\n value = value.replace(/\\D/g, \"\")\n if (/^3[47]\\d{0,13}$/.test(value)) {\n cardNumber = value\n .replace(/(\\d{4})/, \"$1 \")\n .replace(/(\\d{4}) (\\d{6})/, \"$1 $2 \")\n } else if (/^3(?:0[0-5]|[68]\\d)\\d{0,11}$/.test(value)) {\n // diner's club, 14 digits\n cardNumber = value\n .replace(/(\\d{4})/, \"$1 \")\n .replace(/(\\d{4}) (\\d{6})/, \"$1 $2 \")\n } else if (/^\\d{0,16}$/.test(value)) {\n // regular cc number, 16 digits\n cardNumber = value\n .replace(/(\\d{4})/, \"$1 \")\n .replace(/(\\d{4}) (\\d{4})/, \"$1 $2 \")\n .replace(/(\\d{4}) (\\d{4}) (\\d{4})/, \"$1 $2 $3 \")\n }\n console.log(\"card number is \", cardNumber.trimRight())\n setCardNumber(cardNumber.trimRight())\n // onUpdateState(name, cardNumber);\n }\n useEffect(() => {\n let cardTypeSlug = getCardType(cardNumber)\n setCardType(cardTypeSlug)\n })\n return (\n <Card>\n <form onSubmit={handleSubmit(props.handle)}>\n <CardContent headless>\n <div className=\"flex flex-row gap-4\">\n <Controller\n control={control}\n name=\"cardNumber\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n name=\"cardNumber\"\n placeholder=\"1234 1234 1234 1234\"\n type=\"number\"\n onChange={onCardNumberChange}\n // onChange={(e) => setCardNumber(e.target.value)}\n label=\"Card Number\"\n helpertext={errors.password?.message}\n iconInside={\n <img\n src={`https://sikka-images.s3.ap-southeast-1.amazonaws.com/payment-symbols/borderless/${cardType}.png`}\n alt=\"\"\n className=\"h-8\"\n />\n }\n />\n )}\n rules={{\n required: \"Card Number is rquired\",\n }}\n />\n <div className=\"w-1/4\">\n <Controller\n control={control}\n name=\"cardCVC\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n name=\"cardCVC\"\n maxLength=\"3\"\n autoComplete=\"cc-number\"\n placeholder=\"CVC\"\n type=\"number\"\n label=\"CVC\"\n helpertext={errors.password?.message}\n />\n )}\n rules={{\n required: \"Password is rquired\",\n }}\n />\n </div>\n </div>\n\n <Controller\n control={control}\n name=\"cardExpiry\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n name=\"cardExpiry\"\n placeholder=\"MM / YY\"\n type=\"password\"\n label=\"Expiry Date\"\n helpertext={errors.password?.message}\n />\n )}\n rules={{\n required: \"Password is rquired\",\n }}\n />\n <Controller\n control={control}\n name=\"cardName\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n name=\"cardName\"\n // placeholder=\"Enter password\"\n type=\"text\"\n label=\"Name on card\"\n helpertext={errors.password?.message}\n />\n )}\n rules={{\n required: \"Card holder name is rquired\",\n }}\n />\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\" onClick={props.handlePayWithCreditCard}>\n Pay with Credit Card\n </Button>\n </CardFooter>\n </form>\n </Card>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\nimport { Input } from \"../../elements/Input\"\n\ntype ChargeWalletTypes = {\n currency: any\n handleChargeWallet: any\n texts: {\n amountLabel: string\n amountRequired: string\n chargeWallet: string\n }\n}\nexport const ChargeWalletForm: FC<ChargeWalletTypes> = (props) => {\n const [walletAmount, setWalletAmount] = useState(0)\n\n return (\n <Card>\n <CardContent headless>\n <div className=\"p-4 text-center\">\n <div className=\" text-5xl font-extrabold\">\n {Number(walletAmount).toLocaleString(\"en\") || \"0\"}\n </div>\n <div className=\"text-sm font-normal\">{props.currency || \"SAR\"}</div>\n </div>\n <div className=\"mb-2 flex w-full flex-col gap-4 text-center\">\n <div className=\"mb-2 flex w-full flex-row gap-4 text-center\">\n <Button variant=\"outline\" className=\"h-full w-full\">\n 10 SAR\n </Button>\n <Button variant=\"outline\" className=\"h-full w-full\">\n 50 SAR\n </Button>\n <Button variant=\"outline\" className=\"h-full w-full\">\n 100 SAR\n </Button>\n </div>\n\n <Input placeholder=\"Custom Amount\" type=\"number\" name=\"amount\" />\n </div>\n {/* <FormProvider {...methods}>\n <form onSubmit={handleSubmit(props.handleChargeWallet)}>\n <Controller\n control={control}\n name=\"amount\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n placeholder={props.texts.amountLabel}\n type=\"number\"\n {...field}\n value={field.value ?? \"\"}\n inputProps={{\n inputMode: \"numeric\",\n min: \"1\",\n max: \"9999999\",\n step: \"0.01\",\n }}\n onChange={(e: any) => {\n field.onChange(parseFloat(e.target.value))\n setWalletAmount(e.target.value)\n }}\n helpertext={errors.amount?.message}\n />\n )}\n rules={{\n required: props.texts.amountRequired,\n }}\n />\n\n \n </form>\n </FormProvider> */}\n <Button className=\"mt-6 w-full\">{props.texts.chargeWallet}</Button>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype PayWithWalletTypes = {\n walletBalance: any\n currency: any\n handlePayWithWallet: any\n}\nexport const PayWithWallet: FC<PayWithWalletTypes> = (props) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"text-center text-5xl font-extrabold\">\n {props.walletBalance || \"0\"}\n <div className=\"text-sm font-normal\">{props.currency || \"SAR\"}</div>\n </div>\n <Button className=\"mt-6 w-full\" onClick={props.handlePayWithWallet}>\n Pay Now\n </Button>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaTextField, HawaTable, HawaSelect } from \"../../elements\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport countries from \"../../countries\"\nimport {\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype CheckoutFormTypes = {\n lang: string\n products: any\n total: any\n handlePayNow: any\n countriesList: any\n texts: {\n orderDetails: string\n billingAddress: string\n payNow: string\n emailLabel: string\n emailRequiredText: string\n emailInvalidText: string\n firstNameLabel: string\n required: string\n lastNameLabel: string\n streetAddressLabel: string\n buildingNumberLabel: string\n cityLabel: string\n stateLabel: string\n countryLabel: string\n zipCodeLabel: string\n }\n}\n\nexport const CheckoutForm: FC<CheckoutFormTypes> = (props) => {\n let isArabic = props.lang === \"ar\"\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n register,\n control,\n } = methods\n\n let containerStyle = {\n display: \"flex\",\n padding: 0,\n paddingRight: \"0px !important\",\n paddingLeft: \"0px !important\",\n flexDirection: {\n xs: \"column\",\n sm: \"row\",\n md: \"row\",\n lg: \"row\",\n xl: \"row\",\n },\n }\n return (\n <Card>\n <CardHeader>\n <CardTitle>{props.texts.orderDetails}</CardTitle>\n </CardHeader>\n <CardContent>\n <div>\n <div className=\"rounded border border-gray-300\">\n <HawaTable\n pagination={false}\n direction={isArabic ? \"rtl\" : \"ltr\"}\n columns={[\n { hidden: false, value: \"Product\" },\n { hidden: true, value: \"ID\" },\n { hidden: false, value: \"Price\" },\n ]}\n borders=\"inner\"\n rows={props.products}\n bordersWidth=\"1\"\n />\n </div>\n </div>\n </CardContent>\n <CardHeader>\n <CardTitle>{props.texts.billingAddress}</CardTitle>\n </CardHeader>\n <form onSubmit={handleSubmit(props.handlePayNow)}>\n <CardContent>\n <div>\n <FormProvider {...methods}>\n <div>\n <Controller\n control={control}\n name=\"firstName\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n type=\"text\"\n label={props.texts?.firstNameLabel + \" *\"}\n helpertext={errors.firstName?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n <div style={{ width: 20 }} />\n\n <Controller\n control={control}\n name=\"lastName\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.lastNameLabel + \" *\"}\n helpertext={errors.lastName?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n </div>\n <Controller\n control={control}\n name=\"email\"\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.emailLabel + \" *\"}\n helpertext={errors.email?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n rules={{\n required: props.texts?.emailRequiredText,\n pattern: {\n value:\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: props.texts?.emailInvalidText,\n },\n }}\n />\n <div className=\"flex flex-col md:flex-row\">\n <Controller\n control={control}\n name=\"streetAddress\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.streetAddressLabel + \" *\"}\n helpertext={errors.streetAddress?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n </div>\n\n <div className=\"flex flex-col md:flex-row\">\n <Controller\n control={control}\n name=\"province\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.stateLabel + \" *\"}\n helpertext={errors.province?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n <div style={{ width: 20 }} />\n\n <Controller\n control={control}\n name=\"city\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.cityLabel + \" *\"}\n helpertext={errors.city?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n </div>\n <div className=\"flex flex-col md:flex-row\">\n <Controller\n control={control}\n name=\"buildingNumber\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"text\"\n label={props.texts?.buildingNumberLabel + \" *\"}\n helpertext={errors.buildingNumber?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n <div style={{ width: 20 }} />\n <Controller\n control={control}\n name=\"zipCode\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaTextField\n width=\"full\"\n type=\"number\"\n label={props.texts?.zipCodeLabel + \" *\"}\n helpertext={errors.zipCode?.message}\n {...field}\n value={field.value ?? \"\"}\n />\n )}\n />\n {/* <div style={{ width: 20 }} /> */}\n </div>\n <div className=\"mb-3\">\n <Controller\n control={control}\n name=\"country\"\n rules={{ required: props.texts?.required }}\n render={({ field }) => (\n <HawaSelect\n native\n label={props.texts?.countryLabel + \" *\"}\n helperText={errors.country?.message}\n options={countries}\n getOptionLabel={(countries) => countries.country_label}\n onChange={(e) => field.onChange(e.country_label)}\n value={field.value ?? \"\"}\n >\n <option></option>\n {props.countriesList.map((country: any, i: any) => (\n <option key={i}>{country}</option>\n ))}\n </HawaSelect>\n )}\n />\n </div>\n </FormProvider>\n </div>\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\">{props.texts.payNow}</Button>\n </CardFooter>{\" \"}\n </form>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype ConfirmationPageTypes = {\n texts: {\n print: string\n history: string\n homePage: string\n successMessage: string\n orderDetails: string\n fasterPaymentNote: string\n yourOrderNumber: string\n emailLabel: string\n emailRequiredText: string\n emailInvalidText: string\n firstNameLabel: string\n required: string\n lastNameLabel: string\n streetAddressLabel: string\n buildingNumberLabel: string\n cityLabel: string\n stateLabel: string\n countryLabel: string\n zipCodeLabel: string\n refundPolicy: string\n }\n products: any\n countriesList: any\n lang: string\n total: string\n userEmail: string\n orderNumber: string\n confirmationTitle: string\n handleHome: any\n handlePrint: any\n handleHistory: any\n handleRefundPolicyLink: any\n}\n\nexport const ConfirmationPage: FC<ConfirmationPageTypes> = (props) => {\n let isArabic = props.lang === \"ar\"\n\n return (\n <Card>\n <CardContent headless>\n {\" \"}\n <div className=\"py-5 text-center text-3xl font-bold dark:text-white\">\n {props.confirmationTitle}\n </div>\n <div className=\"py-5 dark:text-white\">\n <div className=\"mb-2 text-center\">\n {props.texts.successMessage} <strong>{props.userEmail}</strong>\n </div>\n <div className=\"text-center\">{props.texts.yourOrderNumber}</div>\n <div className=\"text-center font-bold\">{props.orderNumber}</div>\n </div>\n {/* <div className=\"py-5\">\n <div className=\"mb-3 text-center text-xl font-semibold\">\n {props.texts.orderDetails}\n </div>\n {props.products && (\n <HawaTable\n direction={isArabic ? \"rtl\" : \"ltr\"}\n columns={[\n { hidden: false, value: \"Product\" },\n { hidden: false, value: \"Price\" },\n ]}\n rows={props.products}\n />\n )}\n </div> */}\n <div className=\"flex flex-col items-center justify-center gap-4 py-5 pt-0\">\n <Button className=\"w-full\" onClick={props.handlePrint}>\n {props.texts.print}\n </Button>\n <Button className=\"w-full\" onClick={props.handleHistory}>\n {props.texts.history}\n </Button>\n <Button className=\"w-full\" onClick={props.handleHome}>\n {props.texts.homePage}\n </Button>\n <div className=\" text-center text-sm dark:text-white\">\n {props.texts.fasterPaymentNote}\n </div>\n <a\n className=\"clickable-link text-xs\"\n onClick={props.handleRefundPolicyLink}\n >\n {props.texts.refundPolicy}\n </a>\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaPricingCard, HawaRadio } from \"../../elements\"\n\ntype PricingPlansTypes = {\n plans: [\n {\n direction: \"rtl\" | \"ltr\"\n features: [{ included: boolean; text: string }]\n price: number\n texts: {\n title: string\n subtitle: string\n buttonText: string\n cycleText: string\n currencyText: string\n }\n size: \"small\" | \"medium\" | \"large\"\n }\n ]\n currencies: [\n {\n label: string\n value: string\n }\n ]\n billingCycles: [\n {\n label: string\n value: string\n }\n ]\n onPlanClicked?: (e) => void\n currentCycle: {\n label: string\n value: string\n }\n currentCurrency: {\n label: string\n value: string\n }\n onCycleChange?: (e) => void\n onCurrencyChange?: (e) => void\n direction?: \"rtl\" | \"ltr\"\n}\nexport const PricingPlans: FC<PricingPlansTypes> = (props) => {\n return (\n <div>\n <div className=\"mb-2 flex w-full justify-between\">\n <HawaRadio\n design=\"tabs\"\n defaultValue={props.currentCycle}\n options={props.billingCycles}\n onChangeTab={(e: any) => props.onCycleChange(e)}\n />\n <HawaRadio\n design=\"tabs\"\n defaultValue={props.currentCurrency}\n options={props.currencies}\n onChangeTab={(e: any) => props.onCurrencyChange(e)}\n />\n </div>\n\n <div className=\"flex flex-row justify-between\">\n {props.plans.map((plan: any, index) => {\n return (\n <HawaPricingCard\n key={index}\n onPlanClicked={() => props.onPlanClicked(plan)}\n {...plan}\n texts={{\n ...plan.texts,\n currencyText: props.currentCurrency,\n cycleText: props.currentCycle,\n }}\n />\n )\n })}\n </div>\n </div>\n )\n}\n","import React, { useState, FC } from \"react\"\nimport { HawaRadio } from \"../../elements\"\nimport { Tooltip } from \"../../elements/Tooltip\"\n\nconst CheckMark = () => (\n <svg\n className=\"h-5 w-5 text-green-500\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n)\n\nconst UncheckMark = () => (\n <svg\n className=\"h-5 w-5 text-red-500\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n)\n\ntype ComparingPlansTypes = {\n plans: [\n {\n direction: \"rtl\" | \"ltr\"\n features: [{ included: boolean; text: string; description?: string }]\n price: number\n texts: {\n title: string\n subtitle: string\n buttonText: string\n cycleText: string\n currencyText: string\n }\n size: \"small\" | \"medium\" | \"large\"\n }\n ]\n currencies: [\n {\n label: string\n value: string\n }\n ]\n billingCycles: [\n {\n label: string\n value: string\n }\n ]\n onCycleChange?: (e) => void\n onCurrencyChange?: (e) => void\n direction?: \"rtl\" | \"ltr\"\n}\nexport const ComparingPlans: FC<ComparingPlansTypes> = (props) => {\n const [currentCurrency, setCurrentCurrency] = useState(\"sar\")\n const [currentCycle, setCurrentCycle] = useState(\"month\")\n\n return (\n <div id=\"detailed-pricing\" className=\"w-full overflow-x-auto\">\n <div className=\"mb-2 flex w-full justify-between\">\n <HawaRadio\n design=\"tabs\"\n defaultValue={currentCycle}\n options={props.billingCycles}\n onChangeTab={(e: any) => props.onCycleChange(e)}\n />\n <HawaRadio\n design=\"tabs\"\n defaultValue={currentCurrency}\n options={props.currencies}\n onChangeTab={(e: any) => props.onCurrencyChange(e)}\n />\n </div>\n <div className=\" overflow-hidden rounded\">\n <div className=\"grid grid-cols-4 gap-x-2 border-b border-t border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white\">\n <div className=\"flex items-center\"></div>\n {props.plans.map((plan: any) => (\n <div>\n <h5 className=\"text-md 0 font-bold text-gray-500 dark:text-gray-400\">\n {plan.texts.title}\n </h5>\n\n <div className=\" flex items-baseline text-gray-900 dark:text-white\">\n <>\n <span className=\"text-5xl font-extrabold tracking-tight\">\n {plan.price}\n </span>\n <span className=\"mx-1 text-sm font-semibold\">\n {plan.texts.currencyText}\n </span>\n </>\n <span className=\"ml-1 text-xl font-normal text-gray-500 dark:text-gray-400\">\n / {plan.texts.cycleText}\n </span>\n </div>\n <h5 className=\"text-md font-normal text-gray-500 dark:text-gray-400\">\n {plan.texts.subtitle}\n </h5>\n </div>\n ))}\n </div>\n {props.plans?.map((plan) => {\n return plan.features.map((feature) => {\n return (\n <div className=\"grid grid-cols-4 gap-x-16 border-b border-gray-200 px-4 py-5 text-sm text-gray-700 dark:border-gray-700\">\n <div className=\" flex flex-row items-center gap-2 text-gray-500 dark:text-gray-400\">\n {feature.text}\n {feature.description && (\n <Tooltip side=\"right\" content={feature.description}>\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z\"></path>\n </svg>\n </Tooltip>\n )}\n </div>\n <UncheckMark />\n <CheckMark />\n <UncheckMark />\n </div>\n )\n })\n })}\n </div>\n </div>\n )\n}\n","import React, { FC, useState } from \"react\"\nimport { HawaRadio } from \"../../elements\"\nimport clsx from \"clsx\"\n\ntype HorizontalPricingTypes = {\n plans: [\n {\n direction: \"rtl\" | \"ltr\"\n features: [{ included: boolean; text: string }]\n price: number\n texts: {\n title: string\n subtitle: string\n buttonText: string\n cycleText: string\n currencyText: string\n }\n size: \"small\" | \"medium\" | \"large\"\n }\n ]\n currencies: [\n {\n label: string\n value: string\n }\n ]\n billingCycles: [\n {\n label: string\n value: string\n }\n ]\n onPlanClicked?: (e) => void\n currentCycle: {\n label: string\n value: string\n }\n currentCurrency: {\n label: string\n value: string\n }\n onCycleChange?: (e) => void\n onCurrencyChange?: (e) => void\n direction?: \"rtl\" | \"ltr\"\n}\nexport const HorizontalPricing: FC<HorizontalPricingTypes> = (props) => {\n const [selectedCard, setSelectedCard] = useState(null)\n let data = [\n { title: \"basic\", price: \"$49\", cycle: \"/mo\" },\n { title: \"business\", price: \"$99\", cycle: \"/mo\" },\n { title: \"enterprise\", price: \"$149\", cycle: \"/mo\" },\n ]\n return (\n <div className=\"z-10 w-full max-w-screen-sm\">\n <div className=\"max-w-2xl \">\n <div className=\"flex flex-row justify-between\">\n <HawaRadio\n design=\"tabs\"\n options={props.currencies}\n defaultValue={props.currentCurrency}\n />\n <HawaRadio\n design=\"tabs\"\n options={props.billingCycles}\n defaultValue={props.currentCycle}\n />\n </div>\n {data.map((d) => (\n <label\n htmlFor={d.title}\n className=\"\"\n onClick={() => setSelectedCard(d.title)}\n >\n <input\n type=\"radio\"\n name=\"radio\"\n id={d.title}\n className=\"peer appearance-none\"\n />\n <div\n className={clsx(\n selectedCard === d.title ? \"peer-checked:border-blue-500\" : \"\",\n \"peer flex cursor-pointer items-center justify-between rounded-xl border bg-background px-5 py-4 shadow dark:text-white peer-checked:[&_.active]:block peer-checked:[&_.default]:hidden\"\n )}\n >\n <div className=\"peer flex items-center gap-4\">\n <CheckIcons />\n <CardText\n title=\"Enterprise\"\n subtitle=\"For startups and new businesses\"\n />\n </div>\n\n <CardPrice amount={d.price} cycle={d.cycle} />\n </div>\n </label>\n ))}\n </div>\n </div>\n )\n}\n\nconst CheckIcons = () => (\n <>\n <svg\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n className=\"default h-8 w-8 text-neutral-500\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"active hidden h-8 w-8 text-blue-500\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z\"\n />\n </svg>\n </>\n)\nconst CardText = (props) => (\n <div className=\"peer flex flex-col items-start \">\n <h2 className=\"font-medium text-neutral-700 dark:text-gray-100 sm:text-xl\">\n {props.title}\n </h2>\n <p className=\"text-sm text-neutral-500 dark:text-gray-300\">\n {props.subtitle}{\" \"}\n </p>\n </div>\n)\nconst CardPrice = (props) => (\n <h2 className=\"peer text-xl font-semibold text-neutral-900 dark:text-white sm:text-2xl\">\n {props.amount}\n <span className=\"text-base font-medium text-neutral-400\">\n {props.cycle}\n </span>\n </h2>\n)\n","import React, { FC } from \"react\"\n\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype ReferralAccount = {\n referralLink: string\n referralCode: string\n}\n\nexport const ReferralAccount: FC<ReferralAccount> = ({\n referralLink,\n referralCode,\n}) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"my-2 mt-0\">\n <div className=\"mb-1\">Referral Code</div>\n <div className=\"flex flex-row items-center justify-between rounded border bg-background\">\n <span className=\"ml-3 font-bold\">{referralCode}</span>\n <Button\n // tooltip=\"Copy\"\n // className=\"mr-1.5\"\n onClick={() => navigator.clipboard.writeText(referralCode)}\n >\n <span className=\"bg-red flex items-center justify-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z\"></path>\n </svg>{\" \"}\n </span>\n </Button>\n </div>\n </div>\n <div className=\"my-2 mt-0\">\n <div className=\"mb-1\">Referral Link</div>\n <div className=\"flex flex-row items-center justify-between rounded border bg-background\">\n <span className=\"ml-3 font-bold\">{referralLink}</span>\n <Button\n // className=\"mr-1.5\"\n onClick={() => navigator.clipboard.writeText(referralLink)}\n >\n <span className=\"bg-red flex items-center justify-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z\"></path>\n </svg>{\" \"}\n </span>\n </Button>\n </div>\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport {\n HawaAlert,\n HawaChip,\n HawaMenu,\n HawaSelect,\n HawaTextField,\n} from \"../../elements\"\nimport { Controller, FormProvider, useForm } from \"react-hook-form\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype TReferralSettlement = {\n referralLink: string\n referralCode: string\n withdrawError?: string\n}\n\nexport const ReferralSettlement: FC<TReferralSettlement> = ({\n referralLink,\n referralCode,\n withdrawError,\n}) => {\n const methods = useForm()\n const {\n formState: { errors },\n handleSubmit,\n control,\n } = methods\n return (\n <Card>\n <CardContent headless>\n <div>\n <FormProvider {...methods}>\n <HawaTextField label={\"IBAN\"} />\n <HawaTextField label={\"Holder Name\"} />\n <Controller\n control={control}\n name=\"bank\"\n render={({ field }) => (\n <HawaSelect\n label=\"Bank\"\n isCreatable={false}\n isMulti={false ?? false}\n isSearchable={false}\n isClearable={false ?? false}\n options={[\n { value: \"snb\", label: \"Saudi National Bank\" },\n { value: \"bilad\", label: \"Al Bilad Bank\" },\n { value: \"rajihi\", label: \"Al Rajihi Bank\" },\n ]}\n onInputChange={(e: any, o: any) => console.log(\"changing\", e)}\n {...field}\n onChange={(e: any, o: any) => console.log(\"chooo\", e)}\n />\n )}\n />\n </FormProvider>\n </div>\n <div>\n <Button className=\"mt-6 w-full\">Add Bank Account</Button>\n </div>\n {withdrawError && (\n <div>\n <HawaAlert\n text={\n \"Sorry can't withdraw the money at the moment. Please try again in 2022/11/20\"\n }\n severity=\"warning\"\n />\n </div>\n )}\n <div className=\"mt-3\">\n <div className=\"mb-1\">Settlement Accounts</div>\n <div className=\"rounded\">\n <SettlementAccountCard\n bank=\"Al Inma Bank\"\n iban=\"SA10228094028098329119\"\n accountHolder=\"Zakher Masri\"\n default\n />\n <SettlementAccountCard\n bank=\"Al Rajihi Bank\"\n iban=\"SA10228094028098329119\"\n accountHolder=\"Zakher Masri\"\n />\n <SettlementAccountCard\n bank=\"Al Inma Bank\"\n iban=\"SA10228094028098329119\"\n accountHolder=\"Zakher Masri\"\n />\n </div>\n </div>\n </CardContent>\n </Card>\n )\n}\n\nconst SettlementAccountCard = (props) => {\n return (\n <div className=\"mb-3 flex flex-row items-center justify-between rounded border bg-background p-3\">\n <div className=\"flex flex-col justify-between\">\n <div className=\"text-xs\">{props.bank}</div>\n <div>{props.accountHolder}</div>\n <div className=\"text-xs\">{props.iban}</div>\n </div>\n <div className=\"flex flex-row items-center justify-center gap-2\">\n {props.default && (\n <HawaChip\n label=\"Default\"\n size=\"small\"\n // disabled\n // variant=\"outlined\"\n // size=\"xs\"\n // margins=\"none\"\n />\n )}\n\n <HawaMenu\n size=\"small\"\n menuItems={[\n [\n { label: \"Set Default\", disabled: props.default },\n { label: \"Edit\" },\n { label: \"Delete\" },\n ],\n ]}\n // position={direction === \"rtl\" ? \"right-bottom\" : \"left-bottom\"}\n // direction={direction}\n >\n <Button variant=\"outline\" size=\"icon\">\n <svg\n aria-label=\"Vertical Three Dots Menu Icon\"\n className=\"rotate-90\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 16 16\"\n height=\"1em\"\n width=\"1em\"\n >\n <path d=\"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z\"></path>\n </svg>\n </Button>\n </HawaMenu>\n </div>\n </div>\n )\n}\n","import React, { FC } from \"react\"\nimport { HawaAlert } from \"../../elements\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype TReferralStats = {\n referralLink: string\n referralCode: string\n withdrawError?: string\n}\n\nexport const ReferralStats: FC<TReferralStats> = ({\n referralLink,\n referralCode,\n withdrawError,\n}) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"mb-1\">Stats</div>\n <div className=\"justi flex flex-row gap-1\">\n <NumberCard title=\"Clicks\" number={22} />\n <NumberCard title=\"Sign-ups\" number={32} />\n <NumberCard title=\"Commission\" number={\"213.22 SAR\"} />\n </div>\n\n <Button className=\"mt-6 w-full\">Withdraw Money</Button>\n {withdrawError && (\n <div>\n <HawaAlert\n text={\n \"Sorry can't withdraw the money at the moment. Please try again in 2022/11/20\"\n }\n severity=\"warning\"\n />\n </div>\n )}\n <div className=\"mt-3\">\n <div className=\"mb-1\">Sign ups</div>\n <div className=\"rounded\">\n <ReferralSignUpCard\n date=\"2020/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n <ReferralSignUpCard\n date=\"2022/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n <ReferralSignUpCard\n date=\"2022/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n <ReferralSignUpCard\n date=\"2022/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n <ReferralSignUpCard\n date=\"2022/10/11 @ 9:45 pm\"\n email=\"zakher@sikka.io\"\n amount=\"3.4 SAR / Month\"\n />\n </div>\n </div>\n </CardContent>\n </Card>\n )\n}\n\nconst NumberCard = (props) => (\n <div className=\"w-full rounded border bg-background p-2\">\n <div className=\"text-sm\">{props.title}</div>\n <div className=\"font-bold\">{props.number}</div>\n </div>\n)\nconst ReferralSignUpCard = (props) => (\n <div className=\"mb-3 rounded border-b bg-background p-2\">\n <div className=\"text-xs\">{props.date}</div>\n <div className=\"flex flex-row justify-between\">\n <div>{props.email}</div>\n <div>{props.amount}</div>\n </div>\n </div>\n)\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype NotFoundTypes = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n texts?: {\n pageNotFound?: string\n ifLost?: string\n home?: string\n }\n}\n\nexport const NotFound: FC<NotFoundTypes> = ({\n variant = \"contained\",\n texts,\n}) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"flex flex-col items-center dark:text-white\">\n <div className=\"text-center text-6xl font-bold \">404</div>\n <div className=\"m-2 text-center text-xl font-bold \">\n {texts?.pageNotFound ?? \"Page Not Found\"}\n </div>\n <div className=\"mb-4 text-center\">\n {texts?.ifLost ?? (\n <>\n If you're lost please contact us{\" \"}\n <span className=\"clickable-link\">help@sikka.io</span>\n </>\n )}\n </div>\n <Button className=\"w-full\">{texts?.home ?? \"Home\"}</Button>\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype TEmptyState = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n onActionClick: () => void\n texts: {\n youreCaughtUp?: string\n actionText?: string\n }\n}\n\nexport const EmptyState: FC<TEmptyState> = ({\n variant = \"contained\",\n texts,\n onActionClick,\n}) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"flex flex-col items-center justify-center text-center \">\n <div className=\"flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"0.35em\"\n width=\"0.35em\"\n >\n <path d=\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\"></path>\n </svg>\n </div>\n <div className=\"m-2 text-xl font-bold\">\n {texts?.youreCaughtUp ?? \"You're all caught up\"}\n </div>\n </div>\n </CardContent>\n <CardFooter>\n <Button className=\"w-full\" onClick={() => onActionClick()}>\n {texts?.actionText ?? \"Go Home\"}\n </Button>\n </CardFooter>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\n\ntype TEmptyState = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n}\n\nexport const Testimonial: FC<TEmptyState> = (props) => {\n return (\n <Card>\n <CardContent headless>\n <div>\n <p className=\"mb-4 max-w-sm\">\n The team at Sikka Software is simply amazing. The tech is easy to\n follow, easy to work with, and infinitely flexible. The solution\n opportunities created by Tines are endless.\n </p>\n </div>\n <div className=\"flex flex-row gap-4\">\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\">\n <rect width=\"48\" height=\"48\" rx=\"24\" fill=\"#45BE8B\"></rect>\n <path\n d=\"M14.1412 22.4427L17.5803 16.5199C17.7671 16.1981 18.1112 16 18.4834 16H20.8581C21.653 16 22.1565 16.8528 21.7725 17.5488L19.3042 22.0225C19.2202 22.1747 19.1762 22.3458 19.1762 22.5196C19.1762 23.0879 19.6369 23.5486 20.2052 23.5486H21.5827C22.1594 23.5486 22.627 24.0162 22.627 24.5929V31.347C22.627 31.9237 22.1594 32.3913 21.5827 32.3913H15.0443C14.4676 32.3913 14 31.9237 14 31.347V22.9671C14 22.7829 14.0487 22.602 14.1412 22.4427Z\"\n fill=\"#FFFFFF\"\n ></path>\n <path\n d=\"M25.356 22.4427L28.7951 16.5199C28.982 16.1981 29.326 16 29.6982 16H32.0729C32.8679 16 33.3713 16.8528 32.9873 17.5488L30.5191 22.0225C30.4351 22.1747 30.391 22.3458 30.391 22.5196C30.391 23.0879 30.8518 23.5486 31.4201 23.5486H32.7975C33.3743 23.5486 33.8418 24.0162 33.8418 24.5929V31.347C33.8418 31.9237 33.3743 32.3913 32.7975 32.3913H26.2592C25.6824 32.3913 25.2148 31.9237 25.2148 31.347V22.9671C25.2148 22.7829 25.2636 22.602 25.356 22.4427Z\"\n fill=\"#FFFFFF\"\n ></path>\n </svg>\n <span className=\"border border-l \"></span>{\" \"}\n <div>\n <strong>Brent Lassi</strong>\n <div> Chief Information Security Officer</div>\n </div>\n {/* <div>\n <img\n src=\"https://www.datocms-assets.com/55802/1636449069-bluecore-logo-dark.svg\"\n title=\"Logo of Brent Lassi\"\n alt=\"Logo of Brent Lassi\"\n />\n </div> */}\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Input } from \"../../elements/Input\"\nimport { Button } from \"../../elements/Button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"../../elements/Card\"\n\ntype TLeadGenerator = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n texts: {\n title: string\n subtitle: string\n submit: string\n }\n handleNewsletterSub: (e: string) => void\n}\n\nexport const LeadGenerator: FC<TLeadGenerator> = ({\n variant = \"contained\",\n texts,\n handleNewsletterSub,\n}) => {\n return (\n <Card>\n <CardHeader>\n <CardTitle>{texts?.title}</CardTitle>\n <CardDescription>{texts?.subtitle}</CardDescription>\n </CardHeader>\n <CardContent>\n <form\n className=\"flex flex-row gap-2\"\n onSubmit={(e) => {\n e.preventDefault()\n handleNewsletterSub(e.target[0].value)\n }}\n >\n <Input type=\"email\" name=\"email\" placeholder=\"example@sikka.io\" />\n <Button>{texts?.submit ?? \"Submit\"}</Button>\n </form>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent, CardFooter } from \"../../elements/Card\"\nimport { Button } from \"../../elements/Button\"\n\ntype AnnouncementTypes = {\n variant?: \"outlined\" | \"contained\" | \"neobrutalism\"\n onActionClick: () => void\n actionText?: string\n title?: string\n subtitle?: string\n}\n\nexport const Announcement: FC<AnnouncementTypes> = ({\n variant = \"contained\",\n onActionClick,\n ...props\n}) => {\n return (\n <Card>\n <CardContent\n headless\n className=\"flex flex-row items-center justify-between\"\n >\n <div className=\"flex flex-col items-start justify-center \">\n <span className=\"text-lg font-bold\">{props.title}</span>\n <span className=\"text-sm\">{props.subtitle}</span>\n </div>\n <Button onClick={() => onActionClick()}>{props.actionText}</Button>\n </CardContent>\n </Card>\n )\n}\n","import React, { FC } from \"react\"\nimport { Card, CardContent } from \"../../elements/Card\"\n\ntype TNoPermission = {\n texts?: {\n title: string\n subtitle: string\n }\n}\n\nexport const NoPermission: FC<TNoPermission> = ({ texts }) => {\n return (\n <Card>\n <CardContent headless>\n <div className=\"flex flex-col items-center justify-center text-center\">\n <div className=\"flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 448 512\"\n height=\"0.35em\"\n width=\"0.35em\"\n >\n <path d=\"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z\"></path>\n </svg>{\" \"}\n </div>\n <div className=\"m-2 text-xl font-bold\">\n {texts?.title ?? \"You don't have permission\"}\n </div>\n <div>\n {texts?.subtitle ??\n \"If you think this is a problem please contact your administrator or our customer support\"}\n </div>\n </div>\n </CardContent>\n </Card>\n )\n}\n","import React, { useEffect, useRef, useState } from \"react\";\n\nfunction useHover() {\n const [value, setValue] = useState(false);\n const ref = useRef(null);\n const handleMouseOver = () => setValue(true);\n const handleMouseOut = () => setValue(false);\n useEffect(\n () => {\n const node = ref.current;\n if (node) {\n node.addEventListener(\"mouseover\", handleMouseOver);\n node.addEventListener(\"mouseout\", handleMouseOut);\n return () => {\n node.removeEventListener(\"mouseover\", handleMouseOver);\n node.removeEventListener(\"mouseout\", handleMouseOut);\n };\n }\n },\n [ref.current] // Recall only if ref changes\n );\n return [ref, value];\n}\n\nexport default useHover;\n","// useFocusWithin hook detects if any element within has focus, it works the same way as :focus-within CSS selector:\n\nimport { useRef, useState, useEffect } from \"react\"\n\n// Define options for the useFocusWithin hook, which includes onFocus and onBlur callbacks.\nexport interface UseFocusWithinOptions {\n onFocus?(event: FocusEvent): void\n onBlur?(event: FocusEvent): void\n}\n\n// Function to check if the event's related target is contained within the current target.\nfunction containsRelatedTarget(event: FocusEvent) {\n if (\n event.currentTarget instanceof HTMLElement &&\n event.relatedTarget instanceof HTMLElement\n ) {\n return event.currentTarget.contains(event.relatedTarget)\n }\n\n return false\n}\n\n// Custom React hook for handling focus events within an element.\nexport function useFocusWithin<T extends HTMLElement = any>({\n onBlur,\n onFocus,\n}: UseFocusWithinOptions = {}): {\n ref: React.MutableRefObject<T>\n focused: boolean\n} {\n // Create a ref to hold the target element.\n const ref = useRef<T>()\n\n // State to track if the element is focused.\n const [focused, _setFocused] = useState(false)\n\n // Create a ref to store the focused state.\n const focusedRef = useRef(false)\n\n // Function to set the focused state and update the ref.\n const setFocused = (value: boolean) => {\n _setFocused(value)\n focusedRef.current = value\n }\n\n // Handle focus-in event: when the element gains focus.\n const handleFocusIn = (event: FocusEvent) => {\n if (!focusedRef.current) {\n setFocused(true)\n onFocus?.(event) // Call the onFocus callback if provided.\n }\n }\n\n // Handle focus-out event: when the element loses focus.\n const handleFocusOut = (event: FocusEvent) => {\n if (focusedRef.current && !containsRelatedTarget(event)) {\n setFocused(false)\n onBlur?.(event) // Call the onBlur callback if provided.\n }\n }\n\n // Attach event listeners for focusin and focusout events.\n useEffect(() => {\n if (ref.current) {\n ref.current.addEventListener(\"focusin\", handleFocusIn)\n ref.current.addEventListener(\"focusout\", handleFocusOut)\n\n // Clean up event listeners when the component unmounts.\n return () => {\n ref.current?.removeEventListener(\"focusin\", handleFocusIn)\n ref.current?.removeEventListener(\"focusout\", handleFocusOut)\n }\n }\n\n return undefined\n }, [handleFocusIn, handleFocusOut])\n\n // Return the ref and focused state.\n return { ref, focused }\n}\n","import { useState, useEffect, useRef } from \"react\"\n\nexport interface UseMediaQueryOptions {\n getInitialValueInEffect: boolean\n}\n\ntype MediaQueryCallback = (event: { matches: boolean; media: string }) => void\n\n/**\n * Older versions of Safari (shipped withCatalina and before) do not support addEventListener on matchMedia\n * https://stackoverflow.com/questions/56466261/matchmedia-addlistener-marked-as-deprecated-addeventlistener-equivalent\n * */\nfunction attachMediaListener(\n query: MediaQueryList,\n callback: MediaQueryCallback\n) {\n try {\n query.addEventListener(\"change\", callback)\n return () => query.removeEventListener(\"change\", callback)\n } catch (e) {\n query.addListener(callback)\n return () => query.removeListener(callback)\n }\n}\n\nfunction getInitialValue(query: string, initialValue?: boolean) {\n if (typeof initialValue === \"boolean\") {\n return initialValue\n }\n\n if (typeof window !== \"undefined\" && \"matchMedia\" in window) {\n return window.matchMedia(query).matches\n }\n\n return false\n}\n\nexport function useMediaQuery(\n query: string,\n initialValue?: boolean,\n { getInitialValueInEffect }: UseMediaQueryOptions = {\n getInitialValueInEffect: true,\n }\n) {\n const [matches, setMatches] = useState(\n getInitialValueInEffect\n ? initialValue\n : getInitialValue(query, initialValue)\n )\n const queryRef = useRef<MediaQueryList>()\n\n useEffect(() => {\n if (\"matchMedia\" in window) {\n queryRef.current = window.matchMedia(query)\n setMatches(queryRef.current.matches)\n return attachMediaListener(queryRef.current, (event) =>\n setMatches(event.matches)\n )\n }\n\n return undefined\n }, [query])\n\n return matches\n}\n","import React, { useState, useEffect, useRef } from \"react\";\n\nfunction useScrollPosition(ref) {\n const [scrollPosition, setScrollPosition] = useState(0);\n // const savedRef = useRef();\n\n // useEffect(() => {\n // savedRef.current = ref;\n // }, [ref]);\n\n useEffect(() => {\n function handleScroll() {\n setScrollPosition(ref.current.scrollTop);\n }\n\n if (ref.current) {\n ref.current.addEventListener(\"scroll\", handleScroll);\n }\n\n return () => {\n if (ref.current) {\n ref.current.removeEventListener(\"scroll\", handleScroll);\n }\n };\n }, [ref]);\n\n return scrollPosition;\n}\n\nexport default useScrollPosition;\n","import { useEffect, useState } from \"react\"\n\nfunction useTabs(initialTab = \"\") {\n const [activeTab, setActiveTab] = useState(initialTab)\n\n // Listen to hash changes in the URL\n useEffect(() => {\n const handleHashChange = () => {\n const hash = window.location.hash.substring(1)\n setActiveTab(hash || initialTab)\n }\n\n window.addEventListener(\"hashchange\", handleHashChange)\n\n // Initialize the tab based on the initial hash\n handleHashChange()\n\n return () => {\n // Remove the event listener when the component unmounts\n window.removeEventListener(\"hashchange\", handleHashChange)\n }\n }, [initialTab])\n\n const handleTabChange = (index) => {\n setActiveTab(index)\n\n // Update the URL hash when the tab changes\n window.location.hash = index\n }\n\n return {\n activeTab,\n handleTabChange,\n }\n}\n\nexport { useTabs }\n","import { useEffect } from \"react\"\n\nexport function useWindowEvent<K extends string = keyof WindowEventMap>(\n type: K,\n listener: K extends keyof WindowEventMap\n ? (this: Window, ev: WindowEventMap[K]) => void\n : (this: Window, ev: CustomEvent) => void,\n options?: boolean | AddEventListenerOptions\n) {\n useEffect(() => {\n window.addEventListener(type, listener, options)\n return () => window.removeEventListener(type, listener, options)\n }, [type, listener])\n}\n","import { useState, useEffect } from \"react\"\nimport { useWindowEvent } from \"./useWindowEvent\"\n\ninterface ScrollPosition {\n x: number\n y: number\n}\n\nfunction getScrollPosition(): ScrollPosition {\n return typeof window !== \"undefined\"\n ? { x: window.pageXOffset, y: window.pageYOffset }\n : { x: 0, y: 0 }\n}\n\nfunction scrollTo({ x, y }: Partial<ScrollPosition>) {\n if (typeof window !== \"undefined\") {\n const scrollOptions: ScrollToOptions = { behavior: \"smooth\" }\n\n if (typeof x === \"number\") {\n scrollOptions.left = x\n }\n\n if (typeof y === \"number\") {\n scrollOptions.top = y\n }\n\n window.scrollTo(scrollOptions)\n }\n}\n\nexport function useWindowScroll() {\n const [position, setPosition] = useState<ScrollPosition>({ x: 0, y: 0 })\n\n useWindowEvent(\"scroll\", () => setPosition(getScrollPosition()))\n useWindowEvent(\"resize\", () => setPosition(getScrollPosition()))\n\n useEffect(() => {\n setPosition(getScrollPosition())\n }, [])\n\n return [position, scrollTo] as const\n}\n"]}
|