@sikka/hawa 0.49.13-next → 0.49.14-next

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.
Files changed (62) hide show
  1. package/dist/appLayout/index.js +0 -2
  2. package/dist/appLayout/index.js.map +1 -1
  3. package/dist/appLayout/index.mjs +0 -2
  4. package/dist/appLayout/index.mjs.map +1 -1
  5. package/dist/appTopbar/index.js +0 -2
  6. package/dist/appTopbar/index.js.map +1 -1
  7. package/dist/appTopbar/index.mjs +0 -2
  8. package/dist/appTopbar/index.mjs.map +1 -1
  9. package/dist/blocks/auth/index.js +13 -14
  10. package/dist/blocks/auth/index.mjs +13 -14
  11. package/dist/blocks/index.js +13 -16
  12. package/dist/blocks/index.mjs +3 -5
  13. package/dist/blocks/misc/index.js +0 -1
  14. package/dist/blocks/misc/index.mjs +0 -1
  15. package/dist/{chunk-WQR4XZGL.mjs → chunk-3AANFRLZ.mjs} +0 -2
  16. package/dist/{chunk-XWNN7K63.mjs → chunk-FTS7YP7U.mjs} +15 -15
  17. package/dist/{chunk-3CHFVHTW.mjs → chunk-QQ7C5DWR.mjs} +1 -1
  18. package/dist/{chunk-KDGJZPWK.mjs → chunk-YGLAEAJY.mjs} +0 -1
  19. package/dist/combobox/index.js +0 -1
  20. package/dist/combobox/index.js.map +1 -1
  21. package/dist/combobox/index.mjs +0 -1
  22. package/dist/combobox/index.mjs.map +1 -1
  23. package/dist/command/index.js +0 -1
  24. package/dist/command/index.js.map +1 -1
  25. package/dist/command/index.mjs +0 -1
  26. package/dist/command/index.mjs.map +1 -1
  27. package/dist/dataTable/index.js +0 -1
  28. package/dist/dataTable/index.js.map +1 -1
  29. package/dist/dataTable/index.mjs +0 -1
  30. package/dist/dataTable/index.mjs.map +1 -1
  31. package/dist/dialog/index.js +0 -1
  32. package/dist/dialog/index.js.map +1 -1
  33. package/dist/dialog/index.mjs +0 -1
  34. package/dist/dialog/index.mjs.map +1 -1
  35. package/dist/dropdownMenu/index.js +0 -1
  36. package/dist/dropdownMenu/index.js.map +1 -1
  37. package/dist/dropdownMenu/index.mjs +0 -1
  38. package/dist/dropdownMenu/index.mjs.map +1 -1
  39. package/dist/elements/index.js +13 -15
  40. package/dist/elements/index.mjs +4 -5
  41. package/dist/hooks/index.js +0 -2
  42. package/dist/hooks/index.mjs +1 -1
  43. package/dist/index.css +108 -110
  44. package/dist/index.js +13 -21
  45. package/dist/index.mjs +13 -21
  46. package/dist/layout/index.js +0 -3
  47. package/dist/layout/index.mjs +2 -4
  48. package/dist/phoneInput/index.js.map +1 -1
  49. package/dist/phoneInput/index.mjs.map +1 -1
  50. package/dist/pinInput/index.js +13 -13
  51. package/dist/pinInput/index.js.map +1 -1
  52. package/dist/pinInput/index.mjs +13 -13
  53. package/dist/pinInput/index.mjs.map +1 -1
  54. package/dist/select/index.js.map +1 -1
  55. package/dist/select/index.mjs.map +1 -1
  56. package/dist/splitButton/index.js +0 -1
  57. package/dist/splitButton/index.js.map +1 -1
  58. package/dist/splitButton/index.mjs +0 -1
  59. package/dist/splitButton/index.mjs.map +1 -1
  60. package/dist/tabs/index.js.map +1 -1
  61. package/dist/tabs/index.mjs.map +1 -1
  62. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/dropdownMenu/DropdownMenu.tsx","../../util/index.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport { Portal } from \"@headlessui/react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, RadioOptionType } from \"../../types/commonTypes\";\n\nconst DropdownMenuRoot = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\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 \"hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none focus:hawa-bg-accent data-[state=open]:hawa-bg-accent\",\n inset && \"hawa-pl-8\",\n className,\n )}\n {...props}\n >\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-2\">{children}</div>{\" \"}\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\" ? \"hawa-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 = 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 \"hawa-z-50 hawa-min-w-[8rem] hawa-gap-1 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-lg data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = 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 <Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-md data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </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 shortcut?: React.ReactNode;\n badged?: boolean;\n slug?: string;\n LinkComponent?: any;\n }\n>(({ className, inset, badged, slug, LinkComponent = \"a\", ...props }, ref) => {\n return (\n <LinkComponent href={slug}>\n <DropdownMenuPrimitive.Item\n disabled={props.disabled}\n ref={ref}\n className={cn(\n \"hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50\",\n inset && \"hawa-pl-8\",\n props.end && Array.isArray(props.children) && props.children[1] && \"hawa-gap-6\",\n className,\n )}\n {...props}\n >\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-2\">{props.children}</div>\n\n {props.end && props.end}\n {!props.end && props.shortcut && (\n <DropdownMenuShortcut>{props.shortcut}</DropdownMenuShortcut>\n )}\n {!props.end && badged && (\n <div className=\"hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500\" />\n )}\n </DropdownMenuPrimitive.Item>\n </LinkComponent>\n );\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 \"hawa-relative hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-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 = 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 \"hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\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=\"hawa-h-2 hawa-w-2 hawa-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 \"hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-font-semibold\",\n inset && \"hawa-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(\"hawa--mx-1 hawa-my-1 hawa-h-px hawa-bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"hawa-text-xs hawa-tracking-widest hawa-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?: any;\n icon?: any;\n action?: () => void;\n onMiddleClick?: (e: any) => void;\n highlighted?: boolean;\n disabled?: boolean;\n slug?: string;\n};\nexport type MenuItemType = {\n icon?: React.ReactNode;\n label?: string;\n shortcut?: React.ReactNode;\n badged?: boolean;\n value?: any;\n content?: any;\n slug?: string;\n end?: any;\n presist?: boolean;\n itemType?: \"separator\" | \"label\" | \"custom\" | \"radio\";\n action?: () => void;\n highlighted?: boolean;\n subitems?: SubItem[];\n options?: RadioOptionType[];\n currentOption?: string;\n onOptionChange?: (value: string) => void;\n disabled?: boolean;\n onMiddleClick?: (e: any) => void;\n onClick?: any;\n};\ninterface DropdownMenuProps {\n trigger?: any;\n items: MenuItemType[];\n direction?: DirectionType;\n classNames?: {\n trigger?: string;\n content?: string;\n item?: string;\n separator?: string;\n };\n className?: ExtendedDropdownMenuContentProps[\"className\"];\n triggerClassname?: ExtendedDropdownMenuTriggerProps[\"className\"];\n triggerProps?: DropdownMenuPrimitive.DropdownMenuTriggerProps;\n sideOffset?: ExtendedDropdownMenuContentProps[\"sideOffset\"];\n side?: ExtendedDropdownMenuContentProps[\"side\"];\n align?: ExtendedDropdownMenuContentProps[\"align\"];\n alignOffset?: ExtendedDropdownMenuContentProps[\"alignOffset\"];\n contentProps?: ExtendedDropdownMenuContentProps;\n width?: \"default\" | \"sm\" | \"lg\" | \"parent\";\n size?: \"default\" | \"sm\";\n onItemSelect?: any;\n onOpenChange?: any;\n header?: React.ReactNode;\n open?: any;\n LinkComponent?: any;\n}\nconst DropdownMenu: React.FC<DropdownMenuProps> = ({\n trigger,\n items,\n direction,\n sideOffset,\n side,\n className,\n classNames,\n contentProps,\n triggerClassname,\n triggerProps,\n align,\n alignOffset,\n onItemSelect,\n size = \"default\",\n width = \"default\",\n header,\n onOpenChange,\n open,\n LinkComponent,\n}) => {\n const widthStyles = {\n default: \"hawa-min-w-[8rem]\",\n sm: \"hawa-w-fit\",\n lg: \"hawa-w-[200px]\",\n parent: \"ddm-w-parent\",\n };\n const sizeStyles = {\n default: \"hawa-px-2 hawa-py-3 \",\n sm: \"hawa-text-xs hawa-px-1.5 hawa-py-1.5 \",\n };\n let [values, setValues] = React.useState(items.map((item) => item.currentOption));\n\n return (\n <DropdownMenuRoot onOpenChange={onOpenChange} open={open} modal={false} dir={direction}>\n <DropdownMenuTrigger\n asChild\n className={cn(classNames?.trigger, triggerClassname)}\n {...triggerProps}\n >\n {trigger}\n </DropdownMenuTrigger>\n <Portal>\n <DropdownMenuContent\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n className,\n classNames?.content,\n widthStyles[width],\n \"hawa-flex hawa-flex-col hawa-gap-1 hawa-overflow-y-auto\",\n )}\n style={{\n maxHeight: \"var(--radix-dropdown-menu-content-available-height)\",\n }}\n {...contentProps}\n >\n {header && header}\n {items &&\n items.map((item, index) => {\n const ItemLinkComponent = item.slug ? LinkComponent : \"a\";\n if (item.itemType === \"separator\") {\n return <DropdownMenuSeparator key={index} className={classNames?.separator} />;\n } else if (item.itemType === \"label\") {\n return <DropdownMenuLabel key={index}>{item.label}</DropdownMenuLabel>;\n } else if (item.itemType === \"radio\") {\n let dd = item.currentOption;\n return (\n <DropdownMenuSub key={index}>\n <DropdownMenuSubTrigger dir={direction} className={cn(sizeStyles[size])}>\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent>\n <DropdownMenuRadioGroup\n value={values[index]}\n onValueChange={(e) => {\n let newValues = [...values];\n newValues[index] = e;\n setValues(newValues);\n console.log(\"changing to \", e);\n if (item.onOptionChange) {\n item.onOptionChange(e);\n }\n }}\n >\n {item.options?.map((opt, i) => (\n <DropdownMenuRadioItem key={i} value={opt.value}>\n {opt.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n );\n } else if (item.itemType === \"custom\") {\n return <div key={index}>{item.content}</div>;\n } else {\n return item.subitems ? (\n <DropdownMenuSub key={index}>\n <DropdownMenuSubTrigger dir={direction} className={cn(sizeStyles[size])}>\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuSubTrigger>\n <Portal>\n <DropdownMenuSubContent>\n {item.subitems.map((subitem, subIndex) => {\n const SubitemLinkComponent = subitem.slug ? LinkComponent : \"a\";\n return (\n <DropdownMenuItem\n key={subIndex}\n LinkComponent={SubitemLinkComponent}\n slug={subitem.slug}\n disabled={subitem.disabled}\n className={cn(\n sizeStyles[size],\n !item.icon && !item.label\n ? \"hawa-px-0 hawa-py-0 focus:hawa-bg-transparent\"\n : \"focus:hawa-bg-accent\",\n )}\n onMouseDown={(event: any) => {\n if (event.button === 1 || (event.button === 0 && event.ctrlKey)) {\n event.preventDefault(); // This line prevents the default behavior of the middle button\n if (subitem.onMiddleClick) {\n subitem.onMiddleClick(item.value);\n }\n }\n }}\n onSelect={() => {\n subitem.action && subitem.action();\n if (onItemSelect) {\n onItemSelect(subitem.value);\n }\n }}\n >\n {subitem.icon && subitem.icon}\n {subitem.label && subitem.label}\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuSubContent>\n </Portal>\n </DropdownMenuSub>\n ) : (\n <DropdownMenuItem\n LinkComponent={ItemLinkComponent}\n slug={item.slug}\n key={index}\n disabled={item.disabled}\n onMouseDown={(event: any) => {\n if (event.button === 1 || (event.button === 0 && event.ctrlKey)) {\n event.preventDefault(); // This line prevents the default behavior of the middle button\n if (item.onMiddleClick) {\n item.onMiddleClick(item.value);\n }\n }\n }}\n onClick={(event: any) => {\n if (item.onClick) {\n item.onClick(item.value);\n }\n }}\n onSelect={(e) => {\n if (item.presist) {\n e.preventDefault();\n }\n if (item.action) {\n item.action();\n if (onItemSelect) {\n onItemSelect(item.value);\n }\n } else {\n if (onItemSelect) {\n onItemSelect(item.value);\n }\n }\n }}\n end={item.end}\n shortcut={item.shortcut}\n badged={item.badged}\n className={cn(\n sizeStyles[size],\n !item.icon && !item.label\n ? \"hawa-px-0 hawa-py-0 focus:hawa-bg-transparent\"\n : \"focus:hawa-bg-accent\",\n item.presist && \"focus:hawa-bg-transparent\",\n classNames?.item,\n )}\n >\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuItem>\n );\n }\n })}\n </DropdownMenuContent>\n </Portal>\n </DropdownMenuRoot>\n );\n};\n\ninterface DropdownMenuRadioOptionType extends RadioOptionType {\n props?: Omit<DropdownMenuPrimitive.DropdownMenuItemProps, \"value\" | \"label\">;\n}\n\ninterface DropdownMenuRadioProps {\n trigger?: React.ReactNode;\n side?: ExtendedDropdownMenuContentProps[\"side\"];\n align?: ExtendedDropdownMenuContentProps[\"align\"];\n options: DropdownMenuRadioOptionType[];\n value: string;\n onValueChange: any;\n label?: string;\n contentProps?: ExtendedDropdownMenuContentProps;\n radioGroupProps?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>;\n}\nconst DropdownMenuRadio: React.FC<DropdownMenuRadioProps> = (props) => {\n const ariaLabel = props.label ? `${props.label} radio group` : undefined;\n const ariaLabelledby = props.label ? `${props.label}-label` : undefined;\n\n return (\n <DropdownMenuRoot>\n <DropdownMenuTrigger asChild>{props.trigger}</DropdownMenuTrigger>\n <DropdownMenuContent\n align={props.align}\n side={props.side}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n {...props.contentProps}\n >\n {props.label && (\n <>\n <DropdownMenuLabel id={`${props.label}-label`}>{props.label}</DropdownMenuLabel>\n <DropdownMenuSeparator />\n </>\n )}\n <DropdownMenuRadioGroup\n value={props.value}\n onValueChange={props.onValueChange}\n {...props.radioGroupProps}\n >\n {props.options.map((opt, i) => (\n <DropdownMenuRadioItem\n key={i}\n {...opt.props}\n value={opt.value}\n aria-checked={props.value === opt.value}\n >\n {opt.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenuRoot>\n );\n};\n\nexport {\n DropdownMenu,\n DropdownMenuRoot,\n DropdownMenuRadio,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n Portal as DropdownMenuPortal,\n};\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(sanitizedHex);\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\nexport function 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}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * 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"],"mappings":";;;AAAA,YAAY,WAAW;AAEvB,SAAS,cAAc;AACvB,YAAY,2BAA2B;;;ACHvC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADGA,IAAM,mBAAyC;AAC/C,IAAM,sBAA4C;AAClD,IAAM,oBAA0C;AAChD,IAAM,kBAAwC;AAC9C,IAAM,yBAA+C;AAErD,IAAM,yBAA+B,iBAKnC,CAAC,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAC3C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AAAA,EAEJ,oCAAC,SAAI,WAAU,0DAAwD,QAAS;AAAA,EAAO;AAAA,EACvF;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,QAAO;AAAA,MACP,MAAK;AAAA,MACL,aAAY;AAAA,MACZ,SAAQ;AAAA,MACR,QAAO;AAAA,MACP,OAAM;AAAA,MACN,WAAW,GAAG,MAAM,QAAQ,QAAQ,oBAAoB,EAAE;AAAA;AAAA,IAE1D;AAAA,MAAC;AAAA;AAAA,QACC,UAAS;AAAA,QACT,GAAE;AAAA;AAAA,IACH;AAAA,EACH;AACF,CACD;AACD,uBAAuB,cAAoC,iCAAW;AAEtE,IAAM,yBAA+B,iBAGnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,uBAAuB,c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AM,UAAU,IAAI;AAAA;AAAA,QAEjC,IAAI;AAAA,MACP,CACD;AAAA,IACH;AAAA,EACF,CACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../elements/dropdownMenu/DropdownMenu.tsx","../../util/index.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport { Portal } from \"@headlessui/react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, RadioOptionType } from \"../../types/commonTypes\";\n\nconst DropdownMenuRoot = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\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 \"hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none focus:hawa-bg-accent data-[state=open]:hawa-bg-accent\",\n inset && \"hawa-pl-8\",\n className,\n )}\n {...props}\n >\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-2\">{children}</div>{\" \"}\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\" ? \"hawa-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 = 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 \"hawa-z-50 hawa-min-w-[8rem] hawa-gap-1 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-lg data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = 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 <Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-md data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </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 shortcut?: React.ReactNode;\n badged?: boolean;\n slug?: string;\n LinkComponent?: any;\n }\n>(({ className, inset, badged, slug, LinkComponent = \"a\", ...props }, ref) => {\n return (\n <LinkComponent href={slug}>\n <DropdownMenuPrimitive.Item\n disabled={props.disabled}\n ref={ref}\n className={cn(\n \"hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50\",\n inset && \"hawa-pl-8\",\n props.end && Array.isArray(props.children) && props.children[1] && \"hawa-gap-6\",\n className,\n )}\n {...props}\n >\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-2\">{props.children}</div>\n\n {props.end && props.end}\n {!props.end && props.shortcut && (\n <DropdownMenuShortcut>{props.shortcut}</DropdownMenuShortcut>\n )}\n {!props.end && badged && (\n <div className=\"hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500\" />\n )}\n </DropdownMenuPrimitive.Item>\n </LinkComponent>\n );\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 \"hawa-relative hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-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 = 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 \"hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\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=\"hawa-h-2 hawa-w-2 hawa-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 \"hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-font-semibold\",\n inset && \"hawa-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(\"hawa--mx-1 hawa-my-1 hawa-h-px hawa-bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"hawa-text-xs hawa-tracking-widest hawa-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?: any;\n icon?: any;\n action?: () => void;\n onMiddleClick?: (e: any) => void;\n highlighted?: boolean;\n disabled?: boolean;\n slug?: string;\n};\nexport type MenuItemType = {\n icon?: React.ReactNode;\n label?: string;\n shortcut?: React.ReactNode;\n badged?: boolean;\n value?: any;\n content?: any;\n slug?: string;\n end?: any;\n presist?: boolean;\n itemType?: \"separator\" | \"label\" | \"custom\" | \"radio\";\n action?: () => void;\n highlighted?: boolean;\n subitems?: SubItem[];\n options?: RadioOptionType[];\n currentOption?: string;\n onOptionChange?: (value: string) => void;\n disabled?: boolean;\n onMiddleClick?: (e: any) => void;\n onClick?: any;\n};\ninterface DropdownMenuProps {\n trigger?: any;\n items: MenuItemType[];\n direction?: DirectionType;\n classNames?: {\n trigger?: string;\n content?: string;\n item?: string;\n separator?: string;\n };\n className?: ExtendedDropdownMenuContentProps[\"className\"];\n triggerClassname?: ExtendedDropdownMenuTriggerProps[\"className\"];\n triggerProps?: DropdownMenuPrimitive.DropdownMenuTriggerProps;\n sideOffset?: ExtendedDropdownMenuContentProps[\"sideOffset\"];\n side?: ExtendedDropdownMenuContentProps[\"side\"];\n align?: ExtendedDropdownMenuContentProps[\"align\"];\n alignOffset?: ExtendedDropdownMenuContentProps[\"alignOffset\"];\n contentProps?: ExtendedDropdownMenuContentProps;\n width?: \"default\" | \"sm\" | \"lg\" | \"parent\";\n size?: \"default\" | \"sm\";\n onItemSelect?: any;\n onOpenChange?: any;\n header?: React.ReactNode;\n open?: any;\n LinkComponent?: any;\n}\nconst DropdownMenu: React.FC<DropdownMenuProps> = ({\n trigger,\n items,\n direction,\n sideOffset,\n side,\n className,\n classNames,\n contentProps,\n triggerClassname,\n triggerProps,\n align,\n alignOffset,\n onItemSelect,\n size = \"default\",\n width = \"default\",\n header,\n onOpenChange,\n open,\n LinkComponent,\n}) => {\n const widthStyles = {\n default: \"hawa-min-w-[8rem]\",\n sm: \"hawa-w-fit\",\n lg: \"hawa-w-[200px]\",\n parent: \"ddm-w-parent\",\n };\n const sizeStyles = {\n default: \"hawa-px-2 hawa-py-3 \",\n sm: \"hawa-text-xs hawa-px-1.5 hawa-py-1.5 \",\n };\n let [values, setValues] = React.useState(items.map((item) => item.currentOption));\n\n return (\n <DropdownMenuRoot onOpenChange={onOpenChange} open={open} modal={false} dir={direction}>\n <DropdownMenuTrigger\n asChild\n className={cn(classNames?.trigger, triggerClassname)}\n {...triggerProps}\n >\n {trigger}\n </DropdownMenuTrigger>\n <Portal>\n <DropdownMenuContent\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n className,\n classNames?.content,\n widthStyles[width],\n \"hawa-flex hawa-flex-col hawa-gap-1 hawa-overflow-y-auto\",\n )}\n style={{\n maxHeight: \"var(--radix-dropdown-menu-content-available-height)\",\n }}\n {...contentProps}\n >\n {header && header}\n {items &&\n items.map((item, index) => {\n const ItemLinkComponent = item.slug ? LinkComponent : \"a\";\n if (item.itemType === \"separator\") {\n return <DropdownMenuSeparator key={index} className={classNames?.separator} />;\n } else if (item.itemType === \"label\") {\n return <DropdownMenuLabel key={index}>{item.label}</DropdownMenuLabel>;\n } else if (item.itemType === \"radio\") {\n let dd = item.currentOption;\n return (\n <DropdownMenuSub key={index}>\n <DropdownMenuSubTrigger dir={direction} className={cn(sizeStyles[size])}>\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent>\n <DropdownMenuRadioGroup\n value={values[index]}\n onValueChange={(e) => {\n let newValues = [...values];\n newValues[index] = e;\n setValues(newValues);\n if (item.onOptionChange) {\n item.onOptionChange(e);\n }\n }}\n >\n {item.options?.map((opt, i) => (\n <DropdownMenuRadioItem key={i} value={opt.value}>\n {opt.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n );\n } else if (item.itemType === \"custom\") {\n return <div key={index}>{item.content}</div>;\n } else {\n return item.subitems ? (\n <DropdownMenuSub key={index}>\n <DropdownMenuSubTrigger dir={direction} className={cn(sizeStyles[size])}>\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuSubTrigger>\n <Portal>\n <DropdownMenuSubContent>\n {item.subitems.map((subitem, subIndex) => {\n const SubitemLinkComponent = subitem.slug ? LinkComponent : \"a\";\n return (\n <DropdownMenuItem\n key={subIndex}\n LinkComponent={SubitemLinkComponent}\n slug={subitem.slug}\n disabled={subitem.disabled}\n className={cn(\n sizeStyles[size],\n !item.icon && !item.label\n ? \"hawa-px-0 hawa-py-0 focus:hawa-bg-transparent\"\n : \"focus:hawa-bg-accent\",\n )}\n onMouseDown={(event: any) => {\n if (event.button === 1 || (event.button === 0 && event.ctrlKey)) {\n event.preventDefault(); // This line prevents the default behavior of the middle button\n if (subitem.onMiddleClick) {\n subitem.onMiddleClick(item.value);\n }\n }\n }}\n onSelect={() => {\n subitem.action && subitem.action();\n if (onItemSelect) {\n onItemSelect(subitem.value);\n }\n }}\n >\n {subitem.icon && subitem.icon}\n {subitem.label && subitem.label}\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuSubContent>\n </Portal>\n </DropdownMenuSub>\n ) : (\n <DropdownMenuItem\n LinkComponent={ItemLinkComponent}\n slug={item.slug}\n key={index}\n disabled={item.disabled}\n onMouseDown={(event: any) => {\n if (event.button === 1 || (event.button === 0 && event.ctrlKey)) {\n event.preventDefault(); // This line prevents the default behavior of the middle button\n if (item.onMiddleClick) {\n item.onMiddleClick(item.value);\n }\n }\n }}\n onClick={(event: any) => {\n if (item.onClick) {\n item.onClick(item.value);\n }\n }}\n onSelect={(e) => {\n if (item.presist) {\n e.preventDefault();\n }\n if (item.action) {\n item.action();\n if (onItemSelect) {\n onItemSelect(item.value);\n }\n } else {\n if (onItemSelect) {\n onItemSelect(item.value);\n }\n }\n }}\n end={item.end}\n shortcut={item.shortcut}\n badged={item.badged}\n className={cn(\n sizeStyles[size],\n !item.icon && !item.label\n ? \"hawa-px-0 hawa-py-0 focus:hawa-bg-transparent\"\n : \"focus:hawa-bg-accent\",\n item.presist && \"focus:hawa-bg-transparent\",\n classNames?.item,\n )}\n >\n {item.icon && item.icon}\n {item.label && item.label}\n </DropdownMenuItem>\n );\n }\n })}\n </DropdownMenuContent>\n </Portal>\n </DropdownMenuRoot>\n );\n};\n\ninterface DropdownMenuRadioOptionType extends RadioOptionType {\n props?: Omit<DropdownMenuPrimitive.DropdownMenuItemProps, \"value\" | \"label\">;\n}\n\ninterface DropdownMenuRadioProps {\n trigger?: React.ReactNode;\n side?: ExtendedDropdownMenuContentProps[\"side\"];\n align?: ExtendedDropdownMenuContentProps[\"align\"];\n options: DropdownMenuRadioOptionType[];\n value: string;\n onValueChange: any;\n label?: string;\n contentProps?: ExtendedDropdownMenuContentProps;\n radioGroupProps?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>;\n}\nconst DropdownMenuRadio: React.FC<DropdownMenuRadioProps> = (props) => {\n const ariaLabel = props.label ? `${props.label} radio group` : undefined;\n const ariaLabelledby = props.label ? `${props.label}-label` : undefined;\n\n return (\n <DropdownMenuRoot>\n <DropdownMenuTrigger asChild>{props.trigger}</DropdownMenuTrigger>\n <DropdownMenuContent\n align={props.align}\n side={props.side}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n {...props.contentProps}\n >\n {props.label && (\n <>\n <DropdownMenuLabel id={`${props.label}-label`}>{props.label}</DropdownMenuLabel>\n <DropdownMenuSeparator />\n </>\n )}\n <DropdownMenuRadioGroup\n value={props.value}\n onValueChange={props.onValueChange}\n {...props.radioGroupProps}\n >\n {props.options.map((opt, i) => (\n <DropdownMenuRadioItem\n key={i}\n {...opt.props}\n value={opt.value}\n aria-checked={props.value === opt.value}\n >\n {opt.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenuRoot>\n );\n};\n\nexport {\n DropdownMenu,\n DropdownMenuRoot,\n DropdownMenuRadio,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n Portal as DropdownMenuPortal,\n};\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(sanitizedHex);\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\nexport function 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}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * 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"],"mappings":";;;AAAA,YAAY,WAAW;AAEvB,SAAS,cAAc;AACvB,YAAY,2BAA2B;;;ACHvC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADGA,IAAM,mBAAyC;AAC/C,IAAM,sBAA4C;AAClD,IAAM,oBAA0C;AAChD,IAAM,kBAAwC;AAC9C,IAAM,yBAA+C;AAErD,IAAM,yBAA+B,iBAKnC,CAAC,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAC3C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AAAA,EAEJ,oCAAC,SAAI,WAAU,0DAAwD,QAAS;AAAA,EAAO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AAQ,GAC5C;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,MAAM;AAAA,MACb,MAAM,MAAM;AAAA,MACZ,cAAY;AAAA,MACZ,mBAAiB;AAAA,MAChB,GAAG,MAAM;AAAA;AAAA,IAET,MAAM,SACL,0DACE,oCAAC,qBAAkB,IAAI,GAAG,MAAM,KAAK,YAAW,MAAM,KAAM,GAC5D,oCAAC,2BAAsB,CACzB;AAAA,IAEF;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,MAAM;AAAA,QACb,eAAe,MAAM;AAAA,QACpB,GAAG,MAAM;AAAA;AAAA,MAET,MAAM,QAAQ,IAAI,CAAC,KAAK,MACvB;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACJ,GAAG,IAAI;AAAA,UACR,OAAO,IAAI;AAAA,UACX,gBAAc,MAAM,UAAU,IAAI;AAAA;AAAA,QAEjC,IAAI;AAAA,MACP,CACD;AAAA,IACH;AAAA,EACF,CACF;AAEJ;","names":[]}
@@ -831,7 +831,6 @@ var DropdownMenu = ({
831
831
  let newValues = [...values];
832
832
  newValues[index] = e;
833
833
  setValues(newValues);
834
- console.log("changing to ", e);
835
834
  if (item.onOptionChange) {
836
835
  item.onOptionChange(e);
837
836
  }
@@ -2038,7 +2037,6 @@ var DialogSteps = ({ currentStep, visibleStepRef, children }) => {
2038
2037
  React14.useEffect(() => {
2039
2038
  if (visibleStepRef.current) {
2040
2039
  setDialogHeight(visibleStepRef.current.offsetHeight);
2041
- console.log("height is ", visibleStepRef.current.offsetHeight);
2042
2040
  }
2043
2041
  }, [currentStep, visibleStepRef]);
2044
2042
  return /* @__PURE__ */ React14.createElement(
@@ -6861,19 +6859,19 @@ var PhoneInput = ({
6861
6859
  var React50 = __toESM(require("react"));
6862
6860
  var import_input_otp = require("input-otp");
6863
6861
 
6864
- // ../../node_modules/.pnpm/lucide-react@0.438.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
6862
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
6865
6863
  var import_react41 = require("react");
6866
6864
 
6867
- // ../../node_modules/.pnpm/lucide-react@0.438.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
6865
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
6868
6866
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
6869
6867
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
6870
6868
  return Boolean(className) && array.indexOf(className) === index;
6871
6869
  }).join(" ");
6872
6870
 
6873
- // ../../node_modules/.pnpm/lucide-react@0.438.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
6871
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
6874
6872
  var import_react40 = require("react");
6875
6873
 
6876
- // ../../node_modules/.pnpm/lucide-react@0.438.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
6874
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
6877
6875
  var defaultAttributes = {
6878
6876
  xmlns: "http://www.w3.org/2000/svg",
6879
6877
  width: 24,
@@ -6886,7 +6884,7 @@ var defaultAttributes = {
6886
6884
  strokeLinejoin: "round"
6887
6885
  };
6888
6886
 
6889
- // ../../node_modules/.pnpm/lucide-react@0.438.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
6887
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
6890
6888
  var Icon = (0, import_react40.forwardRef)(
6891
6889
  ({
6892
6890
  color = "currentColor",
@@ -6918,7 +6916,7 @@ var Icon = (0, import_react40.forwardRef)(
6918
6916
  }
6919
6917
  );
6920
6918
 
6921
- // ../../node_modules/.pnpm/lucide-react@0.438.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
6919
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
6922
6920
  var createLucideIcon = (iconName, iconNode) => {
6923
6921
  const Component = (0, import_react41.forwardRef)(
6924
6922
  ({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
@@ -6932,7 +6930,7 @@ var createLucideIcon = (iconName, iconNode) => {
6932
6930
  return Component;
6933
6931
  };
6934
6932
 
6935
- // ../../node_modules/.pnpm/lucide-react@0.438.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
6933
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
6936
6934
  var Dot = createLucideIcon("Dot", [
6937
6935
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
6938
6936
  ]);
@@ -8387,7 +8385,7 @@ var PhoneMockup = ({
8387
8385
 
8388
8386
  lucide-react/dist/esm/shared/src/utils.js:
8389
8387
  (**
8390
- * @license lucide-react v0.438.0 - ISC
8388
+ * @license lucide-react v0.441.0 - ISC
8391
8389
  *
8392
8390
  * This source code is licensed under the ISC license.
8393
8391
  * See the LICENSE file in the root directory of this source tree.
@@ -8395,7 +8393,7 @@ lucide-react/dist/esm/shared/src/utils.js:
8395
8393
 
8396
8394
  lucide-react/dist/esm/defaultAttributes.js:
8397
8395
  (**
8398
- * @license lucide-react v0.438.0 - ISC
8396
+ * @license lucide-react v0.441.0 - ISC
8399
8397
  *
8400
8398
  * This source code is licensed under the ISC license.
8401
8399
  * See the LICENSE file in the root directory of this source tree.
@@ -8403,7 +8401,7 @@ lucide-react/dist/esm/defaultAttributes.js:
8403
8401
 
8404
8402
  lucide-react/dist/esm/Icon.js:
8405
8403
  (**
8406
- * @license lucide-react v0.438.0 - ISC
8404
+ * @license lucide-react v0.441.0 - ISC
8407
8405
  *
8408
8406
  * This source code is licensed under the ISC license.
8409
8407
  * See the LICENSE file in the root directory of this source tree.
@@ -8411,7 +8409,7 @@ lucide-react/dist/esm/Icon.js:
8411
8409
 
8412
8410
  lucide-react/dist/esm/createLucideIcon.js:
8413
8411
  (**
8414
- * @license lucide-react v0.438.0 - ISC
8412
+ * @license lucide-react v0.441.0 - ISC
8415
8413
  *
8416
8414
  * This source code is licensed under the ISC license.
8417
8415
  * See the LICENSE file in the root directory of this source tree.
@@ -8419,7 +8417,7 @@ lucide-react/dist/esm/createLucideIcon.js:
8419
8417
 
8420
8418
  lucide-react/dist/esm/icons/dot.js:
8421
8419
  (**
8422
- * @license lucide-react v0.438.0 - ISC
8420
+ * @license lucide-react v0.441.0 - ISC
8423
8421
  *
8424
8422
  * This source code is licensed under the ISC license.
8425
8423
  * See the LICENSE file in the root directory of this source tree.
@@ -8427,7 +8425,7 @@ lucide-react/dist/esm/icons/dot.js:
8427
8425
 
8428
8426
  lucide-react/dist/esm/lucide-react.js:
8429
8427
  (**
8430
- * @license lucide-react v0.438.0 - ISC
8428
+ * @license lucide-react v0.441.0 - ISC
8431
8429
  *
8432
8430
  * This source code is licensed under the ISC license.
8433
8431
  * See the LICENSE file in the root directory of this source tree.
@@ -26,10 +26,10 @@ import {
26
26
  TabsList,
27
27
  TabsTrigger,
28
28
  Textarea
29
- } from "../chunk-XWNN7K63.mjs";
29
+ } from "../chunk-FTS7YP7U.mjs";
30
30
  import {
31
31
  useClipboard
32
- } from "../chunk-WQR4XZGL.mjs";
32
+ } from "../chunk-3AANFRLZ.mjs";
33
33
  import {
34
34
  Sheet,
35
35
  SheetClose,
@@ -41,7 +41,7 @@ import {
41
41
  SheetPortal,
42
42
  SheetTitle,
43
43
  SheetTrigger
44
- } from "../chunk-3CHFVHTW.mjs";
44
+ } from "../chunk-QQ7C5DWR.mjs";
45
45
  import {
46
46
  Button,
47
47
  Card,
@@ -81,7 +81,7 @@ import {
81
81
  buttonVariants,
82
82
  calculateLuminance,
83
83
  cn
84
- } from "../chunk-KDGJZPWK.mjs";
84
+ } from "../chunk-YGLAEAJY.mjs";
85
85
  import {
86
86
  __require
87
87
  } from "../chunk-5SQBJRWE.mjs";
@@ -578,7 +578,6 @@ var DialogSteps = ({ currentStep, visibleStepRef, children }) => {
578
578
  React6.useEffect(() => {
579
579
  if (visibleStepRef.current) {
580
580
  setDialogHeight(visibleStepRef.current.offsetHeight);
581
- console.log("height is ", visibleStepRef.current.offsetHeight);
582
581
  }
583
582
  }, [currentStep, visibleStepRef]);
584
583
  return /* @__PURE__ */ React6.createElement(
@@ -185,13 +185,11 @@ var useDialogCarousel = (options) => {
185
185
  };
186
186
  const nextStep = () => {
187
187
  if (emblaApi) {
188
- console.log("going to NEXT \u{1F449}");
189
188
  emblaApi.scrollNext();
190
189
  }
191
190
  };
192
191
  const prevStep = () => {
193
192
  if (emblaApi) {
194
- console.log("going to BACK \u{1F448}");
195
193
  emblaApi.scrollPrev();
196
194
  }
197
195
  };
@@ -18,7 +18,7 @@ import {
18
18
  useViewportSize,
19
19
  useWindowEvent,
20
20
  useWindowSize
21
- } from "../chunk-WQR4XZGL.mjs";
21
+ } from "../chunk-3AANFRLZ.mjs";
22
22
  import {
23
23
  useBreakpoint,
24
24
  useClickOutside
package/dist/index.css CHANGED
@@ -1,5 +1,111 @@
1
- /*
2
- ! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com
1
+ *, ::before, ::after {
2
+ --tw-border-spacing-x: 0;
3
+ --tw-border-spacing-y: 0;
4
+ --tw-translate-x: 0;
5
+ --tw-translate-y: 0;
6
+ --tw-rotate: 0;
7
+ --tw-skew-x: 0;
8
+ --tw-skew-y: 0;
9
+ --tw-scale-x: 1;
10
+ --tw-scale-y: 1;
11
+ --tw-pan-x: ;
12
+ --tw-pan-y: ;
13
+ --tw-pinch-zoom: ;
14
+ --tw-scroll-snap-strictness: proximity;
15
+ --tw-gradient-from-position: ;
16
+ --tw-gradient-via-position: ;
17
+ --tw-gradient-to-position: ;
18
+ --tw-ordinal: ;
19
+ --tw-slashed-zero: ;
20
+ --tw-numeric-figure: ;
21
+ --tw-numeric-spacing: ;
22
+ --tw-numeric-fraction: ;
23
+ --tw-ring-inset: ;
24
+ --tw-ring-offset-width: 0px;
25
+ --tw-ring-offset-color: #fff;
26
+ --tw-ring-color: rgb(59 130 246 / 0.5);
27
+ --tw-ring-offset-shadow: 0 0 #0000;
28
+ --tw-ring-shadow: 0 0 #0000;
29
+ --tw-shadow: 0 0 #0000;
30
+ --tw-shadow-colored: 0 0 #0000;
31
+ --tw-blur: ;
32
+ --tw-brightness: ;
33
+ --tw-contrast: ;
34
+ --tw-grayscale: ;
35
+ --tw-hue-rotate: ;
36
+ --tw-invert: ;
37
+ --tw-saturate: ;
38
+ --tw-sepia: ;
39
+ --tw-drop-shadow: ;
40
+ --tw-backdrop-blur: ;
41
+ --tw-backdrop-brightness: ;
42
+ --tw-backdrop-contrast: ;
43
+ --tw-backdrop-grayscale: ;
44
+ --tw-backdrop-hue-rotate: ;
45
+ --tw-backdrop-invert: ;
46
+ --tw-backdrop-opacity: ;
47
+ --tw-backdrop-saturate: ;
48
+ --tw-backdrop-sepia: ;
49
+ --tw-contain-size: ;
50
+ --tw-contain-layout: ;
51
+ --tw-contain-paint: ;
52
+ --tw-contain-style: ;
53
+ }
54
+
55
+ ::backdrop {
56
+ --tw-border-spacing-x: 0;
57
+ --tw-border-spacing-y: 0;
58
+ --tw-translate-x: 0;
59
+ --tw-translate-y: 0;
60
+ --tw-rotate: 0;
61
+ --tw-skew-x: 0;
62
+ --tw-skew-y: 0;
63
+ --tw-scale-x: 1;
64
+ --tw-scale-y: 1;
65
+ --tw-pan-x: ;
66
+ --tw-pan-y: ;
67
+ --tw-pinch-zoom: ;
68
+ --tw-scroll-snap-strictness: proximity;
69
+ --tw-gradient-from-position: ;
70
+ --tw-gradient-via-position: ;
71
+ --tw-gradient-to-position: ;
72
+ --tw-ordinal: ;
73
+ --tw-slashed-zero: ;
74
+ --tw-numeric-figure: ;
75
+ --tw-numeric-spacing: ;
76
+ --tw-numeric-fraction: ;
77
+ --tw-ring-inset: ;
78
+ --tw-ring-offset-width: 0px;
79
+ --tw-ring-offset-color: #fff;
80
+ --tw-ring-color: rgb(59 130 246 / 0.5);
81
+ --tw-ring-offset-shadow: 0 0 #0000;
82
+ --tw-ring-shadow: 0 0 #0000;
83
+ --tw-shadow: 0 0 #0000;
84
+ --tw-shadow-colored: 0 0 #0000;
85
+ --tw-blur: ;
86
+ --tw-brightness: ;
87
+ --tw-contrast: ;
88
+ --tw-grayscale: ;
89
+ --tw-hue-rotate: ;
90
+ --tw-invert: ;
91
+ --tw-saturate: ;
92
+ --tw-sepia: ;
93
+ --tw-drop-shadow: ;
94
+ --tw-backdrop-blur: ;
95
+ --tw-backdrop-brightness: ;
96
+ --tw-backdrop-contrast: ;
97
+ --tw-backdrop-grayscale: ;
98
+ --tw-backdrop-hue-rotate: ;
99
+ --tw-backdrop-invert: ;
100
+ --tw-backdrop-opacity: ;
101
+ --tw-backdrop-saturate: ;
102
+ --tw-backdrop-sepia: ;
103
+ --tw-contain-size: ;
104
+ --tw-contain-layout: ;
105
+ --tw-contain-paint: ;
106
+ --tw-contain-style: ;
107
+ }/*
108
+ ! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com
3
109
  *//*
4
110
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
5
111
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
@@ -471,114 +577,6 @@ video {
471
577
  "rlig" 1,
472
578
  "calt" 1;
473
579
  }
474
-
475
- *, ::before, ::after {
476
- --tw-border-spacing-x: 0;
477
- --tw-border-spacing-y: 0;
478
- --tw-translate-x: 0;
479
- --tw-translate-y: 0;
480
- --tw-rotate: 0;
481
- --tw-skew-x: 0;
482
- --tw-skew-y: 0;
483
- --tw-scale-x: 1;
484
- --tw-scale-y: 1;
485
- --tw-pan-x: ;
486
- --tw-pan-y: ;
487
- --tw-pinch-zoom: ;
488
- --tw-scroll-snap-strictness: proximity;
489
- --tw-gradient-from-position: ;
490
- --tw-gradient-via-position: ;
491
- --tw-gradient-to-position: ;
492
- --tw-ordinal: ;
493
- --tw-slashed-zero: ;
494
- --tw-numeric-figure: ;
495
- --tw-numeric-spacing: ;
496
- --tw-numeric-fraction: ;
497
- --tw-ring-inset: ;
498
- --tw-ring-offset-width: 0px;
499
- --tw-ring-offset-color: #fff;
500
- --tw-ring-color: rgb(59 130 246 / 0.5);
501
- --tw-ring-offset-shadow: 0 0 #0000;
502
- --tw-ring-shadow: 0 0 #0000;
503
- --tw-shadow: 0 0 #0000;
504
- --tw-shadow-colored: 0 0 #0000;
505
- --tw-blur: ;
506
- --tw-brightness: ;
507
- --tw-contrast: ;
508
- --tw-grayscale: ;
509
- --tw-hue-rotate: ;
510
- --tw-invert: ;
511
- --tw-saturate: ;
512
- --tw-sepia: ;
513
- --tw-drop-shadow: ;
514
- --tw-backdrop-blur: ;
515
- --tw-backdrop-brightness: ;
516
- --tw-backdrop-contrast: ;
517
- --tw-backdrop-grayscale: ;
518
- --tw-backdrop-hue-rotate: ;
519
- --tw-backdrop-invert: ;
520
- --tw-backdrop-opacity: ;
521
- --tw-backdrop-saturate: ;
522
- --tw-backdrop-sepia: ;
523
- --tw-contain-size: ;
524
- --tw-contain-layout: ;
525
- --tw-contain-paint: ;
526
- --tw-contain-style: ;
527
- }
528
-
529
- ::backdrop {
530
- --tw-border-spacing-x: 0;
531
- --tw-border-spacing-y: 0;
532
- --tw-translate-x: 0;
533
- --tw-translate-y: 0;
534
- --tw-rotate: 0;
535
- --tw-skew-x: 0;
536
- --tw-skew-y: 0;
537
- --tw-scale-x: 1;
538
- --tw-scale-y: 1;
539
- --tw-pan-x: ;
540
- --tw-pan-y: ;
541
- --tw-pinch-zoom: ;
542
- --tw-scroll-snap-strictness: proximity;
543
- --tw-gradient-from-position: ;
544
- --tw-gradient-via-position: ;
545
- --tw-gradient-to-position: ;
546
- --tw-ordinal: ;
547
- --tw-slashed-zero: ;
548
- --tw-numeric-figure: ;
549
- --tw-numeric-spacing: ;
550
- --tw-numeric-fraction: ;
551
- --tw-ring-inset: ;
552
- --tw-ring-offset-width: 0px;
553
- --tw-ring-offset-color: #fff;
554
- --tw-ring-color: rgb(59 130 246 / 0.5);
555
- --tw-ring-offset-shadow: 0 0 #0000;
556
- --tw-ring-shadow: 0 0 #0000;
557
- --tw-shadow: 0 0 #0000;
558
- --tw-shadow-colored: 0 0 #0000;
559
- --tw-blur: ;
560
- --tw-brightness: ;
561
- --tw-contrast: ;
562
- --tw-grayscale: ;
563
- --tw-hue-rotate: ;
564
- --tw-invert: ;
565
- --tw-saturate: ;
566
- --tw-sepia: ;
567
- --tw-drop-shadow: ;
568
- --tw-backdrop-blur: ;
569
- --tw-backdrop-brightness: ;
570
- --tw-backdrop-contrast: ;
571
- --tw-backdrop-grayscale: ;
572
- --tw-backdrop-hue-rotate: ;
573
- --tw-backdrop-invert: ;
574
- --tw-backdrop-opacity: ;
575
- --tw-backdrop-saturate: ;
576
- --tw-backdrop-sepia: ;
577
- --tw-contain-size: ;
578
- --tw-contain-layout: ;
579
- --tw-contain-paint: ;
580
- --tw-contain-style: ;
581
- }
582
580
  .link::after {
583
581
  content: url("data:image/svg+xml,%3Csvg stroke='%234c37eb' fill='none' stroke-width='2' viewBox='0 0 24 24' aria-hidden='true' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14'%3E%3C/path%3E%3C/svg%3E");
584
582
  display: inline-block;