@sikka/hawa 0.49.14-next → 0.49.15-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 (77) hide show
  1. package/dist/{Chip-KG1_ZmCL.d.mts → Chip-BRMzT5TB.d.mts} +2 -2
  2. package/dist/{Chip-Cw1twk4G.d.ts → Chip-D58g8OJ_.d.ts} +2 -2
  3. package/dist/accordion/index.d.mts +1 -1
  4. package/dist/accordion/index.d.ts +1 -1
  5. package/dist/accordion/index.js.map +1 -1
  6. package/dist/accordion/index.mjs.map +1 -1
  7. package/dist/appLayout/index.js +1 -1
  8. package/dist/appLayout/index.js.map +1 -1
  9. package/dist/appLayout/index.mjs +1 -1
  10. package/dist/appLayout/index.mjs.map +1 -1
  11. package/dist/badge/index.d.mts +1 -1
  12. package/dist/badge/index.d.ts +1 -1
  13. package/dist/badge/index.js +11 -2
  14. package/dist/badge/index.js.map +1 -1
  15. package/dist/badge/index.mjs +11 -2
  16. package/dist/badge/index.mjs.map +1 -1
  17. package/dist/blocks/auth/index.js +15 -15
  18. package/dist/blocks/auth/index.mjs +15 -15
  19. package/dist/blocks/index.d.mts +1 -1
  20. package/dist/blocks/index.d.ts +1 -1
  21. package/dist/blocks/index.js +15 -15
  22. package/dist/blocks/index.mjs +3 -3
  23. package/dist/button/index.d.mts +1 -1
  24. package/dist/button/index.d.ts +1 -1
  25. package/dist/chip/index.d.mts +2 -2
  26. package/dist/chip/index.d.ts +2 -2
  27. package/dist/chip/index.js.map +1 -1
  28. package/dist/chip/index.mjs.map +1 -1
  29. package/dist/{chunk-FTS7YP7U.mjs → chunk-NJJVVA2A.mjs} +16 -16
  30. package/dist/{chunk-5SQBJRWE.mjs → chunk-OWMN44TT.mjs} +1 -1
  31. package/dist/{chunk-3AANFRLZ.mjs → chunk-Z3ZL22XB.mjs} +1 -1
  32. package/dist/count/index.d.mts +2 -2
  33. package/dist/count/index.d.ts +2 -2
  34. package/dist/count/index.js.map +1 -1
  35. package/dist/count/index.mjs.map +1 -1
  36. package/dist/datePicker/index.d.mts +1 -1
  37. package/dist/datePicker/index.d.ts +1 -1
  38. package/dist/docsLayout/index.js +1 -1
  39. package/dist/docsLayout/index.js.map +1 -1
  40. package/dist/docsLayout/index.mjs +1 -1
  41. package/dist/docsLayout/index.mjs.map +1 -1
  42. package/dist/elements/index.d.mts +9 -7
  43. package/dist/elements/index.d.ts +9 -7
  44. package/dist/elements/index.js +32 -21
  45. package/dist/elements/index.mjs +20 -9
  46. package/dist/fileDropzone/index.js +6 -4
  47. package/dist/fileDropzone/index.js.map +1 -1
  48. package/dist/fileDropzone/index.mjs +6 -4
  49. package/dist/fileDropzone/index.mjs.map +1 -1
  50. package/dist/hooks/index.d.mts +2 -2
  51. package/dist/hooks/index.d.ts +2 -2
  52. package/dist/hooks/index.js +2 -2
  53. package/dist/hooks/index.mjs +2 -2
  54. package/dist/index.css +124 -124
  55. package/dist/index.d.mts +11 -9
  56. package/dist/index.d.ts +11 -9
  57. package/dist/index.js +35 -24
  58. package/dist/index.mjs +35 -24
  59. package/dist/layout/index.d.mts +1 -1
  60. package/dist/layout/index.d.ts +1 -1
  61. package/dist/layout/index.js +2 -2
  62. package/dist/layout/index.mjs +2 -2
  63. package/dist/pinInput/index.d.mts +4 -2
  64. package/dist/pinInput/index.d.ts +4 -2
  65. package/dist/pinInput/index.js +15 -15
  66. package/dist/pinInput/index.js.map +1 -1
  67. package/dist/pinInput/index.mjs +15 -15
  68. package/dist/pinInput/index.mjs.map +1 -1
  69. package/dist/sidebar/index.js.map +1 -1
  70. package/dist/sidebar/index.mjs.map +1 -1
  71. package/dist/splitButton/index.d.mts +1 -1
  72. package/dist/splitButton/index.d.ts +1 -1
  73. package/dist/tabs/index.d.mts +1 -1
  74. package/dist/tabs/index.d.ts +1 -1
  75. package/dist/tabs/index.js.map +1 -1
  76. package/dist/tabs/index.mjs.map +1 -1
  77. package/package.json +45 -45
@@ -2,7 +2,7 @@ import React, { FC, RefObject } from 'react';
2
2
 
3
3
  type BadgeTypes = {
4
4
  position: "right" | "left";
5
- anchor: RefObject<HTMLElement>;
5
+ anchor: RefObject<HTMLDivElement | null>;
6
6
  size?: "small" | "default" | "large";
7
7
  text?: string | number;
8
8
  className?: string;
@@ -2,7 +2,7 @@ import React, { FC, RefObject } from 'react';
2
2
 
3
3
  type BadgeTypes = {
4
4
  position: "right" | "left";
5
- anchor: RefObject<HTMLElement>;
5
+ anchor: RefObject<HTMLDivElement | null>;
6
6
  size?: "small" | "default" | "large";
7
7
  text?: string | number;
8
8
  className?: string;
@@ -64,7 +64,7 @@ var Badge = ({
64
64
  (0, import_react.useEffect)(() => {
65
65
  const handlePositioning = () => {
66
66
  var _a;
67
- if (anchor.current && indicatorRef.current) {
67
+ if (anchor && anchor.current && indicatorRef.current) {
68
68
  const rect = anchor.current.getBoundingClientRect();
69
69
  const parentRect = (_a = indicatorRef.current.parentElement) == null ? void 0 : _a.getBoundingClientRect();
70
70
  const style = window.getComputedStyle(anchor.current);
@@ -103,7 +103,16 @@ var Badge = ({
103
103
  };
104
104
  var BadgedComponent = ({ children, className, hideBadge, position, size, text }) => {
105
105
  const ref = (0, import_react.useRef)(null);
106
- return /* @__PURE__ */ import_react.default.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ import_react.default.createElement(Badge, { size, text, position, anchor: ref, className: "hawa-z-10" }), children);
106
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ import_react.default.createElement(
107
+ Badge,
108
+ {
109
+ size,
110
+ text,
111
+ position,
112
+ anchor: ref || null,
113
+ className: "hawa-z-10"
114
+ }
115
+ ), children);
107
116
  };
108
117
  // Annotate the CommonJS export names for ESM import in node:
109
118
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/badge/index.ts","../../elements/badge/Badge.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Badge\";\n","import React, { useEffect, useState, useRef, RefObject, FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype BadgeTypes = {\n position: \"right\" | \"left\";\n anchor: RefObject<HTMLElement>;\n size?: \"small\" | \"default\" | \"large\";\n text?: string | number;\n className?: string;\n};\n\nexport const Badge: FC<BadgeTypes> = ({\n anchor,\n position = \"right\",\n size = \"default\",\n text,\n className,\n}) => {\n const [badgePosition, setBadgePosition] = useState<any>(null);\n const indicatorRef = useRef(null);\n const sizeStyles = {\n small: { top: 4, left: 6, right: 7, classes: \"hawa-w-3 hawa-h-3\" },\n default: { top: 4, left: 7, right: 5, classes: \"hawa-w-3 hawa-h-3\" },\n large: { top: 6, left: 12, right: 7, classes: \"hawa-w-6 hawa-h-6\" },\n };\n useEffect(() => {\n const handlePositioning = () => {\n if (anchor.current && indicatorRef.current) {\n const rect = anchor.current.getBoundingClientRect();\n const parentRect = (\n indicatorRef.current as HTMLElement\n ).parentElement?.getBoundingClientRect();\n const style = window.getComputedStyle(anchor.current);\n const marginTop = parseFloat(style.marginTop.replace(\"px\", \"\"));\n const marginRight = parseFloat(style.marginRight.replace(\"px\", \"\"));\n\n if (parentRect) {\n setBadgePosition({\n top: rect.top - parentRect.top - marginTop - sizeStyles[size].top,\n left:\n position === \"right\"\n ? parentRect.right - parentRect.left - sizeStyles[size].left\n : rect.right -\n parentRect.left -\n parentRect.width -\n marginRight -\n sizeStyles[size].right,\n });\n }\n }\n };\n\n handlePositioning();\n window.addEventListener(\"resize\", handlePositioning);\n return () => {\n window.removeEventListener(\"resize\", handlePositioning);\n };\n }, [anchor]);\n\n return (\n <div ref={indicatorRef} className={cn(\"hawa-relative\", className)}>\n {badgePosition && (\n <div\n style={{\n position: \"absolute\",\n top: badgePosition?.top,\n left: badgePosition?.left,\n }}\n className={cn(\n \"hawa-origin-center hawa-rounded-full hawa-bg-red-500\",\n sizeStyles[size].classes,\n \"hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-text-[9px] hawa-text-white\",\n )}\n >\n {size === \"large\" && text && text}\n </div>\n )}\n </div>\n );\n};\n\nexport const BadgedComponent = ({ children, className, hideBadge, position, size, text }: any) => {\n const ref = useRef(null);\n\n return (\n <div className={cn(\"hawa-relative hawa-w-fit\", className)} ref={ref}>\n {!hideBadge && (\n <Badge size={size} text={text} position={position} anchor={ref} className=\"hawa-z-10\" />\n )}\n {children}\n </div>\n );\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;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkE;;;ACAlE,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADOO,IAAM,QAAwB,CAAC;AAAA,EACpC;AAAA,EACA,WAAW;AAAA,EACX,OAAO;AAAA,EACP;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAc,IAAI;AAC5D,QAAM,mBAAe,qBAAO,IAAI;AAChC,QAAM,aAAa;AAAA,IACjB,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,oBAAoB;AAAA,IACjE,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,oBAAoB;AAAA,IACnE,OAAO,EAAE,KAAK,GAAG,MAAM,IAAI,OAAO,GAAG,SAAS,oBAAoB;AAAA,EACpE;AACA,8BAAU,MAAM;AACd,UAAM,oBAAoB,MAAM;AA3BpC;AA4BM,UAAI,OAAO,WAAW,aAAa,SAAS;AAC1C,cAAM,OAAO,OAAO,QAAQ,sBAAsB;AAClD,cAAM,cACJ,kBAAa,QACb,kBADA,mBACe;AACjB,cAAM,QAAQ,OAAO,iBAAiB,OAAO,OAAO;AACpD,cAAM,YAAY,WAAW,MAAM,UAAU,QAAQ,MAAM,EAAE,CAAC;AAC9D,cAAM,cAAc,WAAW,MAAM,YAAY,QAAQ,MAAM,EAAE,CAAC;AAElE,YAAI,YAAY;AACd,2BAAiB;AAAA,YACf,KAAK,KAAK,MAAM,WAAW,MAAM,YAAY,WAAW,IAAI,EAAE;AAAA,YAC9D,MACE,aAAa,UACT,WAAW,QAAQ,WAAW,OAAO,WAAW,IAAI,EAAE,OACtD,KAAK,QACL,WAAW,OACX,WAAW,QACX,cACA,WAAW,IAAI,EAAE;AAAA,UACzB,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAEA,sBAAkB;AAClB,WAAO,iBAAiB,UAAU,iBAAiB;AACnD,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,iBAAiB;AAAA,IACxD;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,6BAAAA,QAAA,cAAC,SAAI,KAAK,cAAc,WAAW,GAAG,iBAAiB,SAAS,KAC7D,iBACC,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK,+CAAe;AAAA,QACpB,MAAM,+CAAe;AAAA,MACvB;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,WAAW,IAAI,EAAE;AAAA,QACjB;AAAA,MACF;AAAA;AAAA,IAEC,SAAS,WAAW,QAAQ;AAAA,EAC/B,CAEJ;AAEJ;AAEO,IAAM,kBAAkB,CAAC,EAAE,UAAU,WAAW,WAAW,UAAU,MAAM,KAAK,MAAW;AAChG,QAAM,UAAM,qBAAO,IAAI;AAEvB,SACE,6BAAAA,QAAA,cAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,GAAG,OACxD,CAAC,aACA,6BAAAA,QAAA,cAAC,SAAM,MAAY,MAAY,UAAoB,QAAQ,KAAK,WAAU,aAAY,GAEvF,QACH;AAEJ;","names":["React"]}
1
+ {"version":3,"sources":["../../elements/badge/index.ts","../../elements/badge/Badge.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Badge\";\n","import React, { useEffect, useState, useRef, RefObject, FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype BadgeTypes = {\n position: \"right\" | \"left\";\n anchor: RefObject<HTMLDivElement | null>;\n size?: \"small\" | \"default\" | \"large\";\n text?: string | number;\n className?: string;\n};\n\nexport const Badge: FC<BadgeTypes> = ({\n anchor,\n position = \"right\",\n size = \"default\",\n text,\n className,\n}) => {\n const [badgePosition, setBadgePosition] = useState<any>(null);\n const indicatorRef = useRef(null);\n const sizeStyles = {\n small: { top: 4, left: 6, right: 7, classes: \"hawa-w-3 hawa-h-3\" },\n default: { top: 4, left: 7, right: 5, classes: \"hawa-w-3 hawa-h-3\" },\n large: { top: 6, left: 12, right: 7, classes: \"hawa-w-6 hawa-h-6\" },\n };\n useEffect(() => {\n const handlePositioning = () => {\n if (anchor && anchor.current && indicatorRef.current) {\n const rect = anchor.current.getBoundingClientRect();\n const parentRect = (\n indicatorRef.current as HTMLElement\n ).parentElement?.getBoundingClientRect();\n const style = window.getComputedStyle(anchor.current);\n const marginTop = parseFloat(style.marginTop.replace(\"px\", \"\"));\n const marginRight = parseFloat(style.marginRight.replace(\"px\", \"\"));\n\n if (parentRect) {\n setBadgePosition({\n top: rect.top - parentRect.top - marginTop - sizeStyles[size].top,\n left:\n position === \"right\"\n ? parentRect.right - parentRect.left - sizeStyles[size].left\n : rect.right -\n parentRect.left -\n parentRect.width -\n marginRight -\n sizeStyles[size].right,\n });\n }\n }\n };\n\n handlePositioning();\n window.addEventListener(\"resize\", handlePositioning);\n return () => {\n window.removeEventListener(\"resize\", handlePositioning);\n };\n }, [anchor]);\n\n return (\n <div ref={indicatorRef} className={cn(\"hawa-relative\", className)}>\n {badgePosition && (\n <div\n style={{\n position: \"absolute\",\n top: badgePosition?.top,\n left: badgePosition?.left,\n }}\n className={cn(\n \"hawa-origin-center hawa-rounded-full hawa-bg-red-500\",\n sizeStyles[size].classes,\n \"hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-text-[9px] hawa-text-white\",\n )}\n >\n {size === \"large\" && text && text}\n </div>\n )}\n </div>\n );\n};\n\nexport const BadgedComponent = ({ children, className, hideBadge, position, size, text }: any) => {\n const ref = useRef<HTMLDivElement | null>(null);\n\n return (\n <div className={cn(\"hawa-relative hawa-w-fit\", className)} ref={ref}>\n {!hideBadge && (\n <Badge\n size={size}\n text={text}\n position={position}\n anchor={ref || null}\n className=\"hawa-z-10\"\n />\n )}\n {children}\n </div>\n );\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;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkE;;;ACAlE,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADOO,IAAM,QAAwB,CAAC;AAAA,EACpC;AAAA,EACA,WAAW;AAAA,EACX,OAAO;AAAA,EACP;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAc,IAAI;AAC5D,QAAM,mBAAe,qBAAO,IAAI;AAChC,QAAM,aAAa;AAAA,IACjB,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,oBAAoB;AAAA,IACjE,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,oBAAoB;AAAA,IACnE,OAAO,EAAE,KAAK,GAAG,MAAM,IAAI,OAAO,GAAG,SAAS,oBAAoB;AAAA,EACpE;AACA,8BAAU,MAAM;AACd,UAAM,oBAAoB,MAAM;AA3BpC;AA4BM,UAAI,UAAU,OAAO,WAAW,aAAa,SAAS;AACpD,cAAM,OAAO,OAAO,QAAQ,sBAAsB;AAClD,cAAM,cACJ,kBAAa,QACb,kBADA,mBACe;AACjB,cAAM,QAAQ,OAAO,iBAAiB,OAAO,OAAO;AACpD,cAAM,YAAY,WAAW,MAAM,UAAU,QAAQ,MAAM,EAAE,CAAC;AAC9D,cAAM,cAAc,WAAW,MAAM,YAAY,QAAQ,MAAM,EAAE,CAAC;AAElE,YAAI,YAAY;AACd,2BAAiB;AAAA,YACf,KAAK,KAAK,MAAM,WAAW,MAAM,YAAY,WAAW,IAAI,EAAE;AAAA,YAC9D,MACE,aAAa,UACT,WAAW,QAAQ,WAAW,OAAO,WAAW,IAAI,EAAE,OACtD,KAAK,QACL,WAAW,OACX,WAAW,QACX,cACA,WAAW,IAAI,EAAE;AAAA,UACzB,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAEA,sBAAkB;AAClB,WAAO,iBAAiB,UAAU,iBAAiB;AACnD,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,iBAAiB;AAAA,IACxD;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,6BAAAA,QAAA,cAAC,SAAI,KAAK,cAAc,WAAW,GAAG,iBAAiB,SAAS,KAC7D,iBACC,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK,+CAAe;AAAA,QACpB,MAAM,+CAAe;AAAA,MACvB;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,WAAW,IAAI,EAAE;AAAA,QACjB;AAAA,MACF;AAAA;AAAA,IAEC,SAAS,WAAW,QAAQ;AAAA,EAC/B,CAEJ;AAEJ;AAEO,IAAM,kBAAkB,CAAC,EAAE,UAAU,WAAW,WAAW,UAAU,MAAM,KAAK,MAAW;AAChG,QAAM,UAAM,qBAA8B,IAAI;AAE9C,SACE,6BAAAA,QAAA,cAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,GAAG,OACxD,CAAC,aACA,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ,OAAO;AAAA,MACf,WAAU;AAAA;AAAA,EACZ,GAED,QACH;AAEJ;","names":["React"]}
@@ -28,7 +28,7 @@ var Badge = ({
28
28
  useEffect(() => {
29
29
  const handlePositioning = () => {
30
30
  var _a;
31
- if (anchor.current && indicatorRef.current) {
31
+ if (anchor && anchor.current && indicatorRef.current) {
32
32
  const rect = anchor.current.getBoundingClientRect();
33
33
  const parentRect = (_a = indicatorRef.current.parentElement) == null ? void 0 : _a.getBoundingClientRect();
34
34
  const style = window.getComputedStyle(anchor.current);
@@ -67,7 +67,16 @@ var Badge = ({
67
67
  };
68
68
  var BadgedComponent = ({ children, className, hideBadge, position, size, text }) => {
69
69
  const ref = useRef(null);
70
- return /* @__PURE__ */ React.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ React.createElement(Badge, { size, text, position, anchor: ref, className: "hawa-z-10" }), children);
70
+ return /* @__PURE__ */ React.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ React.createElement(
71
+ Badge,
72
+ {
73
+ size,
74
+ text,
75
+ position,
76
+ anchor: ref || null,
77
+ className: "hawa-z-10"
78
+ }
79
+ ), children);
71
80
  };
72
81
  export {
73
82
  Badge,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/badge/Badge.tsx","../../util/index.ts"],"sourcesContent":["import React, { useEffect, useState, useRef, RefObject, FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype BadgeTypes = {\n position: \"right\" | \"left\";\n anchor: RefObject<HTMLElement>;\n size?: \"small\" | \"default\" | \"large\";\n text?: string | number;\n className?: string;\n};\n\nexport const Badge: FC<BadgeTypes> = ({\n anchor,\n position = \"right\",\n size = \"default\",\n text,\n className,\n}) => {\n const [badgePosition, setBadgePosition] = useState<any>(null);\n const indicatorRef = useRef(null);\n const sizeStyles = {\n small: { top: 4, left: 6, right: 7, classes: \"hawa-w-3 hawa-h-3\" },\n default: { top: 4, left: 7, right: 5, classes: \"hawa-w-3 hawa-h-3\" },\n large: { top: 6, left: 12, right: 7, classes: \"hawa-w-6 hawa-h-6\" },\n };\n useEffect(() => {\n const handlePositioning = () => {\n if (anchor.current && indicatorRef.current) {\n const rect = anchor.current.getBoundingClientRect();\n const parentRect = (\n indicatorRef.current as HTMLElement\n ).parentElement?.getBoundingClientRect();\n const style = window.getComputedStyle(anchor.current);\n const marginTop = parseFloat(style.marginTop.replace(\"px\", \"\"));\n const marginRight = parseFloat(style.marginRight.replace(\"px\", \"\"));\n\n if (parentRect) {\n setBadgePosition({\n top: rect.top - parentRect.top - marginTop - sizeStyles[size].top,\n left:\n position === \"right\"\n ? parentRect.right - parentRect.left - sizeStyles[size].left\n : rect.right -\n parentRect.left -\n parentRect.width -\n marginRight -\n sizeStyles[size].right,\n });\n }\n }\n };\n\n handlePositioning();\n window.addEventListener(\"resize\", handlePositioning);\n return () => {\n window.removeEventListener(\"resize\", handlePositioning);\n };\n }, [anchor]);\n\n return (\n <div ref={indicatorRef} className={cn(\"hawa-relative\", className)}>\n {badgePosition && (\n <div\n style={{\n position: \"absolute\",\n top: badgePosition?.top,\n left: badgePosition?.left,\n }}\n className={cn(\n \"hawa-origin-center hawa-rounded-full hawa-bg-red-500\",\n sizeStyles[size].classes,\n \"hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-text-[9px] hawa-text-white\",\n )}\n >\n {size === \"large\" && text && text}\n </div>\n )}\n </div>\n );\n};\n\nexport const BadgedComponent = ({ children, className, hideBadge, position, size, text }: any) => {\n const ref = useRef(null);\n\n return (\n <div className={cn(\"hawa-relative hawa-w-fit\", className)} ref={ref}>\n {!hideBadge && (\n <Badge size={size} text={text} position={position} anchor={ref} className=\"hawa-z-10\" />\n )}\n {children}\n </div>\n );\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,OAAO,SAAS,WAAW,UAAU,cAA6B;;;ACAlE,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADOO,IAAM,QAAwB,CAAC;AAAA,EACpC;AAAA,EACA,WAAW;AAAA,EACX,OAAO;AAAA,EACP;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAc,IAAI;AAC5D,QAAM,eAAe,OAAO,IAAI;AAChC,QAAM,aAAa;AAAA,IACjB,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,oBAAoB;AAAA,IACjE,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,oBAAoB;AAAA,IACnE,OAAO,EAAE,KAAK,GAAG,MAAM,IAAI,OAAO,GAAG,SAAS,oBAAoB;AAAA,EACpE;AACA,YAAU,MAAM;AACd,UAAM,oBAAoB,MAAM;AA3BpC;AA4BM,UAAI,OAAO,WAAW,aAAa,SAAS;AAC1C,cAAM,OAAO,OAAO,QAAQ,sBAAsB;AAClD,cAAM,cACJ,kBAAa,QACb,kBADA,mBACe;AACjB,cAAM,QAAQ,OAAO,iBAAiB,OAAO,OAAO;AACpD,cAAM,YAAY,WAAW,MAAM,UAAU,QAAQ,MAAM,EAAE,CAAC;AAC9D,cAAM,cAAc,WAAW,MAAM,YAAY,QAAQ,MAAM,EAAE,CAAC;AAElE,YAAI,YAAY;AACd,2BAAiB;AAAA,YACf,KAAK,KAAK,MAAM,WAAW,MAAM,YAAY,WAAW,IAAI,EAAE;AAAA,YAC9D,MACE,aAAa,UACT,WAAW,QAAQ,WAAW,OAAO,WAAW,IAAI,EAAE,OACtD,KAAK,QACL,WAAW,OACX,WAAW,QACX,cACA,WAAW,IAAI,EAAE;AAAA,UACzB,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAEA,sBAAkB;AAClB,WAAO,iBAAiB,UAAU,iBAAiB;AACnD,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,iBAAiB;AAAA,IACxD;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,oCAAC,SAAI,KAAK,cAAc,WAAW,GAAG,iBAAiB,SAAS,KAC7D,iBACC;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK,+CAAe;AAAA,QACpB,MAAM,+CAAe;AAAA,MACvB;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,WAAW,IAAI,EAAE;AAAA,QACjB;AAAA,MACF;AAAA;AAAA,IAEC,SAAS,WAAW,QAAQ;AAAA,EAC/B,CAEJ;AAEJ;AAEO,IAAM,kBAAkB,CAAC,EAAE,UAAU,WAAW,WAAW,UAAU,MAAM,KAAK,MAAW;AAChG,QAAM,MAAM,OAAO,IAAI;AAEvB,SACE,oCAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,GAAG,OACxD,CAAC,aACA,oCAAC,SAAM,MAAY,MAAY,UAAoB,QAAQ,KAAK,WAAU,aAAY,GAEvF,QACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../elements/badge/Badge.tsx","../../util/index.ts"],"sourcesContent":["import React, { useEffect, useState, useRef, RefObject, FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype BadgeTypes = {\n position: \"right\" | \"left\";\n anchor: RefObject<HTMLDivElement | null>;\n size?: \"small\" | \"default\" | \"large\";\n text?: string | number;\n className?: string;\n};\n\nexport const Badge: FC<BadgeTypes> = ({\n anchor,\n position = \"right\",\n size = \"default\",\n text,\n className,\n}) => {\n const [badgePosition, setBadgePosition] = useState<any>(null);\n const indicatorRef = useRef(null);\n const sizeStyles = {\n small: { top: 4, left: 6, right: 7, classes: \"hawa-w-3 hawa-h-3\" },\n default: { top: 4, left: 7, right: 5, classes: \"hawa-w-3 hawa-h-3\" },\n large: { top: 6, left: 12, right: 7, classes: \"hawa-w-6 hawa-h-6\" },\n };\n useEffect(() => {\n const handlePositioning = () => {\n if (anchor && anchor.current && indicatorRef.current) {\n const rect = anchor.current.getBoundingClientRect();\n const parentRect = (\n indicatorRef.current as HTMLElement\n ).parentElement?.getBoundingClientRect();\n const style = window.getComputedStyle(anchor.current);\n const marginTop = parseFloat(style.marginTop.replace(\"px\", \"\"));\n const marginRight = parseFloat(style.marginRight.replace(\"px\", \"\"));\n\n if (parentRect) {\n setBadgePosition({\n top: rect.top - parentRect.top - marginTop - sizeStyles[size].top,\n left:\n position === \"right\"\n ? parentRect.right - parentRect.left - sizeStyles[size].left\n : rect.right -\n parentRect.left -\n parentRect.width -\n marginRight -\n sizeStyles[size].right,\n });\n }\n }\n };\n\n handlePositioning();\n window.addEventListener(\"resize\", handlePositioning);\n return () => {\n window.removeEventListener(\"resize\", handlePositioning);\n };\n }, [anchor]);\n\n return (\n <div ref={indicatorRef} className={cn(\"hawa-relative\", className)}>\n {badgePosition && (\n <div\n style={{\n position: \"absolute\",\n top: badgePosition?.top,\n left: badgePosition?.left,\n }}\n className={cn(\n \"hawa-origin-center hawa-rounded-full hawa-bg-red-500\",\n sizeStyles[size].classes,\n \"hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-text-[9px] hawa-text-white\",\n )}\n >\n {size === \"large\" && text && text}\n </div>\n )}\n </div>\n );\n};\n\nexport const BadgedComponent = ({ children, className, hideBadge, position, size, text }: any) => {\n const ref = useRef<HTMLDivElement | null>(null);\n\n return (\n <div className={cn(\"hawa-relative hawa-w-fit\", className)} ref={ref}>\n {!hideBadge && (\n <Badge\n size={size}\n text={text}\n position={position}\n anchor={ref || null}\n className=\"hawa-z-10\"\n />\n )}\n {children}\n </div>\n );\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,OAAO,SAAS,WAAW,UAAU,cAA6B;;;ACAlE,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADOO,IAAM,QAAwB,CAAC;AAAA,EACpC;AAAA,EACA,WAAW;AAAA,EACX,OAAO;AAAA,EACP;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAc,IAAI;AAC5D,QAAM,eAAe,OAAO,IAAI;AAChC,QAAM,aAAa;AAAA,IACjB,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,oBAAoB;AAAA,IACjE,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,oBAAoB;AAAA,IACnE,OAAO,EAAE,KAAK,GAAG,MAAM,IAAI,OAAO,GAAG,SAAS,oBAAoB;AAAA,EACpE;AACA,YAAU,MAAM;AACd,UAAM,oBAAoB,MAAM;AA3BpC;AA4BM,UAAI,UAAU,OAAO,WAAW,aAAa,SAAS;AACpD,cAAM,OAAO,OAAO,QAAQ,sBAAsB;AAClD,cAAM,cACJ,kBAAa,QACb,kBADA,mBACe;AACjB,cAAM,QAAQ,OAAO,iBAAiB,OAAO,OAAO;AACpD,cAAM,YAAY,WAAW,MAAM,UAAU,QAAQ,MAAM,EAAE,CAAC;AAC9D,cAAM,cAAc,WAAW,MAAM,YAAY,QAAQ,MAAM,EAAE,CAAC;AAElE,YAAI,YAAY;AACd,2BAAiB;AAAA,YACf,KAAK,KAAK,MAAM,WAAW,MAAM,YAAY,WAAW,IAAI,EAAE;AAAA,YAC9D,MACE,aAAa,UACT,WAAW,QAAQ,WAAW,OAAO,WAAW,IAAI,EAAE,OACtD,KAAK,QACL,WAAW,OACX,WAAW,QACX,cACA,WAAW,IAAI,EAAE;AAAA,UACzB,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAEA,sBAAkB;AAClB,WAAO,iBAAiB,UAAU,iBAAiB;AACnD,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,iBAAiB;AAAA,IACxD;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,oCAAC,SAAI,KAAK,cAAc,WAAW,GAAG,iBAAiB,SAAS,KAC7D,iBACC;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK,+CAAe;AAAA,QACpB,MAAM,+CAAe;AAAA,MACvB;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,WAAW,IAAI,EAAE;AAAA,QACjB;AAAA,MACF;AAAA;AAAA,IAEC,SAAS,WAAW,QAAQ;AAAA,EAC/B,CAEJ;AAEJ;AAEO,IAAM,kBAAkB,CAAC,EAAE,UAAU,WAAW,WAAW,UAAU,MAAM,KAAK,MAAW;AAChG,QAAM,MAAM,OAA8B,IAAI;AAE9C,SACE,oCAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,GAAG,OACxD,CAAC,aACA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ,OAAO;AAAA,MACf,WAAU;AAAA;AAAA,EACZ,GAED,QACH;AAEJ;","names":[]}
@@ -5048,19 +5048,19 @@ var z5 = __toESM(require("zod"));
5048
5048
  var React36 = __toESM(require("react"));
5049
5049
  var import_input_otp = require("input-otp");
5050
5050
 
5051
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5051
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5052
5052
  var import_react43 = require("react");
5053
5053
 
5054
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
5054
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
5055
5055
  var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
5056
5056
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
5057
- return Boolean(className) && array.indexOf(className) === index;
5058
- }).join(" ");
5057
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
5058
+ }).join(" ").trim();
5059
5059
 
5060
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5060
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5061
5061
  var import_react42 = require("react");
5062
5062
 
5063
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
5063
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
5064
5064
  var defaultAttributes = {
5065
5065
  xmlns: "http://www.w3.org/2000/svg",
5066
5066
  width: 24,
@@ -5073,7 +5073,7 @@ var defaultAttributes = {
5073
5073
  strokeLinejoin: "round"
5074
5074
  };
5075
5075
 
5076
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5076
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5077
5077
  var Icon = (0, import_react42.forwardRef)(
5078
5078
  ({
5079
5079
  color = "currentColor",
@@ -5105,7 +5105,7 @@ var Icon = (0, import_react42.forwardRef)(
5105
5105
  }
5106
5106
  );
5107
5107
 
5108
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5108
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5109
5109
  var createLucideIcon = (iconName, iconNode) => {
5110
5110
  const Component = (0, import_react43.forwardRef)(
5111
5111
  ({ className, ...props }, ref) => (0, import_react43.createElement)(Icon, {
@@ -5119,7 +5119,7 @@ var createLucideIcon = (iconName, iconNode) => {
5119
5119
  return Component;
5120
5120
  };
5121
5121
 
5122
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
5122
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
5123
5123
  var Dot = createLucideIcon("Dot", [
5124
5124
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
5125
5125
  ]);
@@ -5321,7 +5321,7 @@ var CodeConfirmation = ({
5321
5321
 
5322
5322
  lucide-react/dist/esm/shared/src/utils.js:
5323
5323
  (**
5324
- * @license lucide-react v0.441.0 - ISC
5324
+ * @license lucide-react v0.468.0 - ISC
5325
5325
  *
5326
5326
  * This source code is licensed under the ISC license.
5327
5327
  * See the LICENSE file in the root directory of this source tree.
@@ -5329,7 +5329,7 @@ lucide-react/dist/esm/shared/src/utils.js:
5329
5329
 
5330
5330
  lucide-react/dist/esm/defaultAttributes.js:
5331
5331
  (**
5332
- * @license lucide-react v0.441.0 - ISC
5332
+ * @license lucide-react v0.468.0 - ISC
5333
5333
  *
5334
5334
  * This source code is licensed under the ISC license.
5335
5335
  * See the LICENSE file in the root directory of this source tree.
@@ -5337,7 +5337,7 @@ lucide-react/dist/esm/defaultAttributes.js:
5337
5337
 
5338
5338
  lucide-react/dist/esm/Icon.js:
5339
5339
  (**
5340
- * @license lucide-react v0.441.0 - ISC
5340
+ * @license lucide-react v0.468.0 - ISC
5341
5341
  *
5342
5342
  * This source code is licensed under the ISC license.
5343
5343
  * See the LICENSE file in the root directory of this source tree.
@@ -5345,7 +5345,7 @@ lucide-react/dist/esm/Icon.js:
5345
5345
 
5346
5346
  lucide-react/dist/esm/createLucideIcon.js:
5347
5347
  (**
5348
- * @license lucide-react v0.441.0 - ISC
5348
+ * @license lucide-react v0.468.0 - ISC
5349
5349
  *
5350
5350
  * This source code is licensed under the ISC license.
5351
5351
  * See the LICENSE file in the root directory of this source tree.
@@ -5353,7 +5353,7 @@ lucide-react/dist/esm/createLucideIcon.js:
5353
5353
 
5354
5354
  lucide-react/dist/esm/icons/dot.js:
5355
5355
  (**
5356
- * @license lucide-react v0.441.0 - ISC
5356
+ * @license lucide-react v0.468.0 - ISC
5357
5357
  *
5358
5358
  * This source code is licensed under the ISC license.
5359
5359
  * See the LICENSE file in the root directory of this source tree.
@@ -5361,7 +5361,7 @@ lucide-react/dist/esm/icons/dot.js:
5361
5361
 
5362
5362
  lucide-react/dist/esm/lucide-react.js:
5363
5363
  (**
5364
- * @license lucide-react v0.441.0 - ISC
5364
+ * @license lucide-react v0.468.0 - ISC
5365
5365
  *
5366
5366
  * This source code is licensed under the ISC license.
5367
5367
  * See the LICENSE file in the root directory of this source tree.
@@ -3670,19 +3670,19 @@ import * as z5 from "zod";
3670
3670
  import * as React12 from "react";
3671
3671
  import { OTPInput, OTPInputContext } from "input-otp";
3672
3672
 
3673
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3673
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3674
3674
  import { forwardRef as forwardRef3, createElement as createElement3 } from "react";
3675
3675
 
3676
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
3676
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
3677
3677
  var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
3678
3678
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
3679
- return Boolean(className) && array.indexOf(className) === index;
3680
- }).join(" ");
3679
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
3680
+ }).join(" ").trim();
3681
3681
 
3682
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
3682
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
3683
3683
  import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
3684
3684
 
3685
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
3685
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
3686
3686
  var defaultAttributes = {
3687
3687
  xmlns: "http://www.w3.org/2000/svg",
3688
3688
  width: 24,
@@ -3695,7 +3695,7 @@ var defaultAttributes = {
3695
3695
  strokeLinejoin: "round"
3696
3696
  };
3697
3697
 
3698
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
3698
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
3699
3699
  var Icon = forwardRef2(
3700
3700
  ({
3701
3701
  color = "currentColor",
@@ -3727,7 +3727,7 @@ var Icon = forwardRef2(
3727
3727
  }
3728
3728
  );
3729
3729
 
3730
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3730
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3731
3731
  var createLucideIcon = (iconName, iconNode) => {
3732
3732
  const Component = forwardRef3(
3733
3733
  ({ className, ...props }, ref) => createElement3(Icon, {
@@ -3741,7 +3741,7 @@ var createLucideIcon = (iconName, iconNode) => {
3741
3741
  return Component;
3742
3742
  };
3743
3743
 
3744
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
3744
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
3745
3745
  var Dot = createLucideIcon("Dot", [
3746
3746
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
3747
3747
  ]);
@@ -3942,7 +3942,7 @@ export {
3942
3942
 
3943
3943
  lucide-react/dist/esm/shared/src/utils.js:
3944
3944
  (**
3945
- * @license lucide-react v0.441.0 - ISC
3945
+ * @license lucide-react v0.468.0 - ISC
3946
3946
  *
3947
3947
  * This source code is licensed under the ISC license.
3948
3948
  * See the LICENSE file in the root directory of this source tree.
@@ -3950,7 +3950,7 @@ lucide-react/dist/esm/shared/src/utils.js:
3950
3950
 
3951
3951
  lucide-react/dist/esm/defaultAttributes.js:
3952
3952
  (**
3953
- * @license lucide-react v0.441.0 - ISC
3953
+ * @license lucide-react v0.468.0 - ISC
3954
3954
  *
3955
3955
  * This source code is licensed under the ISC license.
3956
3956
  * See the LICENSE file in the root directory of this source tree.
@@ -3958,7 +3958,7 @@ lucide-react/dist/esm/defaultAttributes.js:
3958
3958
 
3959
3959
  lucide-react/dist/esm/Icon.js:
3960
3960
  (**
3961
- * @license lucide-react v0.441.0 - ISC
3961
+ * @license lucide-react v0.468.0 - ISC
3962
3962
  *
3963
3963
  * This source code is licensed under the ISC license.
3964
3964
  * See the LICENSE file in the root directory of this source tree.
@@ -3966,7 +3966,7 @@ lucide-react/dist/esm/Icon.js:
3966
3966
 
3967
3967
  lucide-react/dist/esm/createLucideIcon.js:
3968
3968
  (**
3969
- * @license lucide-react v0.441.0 - ISC
3969
+ * @license lucide-react v0.468.0 - ISC
3970
3970
  *
3971
3971
  * This source code is licensed under the ISC license.
3972
3972
  * See the LICENSE file in the root directory of this source tree.
@@ -3974,7 +3974,7 @@ lucide-react/dist/esm/createLucideIcon.js:
3974
3974
 
3975
3975
  lucide-react/dist/esm/icons/dot.js:
3976
3976
  (**
3977
- * @license lucide-react v0.441.0 - ISC
3977
+ * @license lucide-react v0.468.0 - ISC
3978
3978
  *
3979
3979
  * This source code is licensed under the ISC license.
3980
3980
  * See the LICENSE file in the root directory of this source tree.
@@ -3982,7 +3982,7 @@ lucide-react/dist/esm/icons/dot.js:
3982
3982
 
3983
3983
  lucide-react/dist/esm/lucide-react.js:
3984
3984
  (**
3985
- * @license lucide-react v0.441.0 - ISC
3985
+ * @license lucide-react v0.468.0 - ISC
3986
3986
  *
3987
3987
  * This source code is licensed under the ISC license.
3988
3988
  * See the LICENSE file in the root directory of this source tree.
@@ -1,4 +1,4 @@
1
- import React__default, { FC, InputHTMLAttributes } from 'react';
1
+ import React__default, { FC, InputHTMLAttributes, JSX } from 'react';
2
2
  import { ThirdPartyAuthTextsTypes, LoginFormTextsTypes, RegisterFormTextsTypes, NewPasswordTextsTypes, ResetPasswordTextsTypes, BaseInputType, TextInputType, PricingCardProps, PlanFeature, PricingPlanTexts } from '../types/index.mjs';
3
3
  import { P as PhoneInputProps, S as SelectOptionProps, L as LabelProps, R as RadioOptionsTypes } from '../Radio-BPHTeDMz.mjs';
4
4
  import { D as DirectionType, a as RadioOptionType, O as OrientationType } from '../commonTypes-C-g8nFFC.mjs';
@@ -1,4 +1,4 @@
1
- import React__default, { FC, InputHTMLAttributes } from 'react';
1
+ import React__default, { FC, InputHTMLAttributes, JSX } from 'react';
2
2
  import { ThirdPartyAuthTextsTypes, LoginFormTextsTypes, RegisterFormTextsTypes, NewPasswordTextsTypes, ResetPasswordTextsTypes, BaseInputType, TextInputType, PricingCardProps, PlanFeature, PricingPlanTexts } from '../types/index.js';
3
3
  import { P as PhoneInputProps, S as SelectOptionProps, L as LabelProps, R as RadioOptionsTypes } from '../Radio-cRcIH8_L.js';
4
4
  import { D as DirectionType, a as RadioOptionType, O as OrientationType } from '../commonTypes-C-g8nFFC.js';
@@ -5223,19 +5223,19 @@ var z5 = __toESM(require("zod"));
5223
5223
  var React36 = __toESM(require("react"));
5224
5224
  var import_input_otp = require("input-otp");
5225
5225
 
5226
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5226
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5227
5227
  var import_react43 = require("react");
5228
5228
 
5229
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
5229
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
5230
5230
  var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
5231
5231
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
5232
- return Boolean(className) && array.indexOf(className) === index;
5233
- }).join(" ");
5232
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
5233
+ }).join(" ").trim();
5234
5234
 
5235
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5235
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5236
5236
  var import_react42 = require("react");
5237
5237
 
5238
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
5238
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
5239
5239
  var defaultAttributes = {
5240
5240
  xmlns: "http://www.w3.org/2000/svg",
5241
5241
  width: 24,
@@ -5248,7 +5248,7 @@ var defaultAttributes = {
5248
5248
  strokeLinejoin: "round"
5249
5249
  };
5250
5250
 
5251
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5251
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5252
5252
  var Icon = (0, import_react42.forwardRef)(
5253
5253
  ({
5254
5254
  color = "currentColor",
@@ -5280,7 +5280,7 @@ var Icon = (0, import_react42.forwardRef)(
5280
5280
  }
5281
5281
  );
5282
5282
 
5283
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5283
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5284
5284
  var createLucideIcon = (iconName, iconNode) => {
5285
5285
  const Component = (0, import_react43.forwardRef)(
5286
5286
  ({ className, ...props }, ref) => (0, import_react43.createElement)(Icon, {
@@ -5294,7 +5294,7 @@ var createLucideIcon = (iconName, iconNode) => {
5294
5294
  return Component;
5295
5295
  };
5296
5296
 
5297
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
5297
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
5298
5298
  var Dot = createLucideIcon("Dot", [
5299
5299
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
5300
5300
  ]);
@@ -7708,7 +7708,7 @@ var Usage = (props) => {
7708
7708
 
7709
7709
  lucide-react/dist/esm/shared/src/utils.js:
7710
7710
  (**
7711
- * @license lucide-react v0.441.0 - ISC
7711
+ * @license lucide-react v0.468.0 - ISC
7712
7712
  *
7713
7713
  * This source code is licensed under the ISC license.
7714
7714
  * See the LICENSE file in the root directory of this source tree.
@@ -7716,7 +7716,7 @@ lucide-react/dist/esm/shared/src/utils.js:
7716
7716
 
7717
7717
  lucide-react/dist/esm/defaultAttributes.js:
7718
7718
  (**
7719
- * @license lucide-react v0.441.0 - ISC
7719
+ * @license lucide-react v0.468.0 - ISC
7720
7720
  *
7721
7721
  * This source code is licensed under the ISC license.
7722
7722
  * See the LICENSE file in the root directory of this source tree.
@@ -7724,7 +7724,7 @@ lucide-react/dist/esm/defaultAttributes.js:
7724
7724
 
7725
7725
  lucide-react/dist/esm/Icon.js:
7726
7726
  (**
7727
- * @license lucide-react v0.441.0 - ISC
7727
+ * @license lucide-react v0.468.0 - ISC
7728
7728
  *
7729
7729
  * This source code is licensed under the ISC license.
7730
7730
  * See the LICENSE file in the root directory of this source tree.
@@ -7732,7 +7732,7 @@ lucide-react/dist/esm/Icon.js:
7732
7732
 
7733
7733
  lucide-react/dist/esm/createLucideIcon.js:
7734
7734
  (**
7735
- * @license lucide-react v0.441.0 - ISC
7735
+ * @license lucide-react v0.468.0 - ISC
7736
7736
  *
7737
7737
  * This source code is licensed under the ISC license.
7738
7738
  * See the LICENSE file in the root directory of this source tree.
@@ -7740,7 +7740,7 @@ lucide-react/dist/esm/createLucideIcon.js:
7740
7740
 
7741
7741
  lucide-react/dist/esm/icons/dot.js:
7742
7742
  (**
7743
- * @license lucide-react v0.441.0 - ISC
7743
+ * @license lucide-react v0.468.0 - ISC
7744
7744
  *
7745
7745
  * This source code is licensed under the ISC license.
7746
7746
  * See the LICENSE file in the root directory of this source tree.
@@ -7748,7 +7748,7 @@ lucide-react/dist/esm/icons/dot.js:
7748
7748
 
7749
7749
  lucide-react/dist/esm/lucide-react.js:
7750
7750
  (**
7751
- * @license lucide-react v0.441.0 - ISC
7751
+ * @license lucide-react v0.468.0 - ISC
7752
7752
  *
7753
7753
  * This source code is licensed under the ISC license.
7754
7754
  * See the LICENSE file in the root directory of this source tree.
@@ -17,10 +17,10 @@ import {
17
17
  TabsList,
18
18
  TabsTrigger,
19
19
  Textarea
20
- } from "../chunk-FTS7YP7U.mjs";
20
+ } from "../chunk-NJJVVA2A.mjs";
21
21
  import {
22
22
  getHotkeyHandler
23
- } from "../chunk-3AANFRLZ.mjs";
23
+ } from "../chunk-Z3ZL22XB.mjs";
24
24
  import {
25
25
  BadEmoji,
26
26
  Button,
@@ -45,7 +45,7 @@ import {
45
45
  VeryGoodEmoji,
46
46
  cn
47
47
  } from "../chunk-YGLAEAJY.mjs";
48
- import "../chunk-5SQBJRWE.mjs";
48
+ import "../chunk-OWMN44TT.mjs";
49
49
 
50
50
  // blocks/auth/AuthButtons.tsx
51
51
  import React from "react";
@@ -12,7 +12,7 @@ type LabelProps = {
12
12
  };
13
13
 
14
14
  declare const buttonVariants: (props?: ({
15
- variant?: "link" | "default" | "combobox" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "neoBrutalism" | null | undefined;
15
+ variant?: "link" | "combobox" | "default" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "neoBrutalism" | null | undefined;
16
16
  size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "heightless" | "smallIcon" | null | undefined;
17
17
  } & class_variance_authority_types.ClassProp) | undefined) => string;
18
18
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -12,7 +12,7 @@ type LabelProps = {
12
12
  };
13
13
 
14
14
  declare const buttonVariants: (props?: ({
15
- variant?: "link" | "default" | "combobox" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "neoBrutalism" | null | undefined;
15
+ variant?: "link" | "combobox" | "default" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "neoBrutalism" | null | undefined;
16
16
  size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "heightless" | "smallIcon" | null | undefined;
17
17
  } & class_variance_authority_types.ClassProp) | undefined) => string;
18
18
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -6,7 +6,7 @@ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
6
6
  /** The text inside the chip */
7
7
  label: string;
8
8
  /** The small icon before the chip label */
9
- icon?: JSX.Element;
9
+ icon?: React__default.JSX.Element;
10
10
  /** The color of the chip, must be a tailwind color */
11
11
  color?: ChipColors;
12
12
  /** The size of the chip */
@@ -21,7 +21,7 @@ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTML
21
21
  /** The text inside the chip */
22
22
  label: string;
23
23
  /** The small icon before the chip label */
24
- icon?: JSX.Element;
24
+ icon?: React__default.JSX.Element;
25
25
  /** The color of the chip, must be a tailwind color */
26
26
  color?: ChipColors;
27
27
  /** The size of the chip */
@@ -6,7 +6,7 @@ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
6
6
  /** The text inside the chip */
7
7
  label: string;
8
8
  /** The small icon before the chip label */
9
- icon?: JSX.Element;
9
+ icon?: React__default.JSX.Element;
10
10
  /** The color of the chip, must be a tailwind color */
11
11
  color?: ChipColors;
12
12
  /** The size of the chip */
@@ -21,7 +21,7 @@ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTML
21
21
  /** The text inside the chip */
22
22
  label: string;
23
23
  /** The small icon before the chip label */
24
- icon?: JSX.Element;
24
+ icon?: React__default.JSX.Element;
25
25
  /** The color of the chip, must be a tailwind color */
26
26
  color?: ChipColors;
27
27
  /** The size of the chip */