@sikka/hawa 0.35.5-next → 0.36.0-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.
- package/dist/{Chip-BtgTAs8x.d.mts → Chip-CGl24Kd9.d.mts} +2 -2
- package/dist/{Chip-DQsP5hFS.d.ts → Chip-Cato49ar.d.ts} +2 -2
- package/dist/accordion/index.d.mts +1 -1
- package/dist/accordion/index.d.ts +1 -1
- package/dist/accordion/index.js +6 -4
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +6 -4
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/appLayout/index.js +180 -172
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +201 -193
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +28 -5
- package/dist/blocks/auth/index.mjs +4 -4
- package/dist/blocks/feedback/index.js +0 -1
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.js +94 -69
- package/dist/blocks/index.mjs +12 -12
- package/dist/blocks/misc/index.js +81 -56
- package/dist/blocks/misc/index.mjs +65 -65
- package/dist/blocks/pricing/index.js +6 -4
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/chip/index.d.mts +2 -2
- package/dist/chip/index.d.ts +2 -2
- package/dist/chip/index.js +6 -4
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/index.mjs +6 -4
- package/dist/chip/index.mjs.map +1 -1
- package/dist/{chunk-HSRW7X3Z.mjs → chunk-6QIOEUE2.mjs} +1 -1
- package/dist/{chunk-JEZLVXSU.mjs → chunk-BXBSZD5X.mjs} +26 -2
- package/dist/{chunk-LVXG3SMD.mjs → chunk-CJ57JBYA.mjs} +6 -4
- package/dist/{chunk-CD6AQVU3.mjs → chunk-HLYAX77R.mjs} +0 -1
- package/dist/{chunk-G7JHUC5N.mjs → chunk-NNPNQK6F.mjs} +211 -4
- package/dist/chunk-SYGWSBJL.mjs +63 -0
- package/dist/{chunk-TERP5K6R.mjs → chunk-T33FXOHA.mjs} +29 -189
- package/dist/colorPicker/index.js +1 -1
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs +1 -1
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/dataTable/index.js +41 -5
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +41 -5
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +1 -0
- package/dist/datePicker/index.d.ts +1 -0
- package/dist/datePicker/index.js +3 -2
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +3 -2
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +8 -4
- package/dist/elements/index.d.ts +8 -4
- package/dist/elements/index.js +124 -87
- package/dist/elements/index.mjs +25 -13
- package/dist/hooks/index.d.mts +4 -1
- package/dist/hooks/index.d.ts +4 -1
- package/dist/hooks/index.js +31 -2
- package/dist/hooks/index.mjs +4 -2
- package/dist/index.css +10 -0
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +225 -189
- package/dist/index.mjs +771 -736
- package/dist/input/index.d.mts +6 -2
- package/dist/input/index.d.ts +6 -2
- package/dist/input/index.js +26 -2
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +26 -2
- package/dist/input/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +289 -281
- package/dist/layout/index.mjs +24 -56
- package/dist/passwordInput/index.js +26 -2
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +26 -2
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +1 -2
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +1 -2
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +1 -1
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +1 -1
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/select/index.js +0 -1
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +0 -1
- package/dist/select/index.mjs.map +1 -1
- package/dist/sidebar/index.js +6 -4
- package/dist/sidebar/index.js.map +1 -1
- package/dist/sidebar/index.mjs +6 -4
- package/dist/sidebar/index.mjs.map +1 -1
- package/dist/tabs/index.d.mts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/tabs/index.js +26 -24
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +30 -28
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +7 -8
- package/dist/chunk-545D35G6.mjs +0 -54
package/dist/chip/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/chip/Chip.tsx","../../util/index.ts"],"sourcesContent":["import React from \"react\";\n\nimport {
|
1
|
+
{"version":3,"sources":["../../elements/chip/Chip.tsx","../../util/index.ts"],"sourcesContent":["import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { RadiusType } from \"@_types/commonTypes\";\n\nexport type ChipColors =\n | \"green\"\n | \"blue\"\n | \"red\"\n | \"yellow\"\n | \"orange\"\n | \"purple\"\n | \"cyan\"\n | \"hyper\"\n | \"oceanic\";\n\nexport type ChipTypes = React.HTMLAttributes<HTMLSpanElement> & {\n /** The text inside the chip */\n label: string;\n /** The small icon before the chip label */\n icon?: JSX.Element;\n /** The color of the chip, must be a tailwind color */\n color?: ChipColors;\n /** The size of the chip */\n size?: \"small\" | \"normal\" | \"large\";\n /** Enable/Disable the dot before the label of the chip */\n dot?: boolean;\n /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */\n dotStatus?: \"available\" | \"unavailable\" | \"none\";\n radius?: RadiusType;\n};\n\nexport const Chip = React.forwardRef<HTMLSpanElement, ChipTypes>(\n (\n {\n label,\n size = \"normal\",\n icon,\n color,\n radius = \"inherit\",\n dot,\n dotStatus = \"none\",\n ...rest\n },\n ref,\n ) => {\n let defaultStyles =\n \"hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold \";\n let radiusStyles = {\n inherit: \" hawa-rounded\",\n full: \"hawa-rounded-full\",\n none: \"hawa-rounded-none\",\n };\n let sizeStyles = {\n small:\n \"hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 \",\n normal: \"hawa-h-fit hawa-text-xs\",\n large: \"hawa-text-base\",\n };\n let dotStyles = {\n small: \"hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full\",\n normal: \"hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full\",\n large: \"hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full\",\n };\n let dotStatusStyles = {\n none: \"hawa-bg-gray-500 dark:hawa-bg-gray-800\",\n available: \"hawa-bg-green-500\",\n unavailable: \"hawa-bg-red-500\",\n };\n let colorStyles: any = {\n green:\n \"hawa-bg-green-200 hawa-text-green-700 dark:hawa-bg-green-700 dark:hawa-text-green-200\",\n blue: \"hawa-bg-blue-200 hawa-text-blue-700 dark:hawa-bg-blue-700 dark:hawa-text-blue-100\",\n red: \"hawa-bg-red-200 hawa-text-red-700 dark:hawa-bg-red-700 dark:hawa-text-red-100\",\n yellow:\n \"hawa-bg-yellow-200 hawa-text-yellow-700 dark:hawa-bg-yellow-600 dark:hawa-text-black\",\n orange:\n \"hawa-bg-orange-200 hawa-text-orange-700 dark:hawa-bg-orange-700 dark:hawa-text-orange-100\",\n purple:\n \"hawa-bg-purple-200 hawa-text-purple-700 dark:hawa-bg-purple-700 dark:hawa-text-purple-100\",\n cyan: \"hawa-bg-cyan-200 hawa-text-cyan-700 dark:hawa-bg-cyan-700 dark:hawa-text-cyan-100\",\n hyper:\n \"hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 \",\n oceanic:\n \"hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600\",\n };\n if (label) {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n defaultStyles,\n sizeStyles[size],\n radiusStyles[radius],\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\",\n )}\n >\n {dot && (\n <span\n className={cn(dotStyles[size], dotStatusStyles[dotStatus])}\n ></span>\n )}\n {icon && icon}\n {label}\n </span>\n );\n } else {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n \"hawa-h-2 hawa-w-2 hawa-rounded-full\",\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\",\n )}\n ></span>\n );\n }\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(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\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,WAAW;;;ACAlB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;AD4BO,IAAM,OAAO,MAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,YAAY;AAAA,IACZ,GAAG;AAAA,EACL,GACA,QACG;AACH,QAAI,gBACF;AACF,QAAI,eAAe;AAAA,MACjB,SAAS;AAAA,MACT,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AACA,QAAI,aAAa;AAAA,MACf,OACE;AAAA,MACF,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,YAAY;AAAA,MACd,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,kBAAkB;AAAA,MACpB,MAAM;AAAA,MACN,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AACA,QAAI,cAAmB;AAAA,MACrB,OACE;AAAA,MACF,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QACE;AAAA,MACF,QACE;AAAA,MACF,QACE;AAAA,MACF,MAAM;AAAA,MACN,OACE;AAAA,MACF,SACE;AAAA,IACJ;AACA,QAAI,OAAO;AACT,aACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,WAAW,IAAI;AAAA,YACf,aAAa,MAAM;AAAA,YACnB,QAAQ,YAAY,KAAK,IAAI;AAAA,UAC/B;AAAA;AAAA,QAEC,OACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,UAAU,IAAI,GAAG,gBAAgB,SAAS,CAAC;AAAA;AAAA,QAC1D;AAAA,QAEF,QAAQ;AAAA,QACR;AAAA,MACH;AAAA,IAEJ,OAAO;AACL,aACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,QAAQ,YAAY,KAAK,IAAI;AAAA,UAC/B;AAAA;AAAA,MACD;AAAA,IAEL;AAAA,EACF;AACF;","names":[]}
|
@@ -33,7 +33,7 @@ var Input = forwardRef(
|
|
33
33
|
auto: ""
|
34
34
|
};
|
35
35
|
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
36
|
-
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
36
|
+
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm placeholder:hawa-text-muted-foreground";
|
37
37
|
const handleChange = (e) => {
|
38
38
|
let newValue = e.target.value;
|
39
39
|
if (props.prefixText) {
|
@@ -72,7 +72,31 @@ var Input = forwardRef(
|
|
72
72
|
)
|
73
73
|
},
|
74
74
|
props.outsidePrefix
|
75
|
-
), props.isLoading ? /* @__PURE__ */ React.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React.createElement(
|
75
|
+
), props.isLoading ? /* @__PURE__ */ React.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ React.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React.createElement(
|
76
|
+
Skeleton,
|
77
|
+
{
|
78
|
+
animation: "none",
|
79
|
+
className: "hawa-h-[40px] hawa-w-full !hawa-bg-destructive/[0.3]",
|
80
|
+
content: /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React.createElement(
|
81
|
+
"svg",
|
82
|
+
{
|
83
|
+
xmlns: "http://www.w3.org/2000/svg",
|
84
|
+
width: "20",
|
85
|
+
height: "20",
|
86
|
+
viewBox: "0 0 24 24",
|
87
|
+
fill: "none",
|
88
|
+
stroke: "currentColor",
|
89
|
+
strokeWidth: "2",
|
90
|
+
strokeLinecap: "round",
|
91
|
+
strokeLinejoin: "round",
|
92
|
+
className: "hawa-text-destructive"
|
93
|
+
},
|
94
|
+
/* @__PURE__ */ React.createElement("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
95
|
+
/* @__PURE__ */ React.createElement("path", { d: "M12 9v4" }),
|
96
|
+
/* @__PURE__ */ React.createElement("path", { d: "M12 17h.01" })
|
97
|
+
), /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", { className: "hawa-text-destructive" }, props.loadingErrorMesssage || "Error loading data")))
|
98
|
+
}
|
99
|
+
)) : /* @__PURE__ */ React.createElement(React.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React.createElement(
|
76
100
|
"div",
|
77
101
|
{
|
78
102
|
className: cn(
|
@@ -52,7 +52,8 @@ var Chip = React2.forwardRef(
|
|
52
52
|
icon,
|
53
53
|
color,
|
54
54
|
radius = "inherit",
|
55
|
-
|
55
|
+
dot,
|
56
|
+
dotStatus = "none",
|
56
57
|
...rest
|
57
58
|
}, ref) => {
|
58
59
|
let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
|
@@ -71,7 +72,8 @@ var Chip = React2.forwardRef(
|
|
71
72
|
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
72
73
|
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
73
74
|
};
|
74
|
-
let
|
75
|
+
let dotStatusStyles = {
|
76
|
+
none: "hawa-bg-gray-500 dark:hawa-bg-gray-800",
|
75
77
|
available: "hawa-bg-green-500",
|
76
78
|
unavailable: "hawa-bg-red-500"
|
77
79
|
};
|
@@ -99,10 +101,10 @@ var Chip = React2.forwardRef(
|
|
99
101
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
100
102
|
)
|
101
103
|
},
|
102
|
-
|
104
|
+
dot && /* @__PURE__ */ React2.createElement(
|
103
105
|
"span",
|
104
106
|
{
|
105
|
-
className: cn(dotStyles[size],
|
107
|
+
className: cn(dotStyles[size], dotStatusStyles[dotStatus])
|
106
108
|
}
|
107
109
|
),
|
108
110
|
icon && icon,
|
@@ -936,7 +936,8 @@ var Chip = React9.forwardRef(
|
|
936
936
|
icon,
|
937
937
|
color,
|
938
938
|
radius = "inherit",
|
939
|
-
|
939
|
+
dot,
|
940
|
+
dotStatus = "none",
|
940
941
|
...rest
|
941
942
|
}, ref) => {
|
942
943
|
let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
|
@@ -955,7 +956,8 @@ var Chip = React9.forwardRef(
|
|
955
956
|
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
956
957
|
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
957
958
|
};
|
958
|
-
let
|
959
|
+
let dotStatusStyles = {
|
960
|
+
none: "hawa-bg-gray-500 dark:hawa-bg-gray-800",
|
959
961
|
available: "hawa-bg-green-500",
|
960
962
|
unavailable: "hawa-bg-red-500"
|
961
963
|
};
|
@@ -983,10 +985,10 @@ var Chip = React9.forwardRef(
|
|
983
985
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
984
986
|
)
|
985
987
|
},
|
986
|
-
|
988
|
+
dot && /* @__PURE__ */ React9.createElement(
|
987
989
|
"span",
|
988
990
|
{
|
989
|
-
className: cn(dotStyles[size],
|
991
|
+
className: cn(dotStyles[size], dotStatusStyles[dotStatus])
|
990
992
|
}
|
991
993
|
),
|
992
994
|
icon && icon,
|
@@ -1398,6 +1400,202 @@ var DropdownMenuRadio = (props) => {
|
|
1398
1400
|
)));
|
1399
1401
|
};
|
1400
1402
|
|
1403
|
+
// icons/Emojis.tsx
|
1404
|
+
import React11 from "react";
|
1405
|
+
var VeryGoodEmoji = () => /* @__PURE__ */ React11.createElement(
|
1406
|
+
"svg",
|
1407
|
+
{
|
1408
|
+
fill: "none",
|
1409
|
+
height: "16",
|
1410
|
+
viewBox: "0 0 16 16",
|
1411
|
+
width: "16",
|
1412
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1413
|
+
},
|
1414
|
+
/* @__PURE__ */ React11.createElement("g", { clipPath: "url(#clip0_53_166)" }, /* @__PURE__ */ React11.createElement(
|
1415
|
+
"path",
|
1416
|
+
{
|
1417
|
+
clipRule: "evenodd",
|
1418
|
+
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM4.5 8.97498H3.875V9.59998C3.875 11.4747 5.81046 12.8637 7.99817 12.8637C10.1879 12.8637 12.125 11.4832 12.125 9.59998V8.97498H11.5H4.5ZM7.99817 11.6137C6.59406 11.6137 5.63842 10.9482 5.28118 10.225H10.7202C10.3641 10.9504 9.40797 11.6137 7.99817 11.6137Z",
|
1419
|
+
fill: "currentColor",
|
1420
|
+
fillRule: "evenodd"
|
1421
|
+
}
|
1422
|
+
), /* @__PURE__ */ React11.createElement(
|
1423
|
+
"path",
|
1424
|
+
{
|
1425
|
+
clipRule: "evenodd",
|
1426
|
+
d: "M6.15295 4.92093L5.375 3.5L4.59705 4.92093L3 5.21885L4.11625 6.39495L3.90717 8L5.375 7.30593L6.84283 8L6.63375 6.39495L7.75 5.21885L6.15295 4.92093ZM11.403 4.92093L10.625 3.5L9.84705 4.92093L8.25 5.21885L9.36625 6.39495L9.15717 8L10.625 7.30593L12.0928 8L11.8837 6.39495L13 5.21885L11.403 4.92093Z",
|
1427
|
+
fill: "#FF990A",
|
1428
|
+
fillRule: "evenodd"
|
1429
|
+
}
|
1430
|
+
))
|
1431
|
+
);
|
1432
|
+
var GoodEmoji = () => /* @__PURE__ */ React11.createElement(
|
1433
|
+
"svg",
|
1434
|
+
{
|
1435
|
+
fill: "none",
|
1436
|
+
height: "16",
|
1437
|
+
viewBox: "0 0 16 16",
|
1438
|
+
width: "16",
|
1439
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1440
|
+
},
|
1441
|
+
/* @__PURE__ */ React11.createElement("g", { clipPath: "url(#clip0_53_167)" }, /* @__PURE__ */ React11.createElement(
|
1442
|
+
"path",
|
1443
|
+
{
|
1444
|
+
clipRule: "evenodd",
|
1445
|
+
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5249 10.8478L11.8727 10.3286L10.8342 9.6329L10.4863 10.1522C9.94904 10.9543 9.0363 11.4802 8.00098 11.4802C6.96759 11.4802 6.05634 10.9563 5.51863 10.1567L5.16986 9.63804L4.13259 10.3356L4.48137 10.8542C5.2414 11.9844 6.53398 12.7302 8.00098 12.7302C9.47073 12.7302 10.7654 11.9816 11.5249 10.8478ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z",
|
1446
|
+
fill: "currentColor",
|
1447
|
+
fillRule: "evenodd"
|
1448
|
+
}
|
1449
|
+
))
|
1450
|
+
);
|
1451
|
+
var BadEmoji = () => /* @__PURE__ */ React11.createElement(
|
1452
|
+
"svg",
|
1453
|
+
{
|
1454
|
+
fill: "none",
|
1455
|
+
height: "16",
|
1456
|
+
viewBox: "0 0 16 16",
|
1457
|
+
width: "16",
|
1458
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1459
|
+
},
|
1460
|
+
/* @__PURE__ */ React11.createElement("g", { clipPath: "url(#clip0_53_152)" }, /* @__PURE__ */ React11.createElement(
|
1461
|
+
"path",
|
1462
|
+
{
|
1463
|
+
clipRule: "evenodd",
|
1464
|
+
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM5.75 7.75C6.30228 7.75 6.75 7.30228 6.75 6.75C6.75 6.19772 6.30228 5.75 5.75 5.75C5.19772 5.75 4.75 6.19772 4.75 6.75C4.75 7.30228 5.19772 7.75 5.75 7.75ZM11.25 6.75C11.25 7.30228 10.8023 7.75 10.25 7.75C9.69771 7.75 9.25 7.30228 9.25 6.75C9.25 6.19772 9.69771 5.75 10.25 5.75C10.8023 5.75 11.25 6.19772 11.25 6.75ZM11.5249 11.2622L11.8727 11.7814L10.8342 12.4771L10.4863 11.9578C9.94904 11.1557 9.0363 10.6298 8.00098 10.6298C6.96759 10.6298 6.05634 11.1537 5.51863 11.9533L5.16986 12.4719L4.13259 11.7744L4.48137 11.2558C5.2414 10.1256 6.53398 9.37982 8.00098 9.37982C9.47073 9.37982 10.7654 10.1284 11.5249 11.2622Z",
|
1465
|
+
fill: "currentColor",
|
1466
|
+
fillRule: "evenodd"
|
1467
|
+
}
|
1468
|
+
))
|
1469
|
+
);
|
1470
|
+
var VeryBadEmoji = () => /* @__PURE__ */ React11.createElement(
|
1471
|
+
"svg",
|
1472
|
+
{
|
1473
|
+
fill: "none",
|
1474
|
+
height: "16",
|
1475
|
+
viewBox: "0 0 16 16",
|
1476
|
+
width: "16",
|
1477
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1478
|
+
},
|
1479
|
+
/* @__PURE__ */ React11.createElement("g", { clipPath: "url(#clip0_53_151)" }, /* @__PURE__ */ React11.createElement(
|
1480
|
+
"path",
|
1481
|
+
{
|
1482
|
+
d: "M11.841 12.0225C12.7197 12.9324 12.7197 14.4077 11.841 15.3176C10.9623 16.2275 9.53769 16.2275 8.65901 15.3176C7.78033 14.4077 7.78033 12.9324 8.65901 12.0225L10.25 10.375L11.841 12.0225Z",
|
1483
|
+
fill: "#0070F3"
|
1484
|
+
}
|
1485
|
+
), /* @__PURE__ */ React11.createElement(
|
1486
|
+
"path",
|
1487
|
+
{
|
1488
|
+
clipRule: "evenodd",
|
1489
|
+
d: "M8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 10.9668 3.48826 13.4711 6.20649 14.2496L5.79351 15.6916C2.44895 14.7338 0 11.6539 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 9.4652 15.6054 10.8405 14.9162 12.023L13.6203 11.2677C14.1794 10.3083 14.5 9.19272 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z",
|
1490
|
+
fill: "currentColor",
|
1491
|
+
fillRule: "evenodd"
|
1492
|
+
}
|
1493
|
+
))
|
1494
|
+
);
|
1495
|
+
|
1496
|
+
// icons/InputIcons.tsx
|
1497
|
+
import React12 from "react";
|
1498
|
+
var EyeIcon = (props) => /* @__PURE__ */ React12.createElement("div", { className: cn("hawa-h-5 hawa-w-5", props.className) }, /* @__PURE__ */ React12.createElement(
|
1499
|
+
"svg",
|
1500
|
+
{
|
1501
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1502
|
+
viewBox: "0 0 24 24",
|
1503
|
+
fill: "none",
|
1504
|
+
stroke: "currentColor",
|
1505
|
+
strokeWidth: "2",
|
1506
|
+
strokeLinecap: "round",
|
1507
|
+
strokeLinejoin: "round"
|
1508
|
+
},
|
1509
|
+
/* @__PURE__ */ React12.createElement("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
1510
|
+
/* @__PURE__ */ React12.createElement("circle", { cx: "12", cy: "12", r: "3" })
|
1511
|
+
));
|
1512
|
+
var HiddenEyeIcon = (props) => /* @__PURE__ */ React12.createElement("div", { className: cn("hawa-h-5 hawa-w-5", props.className) }, /* @__PURE__ */ React12.createElement(
|
1513
|
+
"svg",
|
1514
|
+
{
|
1515
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1516
|
+
viewBox: "0 0 24 24",
|
1517
|
+
fill: "none",
|
1518
|
+
stroke: "currentColor",
|
1519
|
+
strokeWidth: "2",
|
1520
|
+
strokeLinecap: "round",
|
1521
|
+
strokeLinejoin: "round"
|
1522
|
+
},
|
1523
|
+
/* @__PURE__ */ React12.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
|
1524
|
+
/* @__PURE__ */ React12.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
|
1525
|
+
/* @__PURE__ */ React12.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
|
1526
|
+
/* @__PURE__ */ React12.createElement("line", { x1: "2", x2: "22", y1: "2", y2: "22" })
|
1527
|
+
));
|
1528
|
+
|
1529
|
+
// icons/CommonIcons.tsx
|
1530
|
+
import React13 from "react";
|
1531
|
+
var CheckMark = ({ size = "default", className }) => {
|
1532
|
+
let sizeStyles = {
|
1533
|
+
default: "hawa-h-5 hawa-w-5",
|
1534
|
+
sm: "hawa-h-3 hawa-w-3"
|
1535
|
+
};
|
1536
|
+
return /* @__PURE__ */ React13.createElement(
|
1537
|
+
"svg",
|
1538
|
+
{
|
1539
|
+
className: cn(sizeStyles[size], className),
|
1540
|
+
"aria-hidden": "true",
|
1541
|
+
fill: "currentColor",
|
1542
|
+
viewBox: "0 0 20 20"
|
1543
|
+
},
|
1544
|
+
/* @__PURE__ */ React13.createElement(
|
1545
|
+
"path",
|
1546
|
+
{
|
1547
|
+
fillRule: "evenodd",
|
1548
|
+
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
1549
|
+
clipRule: "evenodd"
|
1550
|
+
}
|
1551
|
+
)
|
1552
|
+
);
|
1553
|
+
};
|
1554
|
+
var UncheckMark = ({ size = "default", className }) => {
|
1555
|
+
let sizeStyles = {
|
1556
|
+
default: "hawa-h-5 hawa-w-5",
|
1557
|
+
sm: "hawa-h-3 hawa-w-3"
|
1558
|
+
};
|
1559
|
+
return /* @__PURE__ */ React13.createElement(
|
1560
|
+
"svg",
|
1561
|
+
{
|
1562
|
+
className: cn(sizeStyles[size], className),
|
1563
|
+
"aria-hidden": "true",
|
1564
|
+
fill: "currentColor",
|
1565
|
+
viewBox: "0 0 20 20"
|
1566
|
+
},
|
1567
|
+
/* @__PURE__ */ React13.createElement(
|
1568
|
+
"path",
|
1569
|
+
{
|
1570
|
+
fillRule: "evenodd",
|
1571
|
+
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
1572
|
+
clipRule: "evenodd"
|
1573
|
+
}
|
1574
|
+
)
|
1575
|
+
);
|
1576
|
+
};
|
1577
|
+
var MenuIcon = () => /* @__PURE__ */ React13.createElement(
|
1578
|
+
"svg",
|
1579
|
+
{
|
1580
|
+
"aria-label": "Menu Button",
|
1581
|
+
stroke: "currentColor",
|
1582
|
+
fill: "currentColor",
|
1583
|
+
strokeWidth: 0,
|
1584
|
+
viewBox: "0 0 20 20",
|
1585
|
+
"aria-hidden": "true",
|
1586
|
+
height: "1.6em",
|
1587
|
+
width: "1.6em"
|
1588
|
+
},
|
1589
|
+
/* @__PURE__ */ React13.createElement(
|
1590
|
+
"path",
|
1591
|
+
{
|
1592
|
+
fillRule: "evenodd",
|
1593
|
+
clipRule: "evenodd",
|
1594
|
+
d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
1595
|
+
}
|
1596
|
+
)
|
1597
|
+
);
|
1598
|
+
|
1401
1599
|
export {
|
1402
1600
|
cn,
|
1403
1601
|
calculateLuminance,
|
@@ -1414,6 +1612,15 @@ export {
|
|
1414
1612
|
CardContent,
|
1415
1613
|
CardFooter,
|
1416
1614
|
Skeleton,
|
1615
|
+
VeryGoodEmoji,
|
1616
|
+
GoodEmoji,
|
1617
|
+
BadEmoji,
|
1618
|
+
VeryBadEmoji,
|
1619
|
+
EyeIcon,
|
1620
|
+
HiddenEyeIcon,
|
1621
|
+
CheckMark,
|
1622
|
+
UncheckMark,
|
1623
|
+
MenuIcon,
|
1417
1624
|
Chip,
|
1418
1625
|
DropdownMenuRoot,
|
1419
1626
|
DropdownMenuTrigger,
|
@@ -0,0 +1,63 @@
|
|
1
|
+
"use client";
|
2
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
3
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
4
|
+
}) : x)(function(x) {
|
5
|
+
if (typeof require !== "undefined")
|
6
|
+
return require.apply(this, arguments);
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
8
|
+
});
|
9
|
+
|
10
|
+
// hooks/useBreakpoint.ts
|
11
|
+
import { useState, useEffect } from "react";
|
12
|
+
var useBreakpoint = () => {
|
13
|
+
const [breakpoint, setBreakpoint] = useState(null);
|
14
|
+
useEffect(() => {
|
15
|
+
if (typeof window !== "undefined") {
|
16
|
+
const resize = () => {
|
17
|
+
setBreakpoint(window.innerWidth);
|
18
|
+
};
|
19
|
+
resize();
|
20
|
+
window.addEventListener("resize", resize);
|
21
|
+
return () => {
|
22
|
+
window.removeEventListener("resize", resize);
|
23
|
+
};
|
24
|
+
}
|
25
|
+
}, []);
|
26
|
+
return breakpoint;
|
27
|
+
};
|
28
|
+
|
29
|
+
// hooks/useClickOutside.ts
|
30
|
+
import { useEffect as useEffect2, useRef } from "react";
|
31
|
+
var DEFAULT_EVENTS = ["mousedown", "touchstart"];
|
32
|
+
function useClickOutside(handler, events, nodes) {
|
33
|
+
const ref = useRef();
|
34
|
+
useEffect2(() => {
|
35
|
+
const listener = (event) => {
|
36
|
+
const { target } = event != null ? event : {};
|
37
|
+
if (Array.isArray(nodes)) {
|
38
|
+
const shouldIgnore = (target == null ? void 0 : target.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(target) && target.tagName !== "HTML";
|
39
|
+
const shouldTrigger = nodes.every(
|
40
|
+
(node) => !!node && !event.composedPath().includes(node)
|
41
|
+
);
|
42
|
+
shouldTrigger && !shouldIgnore && handler();
|
43
|
+
} else if (ref.current && !ref.current.contains(target)) {
|
44
|
+
handler();
|
45
|
+
}
|
46
|
+
};
|
47
|
+
(events || DEFAULT_EVENTS).forEach(
|
48
|
+
(fn) => document.addEventListener(fn, listener)
|
49
|
+
);
|
50
|
+
return () => {
|
51
|
+
(events || DEFAULT_EVENTS).forEach(
|
52
|
+
(fn) => document.removeEventListener(fn, listener)
|
53
|
+
);
|
54
|
+
};
|
55
|
+
}, [ref, handler, nodes]);
|
56
|
+
return ref;
|
57
|
+
}
|
58
|
+
|
59
|
+
export {
|
60
|
+
__require,
|
61
|
+
useBreakpoint,
|
62
|
+
useClickOutside
|
63
|
+
};
|