@sikka/hawa 0.40.1-next → 0.41.1-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/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/alert/index.js +1 -1
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +1 -1
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +15 -15
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +15 -15
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appMenubar/index.js.map +1 -1
- package/dist/appMenubar/index.mjs.map +1 -1
- package/dist/appTabs/index.js +2 -2
- package/dist/appTabs/index.js.map +1 -1
- package/dist/appTabs/index.mjs +2 -2
- package/dist/appTabs/index.mjs.map +1 -1
- package/dist/appTopbar/index.js +5 -5
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs +5 -5
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/avatar/index.js +1 -1
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar/index.mjs +1 -1
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/backToTop/index.js +1 -1
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +1 -1
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/badge/index.d.mts +1 -1
- package/dist/badge/index.d.ts +1 -1
- package/dist/badge/index.js +1 -1
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +1 -1
- package/dist/badge/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +102 -17
- package/dist/blocks/auth/index.mjs +100 -15
- package/dist/blocks/feedback/index.js +20 -21
- package/dist/blocks/feedback/index.mjs +18 -20
- package/dist/blocks/index.js +150 -66
- package/dist/blocks/index.mjs +47 -49
- package/dist/blocks/misc/index.js +17 -19
- package/dist/blocks/misc/index.mjs +11 -11
- package/dist/blocks/pricing/index.js +23 -23
- package/dist/blocks/pricing/index.mjs +21 -21
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/card/index.js +1 -1
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +1 -1
- package/dist/card/index.mjs.map +1 -1
- package/dist/carousel/index.d.mts +1 -1
- package/dist/carousel/index.d.ts +1 -1
- package/dist/carousel/index.js +7 -7
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +7 -7
- package/dist/carousel/index.mjs.map +1 -1
- package/dist/checkbox/index.js +2 -2
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs +2 -2
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/{chunk-27G5FKOP.mjs → chunk-2GEXJLRC.mjs} +1 -1
- package/dist/{chunk-QSEQS7DS.mjs → chunk-7R25FOBM.mjs} +17 -17
- package/dist/{chunk-AJTYKC5R.mjs → chunk-CQYG77SY.mjs} +1 -1
- package/dist/{chunk-QZIENYTE.mjs → chunk-D7HDVJFT.mjs} +3 -3
- package/dist/{chunk-DYPGZ2IP.mjs → chunk-EBZECS2Z.mjs} +4 -4
- package/dist/{chunk-CTNKKP2O.mjs → chunk-FLMCWOQQ.mjs} +62 -62
- package/dist/{chunk-GU2DOJ7Q.mjs → chunk-FP6763YO.mjs} +89 -4
- package/dist/{chunk-RT2Q3SH7.mjs → chunk-I3AK6DXN.mjs} +3 -3
- package/dist/{chunk-CTZRVSTI.mjs → chunk-K5S7P5ZO.mjs} +4 -4
- package/dist/{chunk-GN7EIDTE.mjs → chunk-QNLA5TSV.mjs} +2 -2
- package/dist/codeBlock/index.js +5 -5
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +5 -5
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.js +7 -7
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +7 -7
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.js +5 -5
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +5 -5
- package/dist/command/index.mjs.map +1 -1
- package/dist/dataTable/index.d.mts +6 -1
- package/dist/dataTable/index.d.ts +6 -1
- package/dist/dataTable/index.js +459 -245
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +476 -262
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/destroyableCard/index.js +1 -1
- package/dist/destroyableCard/index.js.map +1 -1
- package/dist/destroyableCard/index.mjs +1 -1
- package/dist/destroyableCard/index.mjs.map +1 -1
- package/dist/dialog/index.js +4 -4
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +4 -4
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +92 -9
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +92 -9
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/docsSidebar/index.js +1 -1
- package/dist/docsSidebar/index.js.map +1 -1
- package/dist/docsSidebar/index.mjs +1 -1
- package/dist/docsSidebar/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.js +3 -3
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +3 -3
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +12 -2
- package/dist/elements/index.d.ts +12 -2
- package/dist/elements/index.js +656 -493
- package/dist/elements/index.mjs +288 -210
- package/dist/fileDropzone/index.js +5 -5
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +5 -5
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/glow/index.js.map +1 -1
- package/dist/glow/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index.css +27 -127
- package/dist/index.d.mts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +732 -570
- package/dist/index.mjs +822 -660
- package/dist/input/index.js +3 -3
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +3 -3
- package/dist/input/index.mjs.map +1 -1
- package/dist/interfaceSettings/index.js +4 -4
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +4 -4
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/label/index.js.map +1 -1
- package/dist/label/index.mjs.map +1 -1
- package/dist/layout/index.js +119 -36
- package/dist/layout/index.mjs +31 -31
- package/dist/loading/index.js.map +1 -1
- package/dist/loading/index.mjs.map +1 -1
- package/dist/logos/index.d.mts +5 -0
- package/dist/logos/index.d.ts +5 -0
- package/dist/logos/index.js +85 -0
- package/dist/logos/index.js.map +1 -1
- package/dist/logos/index.mjs +85 -0
- package/dist/logos/index.mjs.map +1 -1
- package/dist/navbar/index.js +12 -12
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +12 -12
- package/dist/navbar/index.mjs.map +1 -1
- package/dist/navigationMenu/index.js +5 -5
- package/dist/navigationMenu/index.js.map +1 -1
- package/dist/navigationMenu/index.mjs +5 -5
- package/dist/navigationMenu/index.mjs.map +1 -1
- package/dist/pagination/index.js.map +1 -1
- package/dist/pagination/index.mjs.map +1 -1
- package/dist/passwordInput/index.js +3 -3
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +3 -3
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +4 -4
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +4 -4
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/index.mjs.map +1 -1
- package/dist/progressCircle/index.js +1 -1
- package/dist/progressCircle/index.js.map +1 -1
- package/dist/progressCircle/index.mjs +1 -1
- package/dist/progressCircle/index.mjs.map +1 -1
- package/dist/radio/index.js +3 -3
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +3 -3
- package/dist/radio/index.mjs.map +1 -1
- package/dist/scrollArea/index.js +2 -2
- package/dist/scrollArea/index.js.map +1 -1
- package/dist/scrollArea/index.mjs +2 -2
- package/dist/scrollArea/index.mjs.map +1 -1
- package/dist/scrollIndicator/index.js.map +1 -1
- package/dist/scrollIndicator/index.mjs.map +1 -1
- package/dist/select/index.js +2 -2
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +2 -2
- package/dist/select/index.mjs.map +1 -1
- package/dist/separator/index.js.map +1 -1
- package/dist/separator/index.mjs.map +1 -1
- package/dist/sheet/index.js +1 -1
- package/dist/sheet/index.js.map +1 -1
- package/dist/sheet/index.mjs +1 -1
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/sidebar/index.js +5 -5
- package/dist/sidebar/index.js.map +1 -1
- package/dist/sidebar/index.mjs +5 -5
- package/dist/sidebar/index.mjs.map +1 -1
- package/dist/signature/index.js.map +1 -1
- package/dist/signature/index.mjs.map +1 -1
- package/dist/simpleTable/index.js +5 -5
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs +5 -5
- package/dist/simpleTable/index.mjs.map +1 -1
- package/dist/slider/index.js.map +1 -1
- package/dist/slider/index.mjs.map +1 -1
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +27 -27
- package/dist/splitButton/index.d.ts +27 -27
- package/dist/splitButton/index.js +750 -750
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +752 -752
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/stats/index.js +3 -5
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs +3 -5
- package/dist/stats/index.mjs.map +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/index.mjs +1 -1
- package/dist/switch/index.mjs.map +1 -1
- package/dist/table/index.js +4 -4
- package/dist/table/index.js.map +1 -1
- package/dist/table/index.mjs +4 -4
- package/dist/table/index.mjs.map +1 -1
- package/dist/tabs/index.js +2 -2
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +2 -2
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +1 -1
- package/dist/textarea/index.mjs.map +1 -1
- package/dist/toaster/index.js +1 -1
- package/dist/toaster/index.js.map +1 -1
- package/dist/toaster/index.mjs +1 -1
- package/dist/toaster/index.mjs.map +1 -1
- package/dist/tooltip/index.js.map +1 -1
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/fileDropzone/FileDropzone.tsx","../../elements/alert/Alert.tsx","../../util/index.ts","../../elements/button/Button.tsx","../../elements/helperText/HelperText.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/loading/Loading.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { useDropzone } from \"react-dropzone\";\n\nimport clsx from \"clsx\";\n\nimport { Alert } from \"../alert/Alert\";\nimport { Button } from \"../button\";\n\ntype FileDropzoneTypes = {\n /** The text label above the component. Consistant with the other form input fields */\n label?: string;\n files: [File];\n setFiles: any;\n setDeletedFiles: any;\n maxFiles: number;\n accept: any;\n onAcceptedFiles: any;\n showPreview: any;\n onDeleteFile: any;\n onClearFiles: any;\n maxSize: number;\n errorMessages: string;\n disclaimer?: boolean;\n termsLink?: string;\n privacyLink?: string;\n /** The translation object, use this to replace the default text with any translated text you want.*/\n texts: {\n errorUploading: any;\n clickHereToUpload: any;\n maxFileSize: any;\n tooManyFiles: any;\n fileTooLarge: any;\n acceptedFileTypes: any;\n invalidFileType: any;\n terms?: string;\n privacyPolicy?: string;\n disclaimer?: string;\n and?: string;\n };\n};\n\nexport const FileDropzone: React.FunctionComponent<FileDropzoneTypes> = ({\n texts,\n files,\n setFiles,\n setDeletedFiles,\n onAcceptedFiles,\n errorMessages,\n maxFiles,\n accept,\n showPreview,\n onDeleteFile,\n onClearFiles,\n disclaimer,\n maxSize,\n label,\n termsLink,\n privacyLink\n}) => {\n const [cmp, setCmp] = useState(0);\n const [max, setMax] = useState<any>(0);\n\n const {\n getRootProps,\n getInputProps,\n fileRejections,\n acceptedFiles,\n isDragActive\n } = useDropzone({\n multiple: true,\n accept: accept,\n maxSize: maxSize,\n maxFiles: maxFiles,\n onDrop: (acceptedFiles: any) => {\n setFiles(\n acceptedFiles.map((file: any, index: any) =>\n Object.assign(file, {\n preview: URL.createObjectURL(file)\n })\n )\n );\n }\n });\n useEffect(\n () => () => {\n files?.forEach((file: any) => {\n URL.revokeObjectURL(file.preview);\n });\n },\n [files]\n );\n useEffect(() => {\n setFiles(acceptedFiles);\n }, [acceptedFiles, cmp, setFiles]);\n onClearFiles = () => {\n acceptedFiles.length = 0;\n acceptedFiles.splice(0, acceptedFiles.length);\n setFiles([]);\n };\n\n const clearAllFiles = () => {\n acceptedFiles.length = 0;\n setFiles([]);\n };\n\n useEffect(() => {\n if (maxSize > 0) {\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(maxSize) / Math.log(1024));\n\n setMax(\n parseFloat((maxSize / Math.pow(1024, i)).toFixed(2)) + \" \" + sizes[i]\n );\n }\n }, [maxSize]);\n const errs = fileRejections.map((rej: any, i: any) => {\n switch (rej.errors[0].code) {\n case \"file-too-large\":\n return (\n <Alert\n key={i}\n text={rej.file.name}\n title={texts.fileTooLarge}\n severity=\"error\"\n />\n );\n case \"too-many-files\":\n return (\n <Alert\n key={i}\n text={rej.file.name}\n title={texts.tooManyFiles}\n severity=\"error\"\n />\n );\n case \"file-invalid-type\":\n return (\n <Alert\n key={i}\n text={rej.file.name}\n title={texts.invalidFileType}\n severity=\"error\"\n />\n );\n\n default:\n return (\n <Alert\n key={i}\n text={rej.file.name}\n title={rej.errors[0].code}\n severity=\"error\"\n />\n );\n }\n });\n const thumbs = files?.map((file: any, index: any) => (\n <div className=\"hawa-relative hawa-rounded\" key={index}>\n <button\n onClick={(e) => {\n e.stopPropagation();\n acceptedFiles.splice(acceptedFiles.indexOf(file), 1);\n setCmp(Math.random);\n onDeleteFile(file);\n }}\n type=\"button\"\n className=\"hawa-absolute hawa-left-0 hawa-ml-auto hawa-inline-flex hawa-items-center hawa-rounded-inner hawa-rounded-bl-none hawa-rounded-tr-none hawa-bg-gray-900 hawa-p-1.5 hawa-text-sm hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-200 hover:hawa-text-gray-900 dark:hover:hawa-bg-gray-600 dark:hover:hawa-text-white\"\n data-modal-toggle=\"defaultModal\"\n >\n <svg\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"hawa-sr-only\">Close modal</span>\n </button>\n\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n overflow: \"hidden\",\n height: 100,\n width: 100,\n backgroundImage: `url(${file.preview})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n border: \"1px solid black\"\n }}\n className=\"hawa-rounded\"\n key={file.name}\n />\n </div>\n ));\n\n return (\n <div>\n {label && (\n <div className=\"hawa-mb-2 hawa-block hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300\">\n {label}\n </div>\n )}\n <div\n className={clsx(\n \"hawa-flex hawa-flex-col hawa-justify-center hawa-rounded hawa-border hawa-border-dashed hawa-p-6 hawa-transition-all \",\n isDragActive\n ? \"hawa-bg-muted\"\n : \"hawa-bg-muted/20 hover:hawa-bg-muted/50 \"\n )}\n >\n <div {...getRootProps({})}>\n <p {...getInputProps()} />\n <div className=\"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4 hawa-text-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1.5em\"\n width=\"1.5em\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M19 11v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\"></path>\n <path d=\"M13 13l9 3l-4 2l-2 4l-3 -9\"></path>\n <path d=\"M3 3l0 .01\"></path>\n <path d=\"M7 3l0 .01\"></path>\n <path d=\"M11 3l0 .01\"></path>\n <path d=\"M15 3l0 .01\"></path>\n <path d=\"M3 7l0 .01\"></path>\n <path d=\"M3 11l0 .01\"></path>\n <path d=\"M3 15l0 .01\"></path>\n </svg>\n {typeof texts.clickHereToUpload === \"function\"\n ? texts.clickHereToUpload()\n : texts.clickHereToUpload}\n </div>\n <div className=\"hawa-select-none hawa-pt-2 hawa-text-center hawa-text-xs\">\n {texts.acceptedFileTypes} {accept.split(\",\")}\n </div>\n <div className=\"hawa-select-none hawa-pb-2 hawa-pt-1 hawa-text-center hawa-text-xs\">\n {texts.maxFileSize} {max}\n </div>\n </div>\n {acceptedFiles.length > 0 && (\n <div className=\"hawa-flex hawa-justify-center hawa-rounded-lg hawa-p-2 \">\n <Button onClick={clearAllFiles}>Clear All</Button>\n </div>\n )}\n {acceptedFiles.length > 0 && thumbs && showPreview ? (\n <aside className=\"hawa-flex hawa-flex-row hawa-flex-wrap hawa-justify-center hawa-gap-2 hawa-rounded-lg hawa-p-2\">\n {thumbs}\n </aside>\n ) : null}\n <div className=\"px-4\">{fileRejections[0]?.errors[0]?.code && errs}</div>\n </div>\n {disclaimer && (\n <div className=\"hawa-mt-2 hawa-text-sm hawa-text-muted-foreground/50\">\n {texts.disclaimer ?? \"By uploading a file you agree to our\"}{\" \"}\n <a\n href={termsLink}\n className=\"clickable-link hawa-text-muted-foreground/50\"\n >\n {texts.terms ?? \"Terms\"}\n </a>{\" \"}\n {texts.and ?? \"and\"}{\" \"}\n <a\n href={privacyLink}\n className=\"clickable-link hawa-text-muted-foreground/50\"\n >\n {texts.privacyPolicy ?? \"Privacy Policy\"}\n </a>\n </div>\n )}\n </div>\n );\n};\n","import React, { useRef, useState, useEffect } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, SeverityType } from \"@_types/commonTypes\";\n\nimport { Button } from \"../button\";\n\ntype AlertTypes = {\n severity?: SeverityType | \"hyper\" | \"oceanic\";\n /** The title of the alert placed above the text of the alert. Can be used alone */\n title?: React.ReactNode;\n /** The text of the alert placed below the title of the alert. Can be used alone */\n text: React.ReactNode;\n /** The duration for the alert to stay on the screen */\n duration?: number;\n direction?: DirectionType;\n actions?: [\n {\n label: string;\n onClick: any;\n variant:\n | \"outline\"\n | \"link\"\n | \"default\"\n | \"destructive\"\n | \"secondary\"\n | \"ghost\";\n }\n ];\n /** Removes the close button */\n persistent?: boolean;\n icon?: any;\n className?: string;\n onAlertClosed?: () => void;\n noDestroy?: boolean;\n};\n\nexport const Alert: React.FunctionComponent<AlertTypes> = ({\n direction = \"ltr\",\n severity = \"none\",\n duration,\n icon,\n className,\n ...props\n}) => {\n const alertRef = useRef<HTMLDivElement>(null);\n const [closed, setClosed] = useState(false);\n\n useEffect(() => {\n if (duration) {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n setClosed(true);\n }, duration);\n //To destroy the component after hiding it\n const timeoutDestroy = setTimeout(() => {\n setClosed(true);\n if (alertRef?.current) {\n alertRef?.current.removeChild(alertRef?.current.children[0]);\n }\n }, duration + 1000);\n\n return () => {\n clearTimeout(timeoutHide);\n clearTimeout(timeoutDestroy);\n };\n }\n }, [duration]);\n\n let closeButtonStyle = {\n none: \"\",\n info: \"\",\n warning: \"\",\n error: \"\",\n success: \"\",\n hyper: \"\",\n oceanic: \"\"\n };\n let styleVariant = {\n none: \"hawa-bg-background hawa-border\",\n info: \"hawa-text-info-foreground hawa-bg-info/90\",\n warning: \"hawa-text-warning-foreground hawa-bg-warning/90\",\n error: \"hawa-text-destructive-foreground hawa-bg-destructive/90\",\n success: \"hawa-text-success-foreground hawa-bg-success/90\",\n hyper:\n \"hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-700 hawa-via-red-500 hawa-to-yellow-600 \",\n oceanic:\n \"hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-500 hawa-via-blue-700 hawa-to-purple-500\"\n };\n\n return (\n <div ref={alertRef}>\n <div\n data-testid=\"alert\"\n aria-label=\"Alert\"\n role=\"alert\"\n dir={direction}\n className={cn(\n \"hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all\",\n styleVariant[severity],\n closed ? \"hawa-opacity-0\" : \"hawa-opacity-100\",\n className\n )}\n >\n <div className=\"hawa-flex hawa-flex-row\">\n {icon && (\n <div\n className={\n direction === \"rtl\"\n ? \"hawa-pl-2 hawa-pt-1\"\n : \"hawa-pr-2 hawa-pt-1\"\n }\n >\n {icon}\n </div>\n )}\n <div className=\"hawa-flex hawa-flex-col\">\n <span\n className={cn(\n \"hawa-font-bold\",\n direction === \"rtl\" ? \"hawa-ml-8\" : \"hawa-mr-8\"\n )}\n >\n {props.title}\n </span>\n <span\n className={cn(\n direction === \"rtl\" ? \"hawa-ml-8\" : \"hawa-mr-8\",\n props.persistent ? \"hawa-w-full\" : \"hawa-w-[calc(100% - 40px)]\"\n )}\n >\n {props.text}\n </span>\n {props.actions && (\n <div className=\"hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2\">\n {props.actions.map((act, index) => (\n <Button\n key={index}\n variant={act.variant}\n onClick={act.onClick()}\n >\n {act.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n </div>\n {!props.persistent && (\n <button\n type=\"button\"\n data-dismiss-target=\"#alert-default\"\n aria-label=\"Close\"\n className={cn(\n \"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900\",\n closeButtonStyle[severity],\n direction === \"rtl\" ? \"hawa-left-2\" : \"hawa-right-2\"\n )}\n onClick={() => {\n if (props.onAlertClosed) {\n props.onAlertClosed();\n }\n if (!props.noDestroy) {\n setClosed(true);\n setTimeout(() => {\n if (alertRef?.current) {\n alertRef?.current.removeChild(\n alertRef?.current.children[0]\n );\n }\n }, 200);\n }\n }}\n >\n <span className=\"hawa-sr-only\">Close</span>\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n )}\n </div>\n </div>\n );\n};\n","import { 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","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { HelperText } from \"../helperText\";\nimport { Label, LabelProps } from \"../label\";\nimport { Loading } from \"../loading/Loading\";\n\nconst buttonVariants = cva(\n \"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90\",\n light: \"hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40\",\n destructive:\n \"hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90\",\n outline:\n \"hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n secondary:\n \"hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80\",\n ghost: \"hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n link: \"hawa-text-primary hawa-underline-offset-4 hover:hawa-underline\",\n combobox: \"hawa-bg-background hawa-border\",\n neoBrutalism: \"neo-brutalism\",\n // \"hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active\",\n },\n size: {\n default: \"hawa-h-10 hawa-px-4 hawa-py-2\",\n heightless: \"hawa-px-4 hawa-py-4\",\n xs: \"hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 \",\n sm: \"hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3\",\n lg: \"hawa-h-11 hawa-rounded-md hawa-px-8\",\n xl: \"hawa-h-14 hawa-rounded-md hawa-px-10\",\n icon: \"hawa-h-10 hawa-w-10\",\n smallIcon: \"hawa-h-7 hawa-w-7\",\n },\n },\n defaultVariants: { variant: \"default\", size: \"default\" },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n centered?: boolean;\n isLoading?: boolean;\n label?: string;\n labelProps?: LabelProps;\n /** The small red text under the input field to show validation. */\n helperText?: any;\n showHelperText?: boolean;\n /**\n * If true, the button will include a label and helper text. This is useful for forms where the button is part of the form.\n */\n asInput?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n label,\n variant,\n size,\n asChild = false,\n centered = true,\n isLoading,\n children,\n labelProps,\n showHelperText = false,\n asInput = false,\n ...props\n },\n ref,\n ) => {\n const Comp = \"button\";\n\n // Determine the color for the Loading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"hawa-bg-primary\"\n : \"hawa-bg-primary-foreground\";\n\n if (asInput) {\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\">\n {label && <Label {...labelProps}>{label}</Label>}\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\"\n ? \"spinner\"\n : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n {showHelperText && <HelperText helperText={props.helperText} />}\n </div>\n );\n } else {\n return (\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\"\n ? \"spinner\"\n : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n );\n }\n },\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({ helperText }: { helperText?: any }) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all\",\n helperText ? \"hawa-h-4 hawa-opacity-100\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n","import * as React from \"react\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\nimport { Tooltip } from \"../tooltip\";\n\nexport type LabelProps = {\n hint?: React.ReactNode;\n hintSide?: PositionType;\n htmlFor?: string;\n required?: boolean;\n};\n\nconst Label = React.forwardRef<\n HTMLLabelElement,\n React.LabelHTMLAttributes<HTMLLabelElement> & LabelProps\n>(({ className, hint, hintSide, required, children, ...props }, ref) => (\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all\">\n <label\n ref={ref}\n className={cn(\n \"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70\",\n className\n )}\n {...props}\n >\n {children}\n {required && <span className=\"hawa-mx-0.5 hawa-text-red-500\">*</span>}\n </label>\n {hint && (\n <Tooltip\n content={hint}\n side={hintSide}\n triggerProps={{\n tabIndex: -1,\n onClick: (event) => event.preventDefault()\n }}\n >\n <div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hawa-h-[14px] hawa-w-[14px] hawa-cursor-help\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n </div>\n </Tooltip>\n )}\n </div>\n));\n\nLabel.displayName = \"Label\";\n\nexport { Label };\n","import React from \"react\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {\n size?: \"default\" | \"small\" | \"large\";\n }\n>(({ className, sideOffset = 4, size = \"default\", ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n {\n \"hawa-text-xs\": size === \"small\",\n \"hawa-text-xl\": size === \"large\"\n },\n className\n )}\n {...props}\n />\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nconst TooltipArrow = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>\n>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn(className)} {...props} />\n));\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\ntype TooltipTypes = {\n /** Controls the open state of the tooltip. */\n open?: any;\n /** Specifies the side where the tooltip will appear. */\n side?: PositionType;\n /** Content to be displayed within the tooltip. */\n content?: any;\n /** Elements to which the tooltip is anchored. */\n children?: any;\n /** Sets the default open state of the tooltip. */\n defaultOpen?: any;\n /** Event handler for open state changes. */\n onOpenChange?: any;\n /** Duration of the delay before the tooltip appears. */\n delayDuration?: any;\n /** Size of the tooltip. */\n size?: \"default\" | \"small\" | \"large\";\n /** Disables the tooltip. */\n disabled?: boolean;\n triggerProps?: TooltipPrimitive.TooltipTriggerProps;\n contentProps?: TooltipPrimitive.TooltipContentProps;\n providerProps?: TooltipPrimitive.TooltipProviderProps;\n};\n\nconst Tooltip: React.FunctionComponent<TooltipTypes> = ({\n side,\n size,\n open,\n content,\n children,\n disabled,\n defaultOpen,\n onOpenChange,\n triggerProps,\n contentProps,\n providerProps,\n delayDuration = 300,\n ...props\n}) => {\n return (\n <TooltipPrimitive.TooltipProvider\n delayDuration={delayDuration}\n {...providerProps}\n >\n <TooltipPrimitive.Root\n open={!disabled && open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n {...props}\n >\n <TooltipPrimitive.Trigger {...triggerProps}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipContent\n size={size}\n side={side}\n align=\"center\"\n {...contentProps}\n style={{\n ...contentProps?.style,\n maxWidth: \"var(--radix-tooltip-content-available-width)\",\n maxHeight: \"var(--radix-tooltip-content-available-height)\"\n }}\n >\n {content}\n </TooltipContent>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.TooltipProvider>\n );\n};\n\nexport { Tooltip };\n","import React, { FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype LoadingTypes = {\n /** Specifies the size of the loading component.*/\n size?: \"button\" | \"xs\" | \"sm\" | \"normal\" | \"lg\" | \"xl\";\n /** Determines the design of the loading animation.*/\n design?:\n | \"spinner\"\n | \"dots-bounce\"\n | \"dots-pulse\"\n | \"pulse\"\n | \"spinner-dots\"\n | \"squircle\"\n | \"square\"\n | \"progress\"\n | \"orbit\";\n /** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/\n color?: string;\n classNames?: {\n container?: string;\n track?: string;\n car?: string;\n };\n themeMode?: \"dark\" | \"light\";\n};\n\nexport const Loading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"normal\",\n themeMode = \"light\",\n classNames,\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"hawa-h-4 hawa-w-4\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"hawa-h-8 hawa-w-8\",\n lg: \"hawa-h-14 hawa-w-14\",\n xl: \"hawa-h-24 hawa-w-24\"\n };\n let progressSizes = {\n button: \"hawa-h-1\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"\",\n lg: \"hawa-h-6\",\n xl: \"hawa-h-10 hawa-w-64\"\n };\n\n let animationStyles: any = {\n pulse: \"hawa-animate-in hawa-fade-in hawa-duration-1000\",\n bounce: \"hawa-animate-bounce\"\n };\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-row hawa-gap-2\",\n classNames?.container\n )}\n >\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n </div>\n );\n case \"square\":\n return (\n <svg\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n viewBox=\"0 0 35 35\"\n height=\"35\"\n width=\"35\"\n >\n <rect\n className=\"squircle-track\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n />\n <rect\n className=\"square-car\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n pathLength=\"100\"\n />\n </svg>\n );\n case \"squircle\":\n return (\n <svg\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 37 37\"\n height=\"37\"\n width=\"37\"\n preserveAspectRatio=\"xMidYMid meet\"\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n >\n <path\n className={cn(\"squircle-track\", classNames?.track)}\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n <path\n className={cn(\"squircle-car\", classNames?.car)}\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n </svg>\n );\n case \"progress\":\n return (\n <div\n className={cn(\n \"progress-loading after:hawa-rounded hawa-rounded\",\n progressSizes[size],\n classNames?.container\n )}\n ></div>\n );\n case \"orbit\":\n return (\n <div className={cn(\"orbit-container\", classNames?.container)}></div>\n );\n\n default:\n return (\n <svg\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n className={cn(\n \"circle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n >\n <circle\n className={cn(\n \"circle-track\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n },\n classNames?.track\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n pathLength=\"100\"\n />\n <circle\n className={cn(\n \"circle-car\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n },\n classNames?.car\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n fill=\"none\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n />\n </svg>\n );\n }\n};\n"],"mappings":";;;AAAA,OAAOA,UAAS,aAAAC,YAAW,YAAAC,iBAAgB;AAC3C,SAAS,mBAAmB;AAE5B,OAAOC,WAAU;;;ACHjB,OAAOC,UAAS,QAAQ,UAAU,iBAAiB;;;ACAnD,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,YAAYC,YAAW;AAGvB,SAAS,WAA8B;;;ACHvC,OAAO,WAAW;AAIX,IAAM,aAAa,CAAC,EAAE,WAAW,MACtC;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,aAAa,8BAA8B;AAAA,IAC7C;AAAA;AAAA,EAEC;AACH;;;ACZF,YAAYC,YAAW;;;ACAvB,OAAOC,YAAW;AAElB,YAAY,sBAAsB;AAKlC,IAAM,iBAAiBC,OAAM,WAK3B,CAAC,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,GAAG,MAAM,GAAG,QAC5D,gBAAAA,OAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,QACE,gBAAgB,SAAS;AAAA,QACzB,gBAAgB,SAAS;AAAA,MAC3B;AAAA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AAQ,0BAAe,CAAC,MAAhB,mBAAmB,OAAO,OAA1B,mBAA8B,SAAQ,IAAK;AAAA,EACpE,GACC,cACC,gBAAAA,OAAA,cAAC,SAAI,WAAU,2DACZ,WAAM,eAAN,YAAoB,wCAAwC,KAC7D,gBAAAA,OAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,WAAU;AAAA;AAAA,KAET,WAAM,UAAN,YAAe;AAAA,EAClB,GAAK,MACJ,WAAM,QAAN,YAAa,OAAO,KACrB,gBAAAA,OAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,WAAU;AAAA;AAAA,KAET,WAAM,kBAAN,YAAuB;AAAA,EAC1B,CACF,CAEJ;AAEJ;","names":["React","useEffect","useState","clsx","React","React","React","React","React","React","React","React","useState","acceptedFiles","useEffect","React","clsx"]}
|
1
|
+
{"version":3,"sources":["../../elements/fileDropzone/FileDropzone.tsx","../../elements/alert/Alert.tsx","../../util/index.ts","../../elements/button/Button.tsx","../../elements/helperText/HelperText.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/loading/Loading.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { useDropzone } from \"react-dropzone\";\n\nimport clsx from \"clsx\";\n\nimport { Alert } from \"../alert/Alert\";\nimport { Button } from \"../button\";\n\ntype FileDropzoneTypes = {\n /** The text label above the component. Consistant with the other form input fields */\n label?: string;\n files: [File];\n setFiles: any;\n setDeletedFiles: any;\n maxFiles: number;\n accept: any;\n onAcceptedFiles: any;\n showPreview: any;\n onDeleteFile: any;\n onClearFiles: any;\n maxSize: number;\n errorMessages: string;\n disclaimer?: boolean;\n termsLink?: string;\n privacyLink?: string;\n /** The translation object, use this to replace the default text with any translated text you want.*/\n texts: {\n errorUploading: any;\n clickHereToUpload: any;\n maxFileSize: any;\n tooManyFiles: any;\n fileTooLarge: any;\n acceptedFileTypes: any;\n invalidFileType: any;\n terms?: string;\n privacyPolicy?: string;\n disclaimer?: string;\n and?: string;\n };\n};\n\nexport const FileDropzone: React.FunctionComponent<FileDropzoneTypes> = ({\n texts,\n files,\n setFiles,\n setDeletedFiles,\n onAcceptedFiles,\n errorMessages,\n maxFiles,\n accept,\n showPreview,\n onDeleteFile,\n onClearFiles,\n disclaimer,\n maxSize,\n label,\n termsLink,\n privacyLink,\n}) => {\n const [cmp, setCmp] = useState(0);\n const [max, setMax] = useState<any>(0);\n\n const {\n getRootProps,\n getInputProps,\n fileRejections,\n acceptedFiles,\n isDragActive,\n } = useDropzone({\n multiple: true,\n accept: accept,\n maxSize: maxSize,\n maxFiles: maxFiles,\n onDrop: (acceptedFiles: any) => {\n setFiles(\n acceptedFiles.map((file: any, index: any) =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n }),\n ),\n );\n },\n });\n useEffect(\n () => () => {\n files?.forEach((file: any) => {\n URL.revokeObjectURL(file.preview);\n });\n },\n [files],\n );\n useEffect(() => {\n setFiles(acceptedFiles);\n }, [acceptedFiles, cmp, setFiles]);\n onClearFiles = () => {\n acceptedFiles.length = 0;\n acceptedFiles.splice(0, acceptedFiles.length);\n setFiles([]);\n };\n\n const clearAllFiles = () => {\n acceptedFiles.length = 0;\n setFiles([]);\n };\n\n useEffect(() => {\n if (maxSize > 0) {\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(maxSize) / Math.log(1024));\n\n setMax(\n parseFloat((maxSize / Math.pow(1024, i)).toFixed(2)) + \" \" + sizes[i],\n );\n }\n }, [maxSize]);\n const errs = fileRejections.map((rej: any, i: any) => {\n switch (rej.errors[0].code) {\n case \"file-too-large\":\n return (\n <Alert\n key={i}\n text={rej.file.name}\n title={texts.fileTooLarge}\n severity=\"error\"\n />\n );\n case \"too-many-files\":\n return (\n <Alert\n key={i}\n text={rej.file.name}\n title={texts.tooManyFiles}\n severity=\"error\"\n />\n );\n case \"file-invalid-type\":\n return (\n <Alert\n key={i}\n text={rej.file.name}\n title={texts.invalidFileType}\n severity=\"error\"\n />\n );\n\n default:\n return (\n <Alert\n key={i}\n text={rej.file.name}\n title={rej.errors[0].code}\n severity=\"error\"\n />\n );\n }\n });\n const thumbs = files?.map((file: any, index: any) => (\n <div className=\"hawa-relative hawa-rounded\" key={index}>\n <button\n onClick={(e) => {\n e.stopPropagation();\n acceptedFiles.splice(acceptedFiles.indexOf(file), 1);\n setCmp(Math.random);\n onDeleteFile(file);\n }}\n type=\"button\"\n className=\"hawa-absolute hawa-left-0 hawa-ml-auto hawa-inline-flex hawa-items-center hawa-rounded-inner hawa-rounded-bl-none hawa-rounded-tr-none hawa-bg-gray-900 hawa-p-1.5 hawa-text-sm hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-200 hover:hawa-text-gray-900 dark:hover:hawa-bg-gray-600 dark:hover:hawa-text-white\"\n data-modal-toggle=\"defaultModal\"\n >\n <svg\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"hawa-sr-only\">Close modal</span>\n </button>\n\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n overflow: \"hidden\",\n height: 100,\n width: 100,\n backgroundImage: `url(${file.preview})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n border: \"1px solid black\",\n }}\n className=\"hawa-rounded\"\n key={file.name}\n />\n </div>\n ));\n\n return (\n <div>\n {label && (\n <div className=\"hawa-mb-2 hawa-block hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300\">\n {label}\n </div>\n )}\n <div\n className={clsx(\n \"hawa-flex hawa-flex-col hawa-justify-center hawa-rounded hawa-border hawa-border-dashed hawa-p-6 hawa-transition-all\",\n isDragActive\n ? \"hawa-bg-muted\"\n : \"hawa-bg-muted/20 hover:hawa-bg-muted/50\",\n )}\n >\n <div {...getRootProps({})}>\n <p {...getInputProps()} />\n <div className=\"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4 hawa-text-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1.5em\"\n width=\"1.5em\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M19 11v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\"></path>\n <path d=\"M13 13l9 3l-4 2l-2 4l-3 -9\"></path>\n <path d=\"M3 3l0 .01\"></path>\n <path d=\"M7 3l0 .01\"></path>\n <path d=\"M11 3l0 .01\"></path>\n <path d=\"M15 3l0 .01\"></path>\n <path d=\"M3 7l0 .01\"></path>\n <path d=\"M3 11l0 .01\"></path>\n <path d=\"M3 15l0 .01\"></path>\n </svg>\n {typeof texts.clickHereToUpload === \"function\"\n ? texts.clickHereToUpload()\n : texts.clickHereToUpload}\n </div>\n <div className=\"hawa-select-none hawa-pt-2 hawa-text-center hawa-text-xs\">\n {texts.acceptedFileTypes} {accept.split(\",\")}\n </div>\n <div className=\"hawa-select-none hawa-pb-2 hawa-pt-1 hawa-text-center hawa-text-xs\">\n {texts.maxFileSize} {max}\n </div>\n </div>\n {acceptedFiles.length > 0 && (\n <div className=\"hawa-flex hawa-justify-center hawa-rounded-lg hawa-p-2\">\n <Button onClick={clearAllFiles}>Clear All</Button>\n </div>\n )}\n {acceptedFiles.length > 0 && thumbs && showPreview ? (\n <aside className=\"hawa-flex hawa-flex-row hawa-flex-wrap hawa-justify-center hawa-gap-2 hawa-rounded-lg hawa-p-2\">\n {thumbs}\n </aside>\n ) : null}\n <div className=\"px-4\">{fileRejections[0]?.errors[0]?.code && errs}</div>\n </div>\n {disclaimer && (\n <div className=\"hawa-mt-2 hawa-text-sm hawa-text-muted-foreground/50\">\n {texts.disclaimer ?? \"By uploading a file you agree to our\"}{\" \"}\n <a\n href={termsLink}\n className=\"clickable-link hawa-text-muted-foreground/50\"\n >\n {texts.terms ?? \"Terms\"}\n </a>{\" \"}\n {texts.and ?? \"and\"}{\" \"}\n <a\n href={privacyLink}\n className=\"clickable-link hawa-text-muted-foreground/50\"\n >\n {texts.privacyPolicy ?? \"Privacy Policy\"}\n </a>\n </div>\n )}\n </div>\n );\n};\n","import React, { useRef, useState, useEffect } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, SeverityType } from \"@_types/commonTypes\";\n\nimport { Button } from \"../button\";\n\ntype AlertTypes = {\n severity?: SeverityType | \"hyper\" | \"oceanic\";\n /** The title of the alert placed above the text of the alert. Can be used alone */\n title?: React.ReactNode;\n /** The text of the alert placed below the title of the alert. Can be used alone */\n text: React.ReactNode;\n /** The duration for the alert to stay on the screen */\n duration?: number;\n direction?: DirectionType;\n actions?: [\n {\n label: string;\n onClick: any;\n variant:\n | \"outline\"\n | \"link\"\n | \"default\"\n | \"destructive\"\n | \"secondary\"\n | \"ghost\";\n },\n ];\n /** Removes the close button */\n persistent?: boolean;\n icon?: any;\n className?: string;\n onAlertClosed?: () => void;\n noDestroy?: boolean;\n};\n\nexport const Alert: React.FunctionComponent<AlertTypes> = ({\n direction = \"ltr\",\n severity = \"none\",\n duration,\n icon,\n className,\n ...props\n}) => {\n const alertRef = useRef<HTMLDivElement>(null);\n const [closed, setClosed] = useState(false);\n\n useEffect(() => {\n if (duration) {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n setClosed(true);\n }, duration);\n //To destroy the component after hiding it\n const timeoutDestroy = setTimeout(() => {\n setClosed(true);\n if (alertRef?.current) {\n alertRef?.current.removeChild(alertRef?.current.children[0]);\n }\n }, duration + 1000);\n\n return () => {\n clearTimeout(timeoutHide);\n clearTimeout(timeoutDestroy);\n };\n }\n }, [duration]);\n\n let closeButtonStyle = {\n none: \"\",\n info: \"\",\n warning: \"\",\n error: \"\",\n success: \"\",\n hyper: \"\",\n oceanic: \"\",\n };\n let styleVariant = {\n none: \"hawa-bg-background hawa-border\",\n info: \"hawa-text-info-foreground hawa-bg-info/90\",\n warning: \"hawa-text-warning-foreground hawa-bg-warning/90\",\n error: \"hawa-text-destructive-foreground hawa-bg-destructive/90\",\n success: \"hawa-text-success-foreground hawa-bg-success/90\",\n hyper:\n \"hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-700 hawa-via-red-500 hawa-to-yellow-600 \",\n oceanic:\n \"hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-500 hawa-via-blue-700 hawa-to-purple-500\",\n };\n\n return (\n <div ref={alertRef}>\n <div\n data-testid=\"alert\"\n aria-label=\"Alert\"\n role=\"alert\"\n dir={direction}\n className={cn(\n \"hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all\",\n styleVariant[severity],\n closed ? \"hawa-opacity-0\" : \"hawa-opacity-100\",\n className,\n )}\n >\n <div className=\"hawa-flex hawa-flex-row\">\n {icon && (\n <div\n className={\n direction === \"rtl\"\n ? \"hawa-pl-2 hawa-pt-1\"\n : \"hawa-pr-2 hawa-pt-1\"\n }\n >\n {icon}\n </div>\n )}\n <div className=\"hawa-flex hawa-flex-col\">\n <span\n className={cn(\n \"hawa-font-bold\",\n direction === \"rtl\" ? \"hawa-ml-8\" : \"hawa-mr-8\",\n )}\n >\n {props.title}\n </span>\n <span\n className={cn(\n direction === \"rtl\" ? \"hawa-ml-8\" : \"hawa-mr-8\",\n props.persistent ? \"hawa-w-full\" : \"hawa-w-[calc(100% - 40px)]\",\n )}\n >\n {props.text}\n </span>\n {props.actions && (\n <div className=\"hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2\">\n {props.actions.map((act, index) => (\n <Button\n key={index}\n variant={act.variant}\n onClick={act.onClick()}\n >\n {act.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n </div>\n {!props.persistent && (\n <button\n type=\"button\"\n data-dismiss-target=\"#alert-default\"\n aria-label=\"Close\"\n className={cn(\n \"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900\",\n closeButtonStyle[severity],\n direction === \"rtl\" ? \"hawa-left-2\" : \"hawa-right-2\",\n )}\n onClick={() => {\n if (props.onAlertClosed) {\n props.onAlertClosed();\n }\n if (!props.noDestroy) {\n setClosed(true);\n setTimeout(() => {\n if (alertRef?.current) {\n alertRef?.current.removeChild(\n alertRef?.current.children[0],\n );\n }\n }, 200);\n }\n }}\n >\n <span className=\"hawa-sr-only\">Close</span>\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n )}\n </div>\n </div>\n );\n};\n","import { 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","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { HelperText } from \"../helperText\";\nimport { Label, LabelProps } from \"../label\";\nimport { Loading } from \"../loading/Loading\";\n\nconst buttonVariants = cva(\n \"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90\",\n light: \"hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40\",\n destructive:\n \"hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90\",\n outline:\n \"hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n secondary:\n \"hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80\",\n ghost: \"hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n link: \"hawa-text-primary hawa-underline-offset-4 hover:hawa-underline\",\n combobox: \"hawa-bg-background hawa-border\",\n neoBrutalism: \"neo-brutalism\",\n // \"hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active\",\n },\n size: {\n default: \"hawa-h-10 hawa-px-4 hawa-py-2\",\n heightless: \"hawa-px-4 hawa-py-4\",\n xs: \"hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 \",\n sm: \"hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3\",\n lg: \"hawa-h-11 hawa-rounded-md hawa-px-8\",\n xl: \"hawa-h-14 hawa-rounded-md hawa-px-10\",\n icon: \"hawa-h-10 hawa-w-10\",\n smallIcon: \"hawa-h-7 hawa-w-7\",\n },\n },\n defaultVariants: { variant: \"default\", size: \"default\" },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n centered?: boolean;\n isLoading?: boolean;\n label?: string;\n labelProps?: LabelProps;\n /** The small red text under the input field to show validation. */\n helperText?: any;\n showHelperText?: boolean;\n /**\n * If true, the button will include a label and helper text. This is useful for forms where the button is part of the form.\n */\n asInput?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n label,\n variant,\n size,\n asChild = false,\n centered = true,\n isLoading,\n children,\n labelProps,\n showHelperText = false,\n asInput = false,\n ...props\n },\n ref,\n ) => {\n const Comp = \"button\";\n\n // Determine the color for the Loading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"hawa-bg-primary\"\n : \"hawa-bg-primary-foreground\";\n\n if (asInput) {\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\">\n {label && <Label {...labelProps}>{label}</Label>}\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\"\n ? \"spinner\"\n : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n {showHelperText && <HelperText helperText={props.helperText} />}\n </div>\n );\n } else {\n return (\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\"\n ? \"spinner\"\n : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n );\n }\n },\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({ helperText }: { helperText?: any }) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all\",\n helperText ? \"hawa-h-4 hawa-opacity-100\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nimport { Tooltip } from \"../tooltip\";\n\nexport type LabelProps = {\n hint?: React.ReactNode;\n hintSide?: PositionType;\n htmlFor?: string;\n required?: boolean;\n};\n\nconst Label = React.forwardRef<\n HTMLLabelElement,\n React.LabelHTMLAttributes<HTMLLabelElement> & LabelProps\n>(({ className, hint, hintSide, required, children, ...props }, ref) => (\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all\">\n <label\n ref={ref}\n className={cn(\n \"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70\",\n className,\n )}\n {...props}\n >\n {children}\n {required && <span className=\"hawa-mx-0.5 hawa-text-red-500\">*</span>}\n </label>\n {hint && (\n <Tooltip\n content={hint}\n side={hintSide}\n triggerProps={{\n tabIndex: -1,\n onClick: (event) => event.preventDefault(),\n }}\n >\n <div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hawa-h-[14px] hawa-w-[14px] hawa-cursor-help\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n </div>\n </Tooltip>\n )}\n </div>\n));\n\nLabel.displayName = \"Label\";\n\nexport { Label };\n","import React from \"react\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {\n size?: \"default\" | \"small\" | \"large\";\n }\n>(({ className, sideOffset = 4, size = \"default\", ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n {\n \"hawa-text-xs\": size === \"small\",\n \"hawa-text-xl\": size === \"large\",\n },\n className,\n )}\n {...props}\n />\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nconst TooltipArrow = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>\n>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn(className)} {...props} />\n));\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\ntype TooltipTypes = {\n /** Controls the open state of the tooltip. */\n open?: any;\n /** Specifies the side where the tooltip will appear. */\n side?: PositionType;\n /** Content to be displayed within the tooltip. */\n content?: any;\n /** Elements to which the tooltip is anchored. */\n children?: any;\n /** Sets the default open state of the tooltip. */\n defaultOpen?: any;\n /** Event handler for open state changes. */\n onOpenChange?: any;\n /** Duration of the delay before the tooltip appears. */\n delayDuration?: any;\n /** Size of the tooltip. */\n size?: \"default\" | \"small\" | \"large\";\n /** Disables the tooltip. */\n disabled?: boolean;\n triggerProps?: TooltipPrimitive.TooltipTriggerProps;\n contentProps?: TooltipPrimitive.TooltipContentProps;\n providerProps?: TooltipPrimitive.TooltipProviderProps;\n};\n\nconst Tooltip: React.FunctionComponent<TooltipTypes> = ({\n side,\n size,\n open,\n content,\n children,\n disabled,\n defaultOpen,\n onOpenChange,\n triggerProps,\n contentProps,\n providerProps,\n delayDuration = 300,\n ...props\n}) => {\n return (\n <TooltipPrimitive.TooltipProvider\n delayDuration={delayDuration}\n {...providerProps}\n >\n <TooltipPrimitive.Root\n open={!disabled && open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n {...props}\n >\n <TooltipPrimitive.Trigger {...triggerProps}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipContent\n size={size}\n side={side}\n align=\"center\"\n {...contentProps}\n style={{\n ...contentProps?.style,\n maxWidth: \"var(--radix-tooltip-content-available-width)\",\n maxHeight: \"var(--radix-tooltip-content-available-height)\",\n }}\n >\n {content}\n </TooltipContent>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.TooltipProvider>\n );\n};\n\nexport { Tooltip };\n","import React, { FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype LoadingTypes = {\n /** Specifies the size of the loading component.*/\n size?: \"button\" | \"xs\" | \"sm\" | \"normal\" | \"lg\" | \"xl\";\n /** Determines the design of the loading animation.*/\n design?:\n | \"spinner\"\n | \"dots-bounce\"\n | \"dots-pulse\"\n | \"pulse\"\n | \"spinner-dots\"\n | \"squircle\"\n | \"square\"\n | \"progress\"\n | \"orbit\";\n /** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/\n color?: string;\n classNames?: {\n container?: string;\n track?: string;\n car?: string;\n };\n themeMode?: \"dark\" | \"light\";\n};\n\nexport const Loading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"normal\",\n themeMode = \"light\",\n classNames,\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"hawa-h-4 hawa-w-4\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"hawa-h-8 hawa-w-8\",\n lg: \"hawa-h-14 hawa-w-14\",\n xl: \"hawa-h-24 hawa-w-24\",\n };\n let progressSizes = {\n button: \"hawa-h-1\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"\",\n lg: \"hawa-h-6\",\n xl: \"hawa-h-10 hawa-w-64\",\n };\n\n let animationStyles: any = {\n pulse: \"hawa-animate-in hawa-fade-in hawa-duration-1000\",\n bounce: \"hawa-animate-bounce\",\n };\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-row hawa-gap-2\",\n classNames?.container,\n )}\n >\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n </div>\n );\n case \"square\":\n return (\n <svg\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n viewBox=\"0 0 35 35\"\n height=\"35\"\n width=\"35\"\n >\n <rect\n className=\"squircle-track\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n />\n <rect\n className=\"square-car\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n pathLength=\"100\"\n />\n </svg>\n );\n case \"squircle\":\n return (\n <svg\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 37 37\"\n height=\"37\"\n width=\"37\"\n preserveAspectRatio=\"xMidYMid meet\"\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n >\n <path\n className={cn(\"squircle-track\", classNames?.track)}\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n <path\n className={cn(\"squircle-car\", classNames?.car)}\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n </svg>\n );\n case \"progress\":\n return (\n <div\n className={cn(\n \"progress-loading after:hawa-rounded hawa-rounded\",\n progressSizes[size],\n classNames?.container,\n )}\n ></div>\n );\n case \"orbit\":\n return (\n <div className={cn(\"orbit-container\", classNames?.container)}></div>\n );\n\n default:\n return (\n <svg\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n className={cn(\n \"circle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n >\n <circle\n className={cn(\n \"circle-track\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\",\n },\n classNames?.track,\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n pathLength=\"100\"\n />\n <circle\n className={cn(\n \"circle-car\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\",\n },\n classNames?.car,\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n fill=\"none\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n />\n </svg>\n );\n }\n};\n"],"mappings":";;;AAAA,OAAOA,UAAS,aAAAC,YAAW,YAAAC,iBAAgB;AAC3C,SAAS,mBAAmB;AAE5B,OAAOC,WAAU;;;ACHjB,OAAOC,UAAS,QAAQ,UAAU,iBAAiB;;;ACAnD,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,YAAYC,YAAW;AAGvB,SAAS,WAA8B;;;ACHvC,OAAO,WAAW;AAIX,IAAM,aAAa,CAAC,EAAE,WAAW,MACtC;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,aAAa,8BAA8B;AAAA,IAC7C;AAAA;AAAA,EAEC;AACH;;;ACZF,YAAYC,YAAW;;;ACAvB,OAAOC,YAAW;AAElB,YAAY,sBAAsB;AAKlC,IAAM,iBAAiBC,OAAM,WAK3B,CAAC,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,GAAG,MAAM,GAAG,QAC5D,gBAAAA,OAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,QACE,gBAAgB,SAAS;AAAA,QACzB,gBAAgB,SAAS;AAAA,MAC3B;AAAA,MACA;AAAA,IAC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AAC,MAAhB,mBAAmB,OAAO,OAA1B,mBAA8B,SAAQ,IAAK;AAAA,EACpE,GACC,cACC,gBAAAA,OAAA,cAAC,SAAI,WAAU,2DACZ,WAAM,eAAN,YAAoB,wCAAwC,KAC7D,gBAAAA,OAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,WAAU;AAAA;AAAA,KAET,WAAM,UAAN,YAAe;AAAA,EAClB,GAAK,MACJ,WAAM,QAAN,YAAa,OAAO,KACrB,gBAAAA,OAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,WAAU;AAAA;AAAA,KAET,WAAM,kBAAN,YAAuB;AAAA,EAC1B,CACF,CAEJ;AAEJ;","names":["React","useEffect","useState","clsx","React","React","React","React","React","React","React","React","useState","acceptedFiles","useEffect","React","clsx"]}
|
package/dist/glow/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/glow/index.ts","../../elements/glow/Glow.tsx"],"sourcesContent":["export * from \"./Glow\";\n","import React, { CSSProperties, useEffect, useRef } from \"react\";\n\nexport const GlowCapture = ({ className = \"\", size = 400, ...rest }) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n if (e.pointerType === \"mouse\") {\n requestAnimationFrame(() => {\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-x\", `${e.layerX}px`);\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-y\", `${e.layerY}px`);\n });\n }\n };\n\n const leave = () => {\n element.current?.style.removeProperty(\"--glow-x\");\n element.current?.style.removeProperty(\"--glow-y\");\n };\n\n element.current?.addEventListener(\"pointermove\", move, { passive: true });\n element.current?.addEventListener(\"pointerleave\", leave, { passive: true });\n return () => {\n element.current?.removeEventListener(\"pointermove\", move);\n element.current?.removeEventListener(\"pointerleave\", leave);\n };\n }, []);\n\n return (\n <div\n ref={element}\n className={`hawa-glow-capture ${className}`}\n style={\n {\n position: \"relative\",\n \"--glow-size\": `${size}px
|
1
|
+
{"version":3,"sources":["../../elements/glow/index.ts","../../elements/glow/Glow.tsx"],"sourcesContent":["export * from \"./Glow\";\n","import React, { CSSProperties, useEffect, useRef } from \"react\";\n\nexport const GlowCapture = ({ className = \"\", size = 400, ...rest }) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n if (e.pointerType === \"mouse\") {\n requestAnimationFrame(() => {\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-x\", `${e.layerX}px`);\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-y\", `${e.layerY}px`);\n });\n }\n };\n\n const leave = () => {\n element.current?.style.removeProperty(\"--glow-x\");\n element.current?.style.removeProperty(\"--glow-y\");\n };\n\n element.current?.addEventListener(\"pointermove\", move, { passive: true });\n element.current?.addEventListener(\"pointerleave\", leave, { passive: true });\n return () => {\n element.current?.removeEventListener(\"pointermove\", move);\n element.current?.removeEventListener(\"pointerleave\", leave);\n };\n }, []);\n\n return (\n <div\n ref={element}\n className={`hawa-glow-capture ${className}`}\n style={\n {\n position: \"relative\",\n \"--glow-size\": `${size}px`,\n } as CSSProperties\n }\n {...rest}\n />\n );\n};\n\nconst mask = `\nradial-gradient(var(--glow-size) var(--glow-size) at calc(var(--glow-x, -99999px) - var(--glow-left, 0px))\ncalc(var(--glow-y, -99999px) - var(--glow-top, 0px)), #000000 1%, transparent 50%)\n`;\n\nexport const Glow = ({\n className = \"\",\n style = {},\n\n color = \"#f50057\",\n debug = false,\n ...rest\n}) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n });\n\n const capture = element.current?.closest(\".glow-capture\");\n if (capture) observer.observe(capture);\n\n return () => observer.disconnect();\n }, []);\n\n return (\n <div ref={element} className=\"hawa-glow\" style={{ display: \"grid\" }}>\n <div\n className={className}\n style={{\n ...style,\n gridArea: \"1/1/1/1\",\n }}\n {...rest}\n >\n {rest.children}\n </div>\n <div\n className={`glow-mask ${className}`}\n // @ts-ignore\n glow=\"true\"\n style={\n {\n ...style,\n \"--glow-color\": color,\n gridArea: \"1/1/1/1\",\n pointerEvents: \"none\",\n mask: debug ? undefined : mask,\n WebkitMask: debug ? undefined : mask,\n } as CSSProperties\n }\n {...rest}\n >\n {rest.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAwD;AAEjD,IAAM,cAAc,CAAC,EAAE,YAAY,IAAI,OAAO,KAAK,GAAG,KAAK,MAAM;AACtE,QAAM,cAAU,qBAAuB,IAAI;AAE3C,8BAAU,MAAM;AALlB;AAMI,UAAM,OAAO,CAAC,MAAoB;AAChC,UAAI,EAAE,gBAAgB,SAAS;AAC7B,8BAAsB,MAAM;AARpC,cAAAA,KAAAC;AAUU,WAAAD,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,YAAY,YAAY,GAAG,EAAE,MAAM;AAE1D,WAAAC,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,YAAY,YAAY,GAAG,EAAE,MAAM;AAAA,QAC5D,CAAC;AAAA,MACH;AAAA,IACF;AAEA,UAAM,QAAQ,MAAM;AAjBxB,UAAAD,KAAAC;AAkBM,OAAAD,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,eAAe;AACtC,OAAAC,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,eAAe;AAAA,IACxC;AAEA,kBAAQ,YAAR,mBAA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,UACrB;AAAA,UACA,IAAG,aAAQ,YAAR,mBAAiB,UAAU;AAAA;AAAA,MAElC,CAAC;AAAA,IACH,CAAC;AAED,UAAM,WAAU,aAAQ,YAAR,mBAAiB,QAAQ;AACzC,QAAI;AAAS,eAAS,QAAQ,OAAO;AAErC,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,CAAC;AAEL,SACE,6BAAAE,QAAA,cAAC,SAAI,KAAK,SAAS,WAAU,aAAY,OAAO,EAAE,SAAS,OAAO,KAChE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,GAAG;AAAA,QACH,UAAU;AAAA,MACZ;AAAA,MACC,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,GACA,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,aAAa,SAAS;AAAA,MAEjC,MAAK;AAAA,MACL,OACE;AAAA,QACE,GAAG;AAAA,QACH,gBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,eAAe;AAAA,QACf,MAAM,QAAQ,SAAY;AAAA,QAC1B,YAAY,QAAQ,SAAY;AAAA,MAClC;AAAA,MAED,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,CACF;AAEJ;","names":["_a","_b","React"]}
|
package/dist/glow/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/glow/Glow.tsx"],"sourcesContent":["import React, { CSSProperties, useEffect, useRef } from \"react\";\n\nexport const GlowCapture = ({ className = \"\", size = 400, ...rest }) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n if (e.pointerType === \"mouse\") {\n requestAnimationFrame(() => {\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-x\", `${e.layerX}px`);\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-y\", `${e.layerY}px`);\n });\n }\n };\n\n const leave = () => {\n element.current?.style.removeProperty(\"--glow-x\");\n element.current?.style.removeProperty(\"--glow-y\");\n };\n\n element.current?.addEventListener(\"pointermove\", move, { passive: true });\n element.current?.addEventListener(\"pointerleave\", leave, { passive: true });\n return () => {\n element.current?.removeEventListener(\"pointermove\", move);\n element.current?.removeEventListener(\"pointerleave\", leave);\n };\n }, []);\n\n return (\n <div\n ref={element}\n className={`hawa-glow-capture ${className}`}\n style={\n {\n position: \"relative\",\n \"--glow-size\": `${size}px
|
1
|
+
{"version":3,"sources":["../../elements/glow/Glow.tsx"],"sourcesContent":["import React, { CSSProperties, useEffect, useRef } from \"react\";\n\nexport const GlowCapture = ({ className = \"\", size = 400, ...rest }) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n if (e.pointerType === \"mouse\") {\n requestAnimationFrame(() => {\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-x\", `${e.layerX}px`);\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-y\", `${e.layerY}px`);\n });\n }\n };\n\n const leave = () => {\n element.current?.style.removeProperty(\"--glow-x\");\n element.current?.style.removeProperty(\"--glow-y\");\n };\n\n element.current?.addEventListener(\"pointermove\", move, { passive: true });\n element.current?.addEventListener(\"pointerleave\", leave, { passive: true });\n return () => {\n element.current?.removeEventListener(\"pointermove\", move);\n element.current?.removeEventListener(\"pointerleave\", leave);\n };\n }, []);\n\n return (\n <div\n ref={element}\n className={`hawa-glow-capture ${className}`}\n style={\n {\n position: \"relative\",\n \"--glow-size\": `${size}px`,\n } as CSSProperties\n }\n {...rest}\n />\n );\n};\n\nconst mask = `\nradial-gradient(var(--glow-size) var(--glow-size) at calc(var(--glow-x, -99999px) - var(--glow-left, 0px))\ncalc(var(--glow-y, -99999px) - var(--glow-top, 0px)), #000000 1%, transparent 50%)\n`;\n\nexport const Glow = ({\n className = \"\",\n style = {},\n\n color = \"#f50057\",\n debug = false,\n ...rest\n}) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n });\n\n const capture = element.current?.closest(\".glow-capture\");\n if (capture) observer.observe(capture);\n\n return () => observer.disconnect();\n }, []);\n\n return (\n <div ref={element} className=\"hawa-glow\" style={{ display: \"grid\" }}>\n <div\n className={className}\n style={{\n ...style,\n gridArea: \"1/1/1/1\",\n }}\n {...rest}\n >\n {rest.children}\n </div>\n <div\n className={`glow-mask ${className}`}\n // @ts-ignore\n glow=\"true\"\n style={\n {\n ...style,\n \"--glow-color\": color,\n gridArea: \"1/1/1/1\",\n pointerEvents: \"none\",\n mask: debug ? undefined : mask,\n WebkitMask: debug ? undefined : mask,\n } as CSSProperties\n }\n {...rest}\n >\n {rest.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;AAAA,OAAO,SAAwB,WAAW,cAAc;AAEjD,IAAM,cAAc,CAAC,EAAE,YAAY,IAAI,OAAO,KAAK,GAAG,KAAK,MAAM;AACtE,QAAM,UAAU,OAAuB,IAAI;AAE3C,YAAU,MAAM;AALlB;AAMI,UAAM,OAAO,CAAC,MAAoB;AAChC,UAAI,EAAE,gBAAgB,SAAS;AAC7B,8BAAsB,MAAM;AARpC,cAAAA,KAAAC;AAUU,WAAAD,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,YAAY,YAAY,GAAG,EAAE,MAAM;AAE1D,WAAAC,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,YAAY,YAAY,GAAG,EAAE,MAAM;AAAA,QAC5D,CAAC;AAAA,MACH;AAAA,IACF;AAEA,UAAM,QAAQ,MAAM;AA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KAAA;AA0EQ,sBAAQ,YAAR,mBAAiB,MAAM;AAAA,UACrB;AAAA,UACA,IAAGA,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,SAAS;AAAA;AAE/B,sBAAQ,YAAR,mBAAiB,MAAM;AAAA,UACrB;AAAA,UACA,IAAG,aAAQ,YAAR,mBAAiB,UAAU;AAAA;AAAA,MAElC,CAAC;AAAA,IACH,CAAC;AAED,UAAM,WAAU,aAAQ,YAAR,mBAAiB,QAAQ;AACzC,QAAI;AAAS,eAAS,QAAQ,OAAO;AAErC,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,CAAC;AAEL,SACE,oCAAC,SAAI,KAAK,SAAS,WAAU,aAAY,OAAO,EAAE,SAAS,OAAO,KAChE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,GAAG;AAAA,QACH,UAAU;AAAA,MACZ;AAAA,MACC,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,GACA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,aAAa,SAAS;AAAA,MAEjC,MAAK;AAAA,MACL,OACE;AAAA,QACE,GAAG;AAAA,QACH,gBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,eAAe;AAAA,QACf,MAAM,QAAQ,SAAY;AAAA,QAC1B,YAAY,QAAQ,SAAY;AAAA,MAClC;AAAA,MAED,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,CACF;AAEJ;","names":["_a","_b"]}
|
package/dist/hooks/index.d.mts
CHANGED
@@ -82,7 +82,7 @@ interface UseFocusWithinOptions {
|
|
82
82
|
onFocus?(event: FocusEvent): void;
|
83
83
|
onBlur?(event: FocusEvent): void;
|
84
84
|
}
|
85
|
-
declare function useFocusWithin<T extends HTMLElement = any>({ onBlur, onFocus }?: UseFocusWithinOptions): {
|
85
|
+
declare function useFocusWithin<T extends HTMLElement = any>({ onBlur, onFocus, }?: UseFocusWithinOptions): {
|
86
86
|
ref: React.MutableRefObject<T>;
|
87
87
|
focused: boolean;
|
88
88
|
};
|
package/dist/hooks/index.d.ts
CHANGED
@@ -82,7 +82,7 @@ interface UseFocusWithinOptions {
|
|
82
82
|
onFocus?(event: FocusEvent): void;
|
83
83
|
onBlur?(event: FocusEvent): void;
|
84
84
|
}
|
85
|
-
declare function useFocusWithin<T extends HTMLElement = any>({ onBlur, onFocus }?: UseFocusWithinOptions): {
|
85
|
+
declare function useFocusWithin<T extends HTMLElement = any>({ onBlur, onFocus, }?: UseFocusWithinOptions): {
|
86
86
|
ref: React.MutableRefObject<T>;
|
87
87
|
focused: boolean;
|
88
88
|
};
|
package/dist/index.css
CHANGED
@@ -1248,9 +1248,15 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
1248
1248
|
.hawa-mb-5 {
|
1249
1249
|
margin-bottom: 1.25rem;
|
1250
1250
|
}
|
1251
|
+
.hawa-me-0 {
|
1252
|
+
margin-inline-end: 0px;
|
1253
|
+
}
|
1251
1254
|
.hawa-me-2 {
|
1252
1255
|
margin-inline-end: 0.5rem;
|
1253
1256
|
}
|
1257
|
+
.hawa-me-4 {
|
1258
|
+
margin-inline-end: 1rem;
|
1259
|
+
}
|
1254
1260
|
.hawa-ml-1 {
|
1255
1261
|
margin-left: 0.25rem;
|
1256
1262
|
}
|
@@ -1293,6 +1299,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
1293
1299
|
.hawa-ms-2 {
|
1294
1300
|
margin-inline-start: 0.5rem;
|
1295
1301
|
}
|
1302
|
+
.hawa-ms-4 {
|
1303
|
+
margin-inline-start: 1rem;
|
1304
|
+
}
|
1296
1305
|
.hawa-ms-auto {
|
1297
1306
|
margin-inline-start: auto;
|
1298
1307
|
}
|
@@ -1620,6 +1629,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
1620
1629
|
.hawa-w-9 {
|
1621
1630
|
width: 2.25rem;
|
1622
1631
|
}
|
1632
|
+
.hawa-w-\[0\.5px\] {
|
1633
|
+
width: 0.5px;
|
1634
|
+
}
|
1623
1635
|
.hawa-w-\[1\.2rem\] {
|
1624
1636
|
width: 1.2rem;
|
1625
1637
|
}
|
@@ -1736,9 +1748,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
1736
1748
|
.hawa-max-w-md {
|
1737
1749
|
max-width: 28rem;
|
1738
1750
|
}
|
1739
|
-
.hawa-max-w-screen-sm {
|
1740
|
-
max-width: 640px;
|
1741
|
-
}
|
1742
1751
|
.hawa-max-w-sm {
|
1743
1752
|
max-width: 24rem;
|
1744
1753
|
}
|
@@ -2066,6 +2075,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
2066
2075
|
.hawa-text-wrap {
|
2067
2076
|
text-wrap: wrap;
|
2068
2077
|
}
|
2078
|
+
.hawa-text-nowrap {
|
2079
|
+
text-wrap: nowrap;
|
2080
|
+
}
|
2069
2081
|
.hawa-rounded {
|
2070
2082
|
border-radius: var(--radius);
|
2071
2083
|
}
|
@@ -4333,6 +4345,12 @@ body {
|
|
4333
4345
|
.hawa-peer:checked ~ .dark\:peer-checked\:hawa-text-primary:is(.hawa-dark *) {
|
4334
4346
|
color: hsl(var(--primary));
|
4335
4347
|
}
|
4348
|
+
@media (min-width: 430px) {
|
4349
|
+
|
4350
|
+
.mobile\:hawa-flex-row {
|
4351
|
+
flex-direction: row;
|
4352
|
+
}
|
4353
|
+
}
|
4336
4354
|
@media (min-width: 440px) {
|
4337
4355
|
|
4338
4356
|
.xs\:hawa-max-w-full {
|
@@ -4362,135 +4380,17 @@ body {
|
|
4362
4380
|
}
|
4363
4381
|
@media (min-width: 640px) {
|
4364
4382
|
|
4365
|
-
.
|
4366
|
-
|
4367
|
-
|
4368
|
-
|
4369
|
-
.sm\:hawa-right-0 {
|
4370
|
-
right: 0px;
|
4371
|
-
}
|
4372
|
-
|
4373
|
-
.sm\:hawa-top-auto {
|
4374
|
-
top: auto;
|
4375
|
-
}
|
4376
|
-
|
4377
|
-
.sm\:hawa-max-w-fit {
|
4378
|
-
max-width: -moz-fit-content;
|
4379
|
-
max-width: fit-content;
|
4380
|
-
}
|
4381
|
-
|
4382
|
-
.sm\:hawa-max-w-sm {
|
4383
|
-
max-width: 24rem;
|
4383
|
+
.tablet\:hawa-w-fit {
|
4384
|
+
width: -moz-fit-content;
|
4385
|
+
width: fit-content;
|
4384
4386
|
}
|
4385
4387
|
|
4386
|
-
.
|
4388
|
+
.tablet\:hawa-flex-row {
|
4387
4389
|
flex-direction: row;
|
4388
4390
|
}
|
4389
4391
|
|
4390
|
-
.
|
4391
|
-
|
4392
|
-
}
|
4393
|
-
|
4394
|
-
.sm\:hawa-justify-end {
|
4395
|
-
justify-content: flex-end;
|
4396
|
-
}
|
4397
|
-
|
4398
|
-
.sm\:hawa-space-x-2 > :not([hidden]) ~ :not([hidden]) {
|
4399
|
-
--tw-space-x-reverse: 0;
|
4400
|
-
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
4401
|
-
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
4402
|
-
}
|
4403
|
-
|
4404
|
-
.sm\:hawa-space-x-4 > :not([hidden]) ~ :not([hidden]) {
|
4405
|
-
--tw-space-x-reverse: 0;
|
4406
|
-
margin-right: calc(1rem * var(--tw-space-x-reverse));
|
4407
|
-
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
|
4408
|
-
}
|
4409
|
-
|
4410
|
-
.sm\:hawa-space-y-0 > :not([hidden]) ~ :not([hidden]) {
|
4411
|
-
--tw-space-y-reverse: 0;
|
4412
|
-
margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
|
4413
|
-
margin-bottom: calc(0px * var(--tw-space-y-reverse));
|
4414
|
-
}
|
4415
|
-
|
4416
|
-
.sm\:hawa-rounded {
|
4417
|
-
border-radius: var(--radius);
|
4418
|
-
}
|
4419
|
-
|
4420
|
-
.sm\:hawa-text-left {
|
4421
|
-
text-align: left;
|
4422
|
-
}
|
4423
|
-
|
4424
|
-
.sm\:hawa-text-2xl {
|
4425
|
-
font-size: 1.5rem;
|
4426
|
-
line-height: 2rem;
|
4427
|
-
}
|
4428
|
-
|
4429
|
-
.sm\:hawa-text-base {
|
4430
|
-
font-size: 1rem;
|
4431
|
-
line-height: 1.5rem;
|
4432
|
-
}
|
4433
|
-
|
4434
|
-
.sm\:hawa-text-xl {
|
4435
|
-
font-size: 1.25rem;
|
4436
|
-
line-height: 1.75rem;
|
4437
|
-
}
|
4438
|
-
|
4439
|
-
.data-\[state\=open\]\:sm\:hawa-slide-in-from-bottom-full[data-state=open] {
|
4440
|
-
--tw-enter-translate-y: 100%;
|
4441
|
-
}
|
4442
|
-
}
|
4443
|
-
@media (min-width: 768px) {
|
4444
|
-
|
4445
|
-
.md\:hawa-absolute {
|
4446
|
-
position: absolute;
|
4447
|
-
}
|
4448
|
-
|
4449
|
-
.md\:hawa-flex {
|
4450
|
-
display: flex;
|
4451
|
-
}
|
4452
|
-
|
4453
|
-
.md\:hawa-hidden {
|
4454
|
-
display: none;
|
4455
|
-
}
|
4456
|
-
|
4457
|
-
.md\:hawa-w-\[var\(--radix-navigation-menu-viewport-width\)\] {
|
4458
|
-
width: var(--radix-navigation-menu-viewport-width);
|
4459
|
-
}
|
4460
|
-
|
4461
|
-
.md\:hawa-w-auto {
|
4462
|
-
width: auto;
|
4463
|
-
}
|
4464
|
-
|
4465
|
-
.md\:hawa-w-full {
|
4466
|
-
width: 100%;
|
4467
|
-
}
|
4468
|
-
|
4469
|
-
.md\:hawa-max-w-\[420px\] {
|
4470
|
-
max-width: 420px;
|
4471
|
-
}
|
4472
|
-
|
4473
|
-
.md\:hawa-max-w-sm {
|
4474
|
-
max-width: 24rem;
|
4475
|
-
}
|
4476
|
-
|
4477
|
-
.md\:hawa-flex-row {
|
4478
|
-
flex-direction: row;
|
4479
|
-
}
|
4480
|
-
|
4481
|
-
.md\:hawa-rounded-t {
|
4482
|
-
border-top-left-radius: var(--radius);
|
4483
|
-
border-top-right-radius: var(--radius);
|
4484
|
-
}
|
4485
|
-
|
4486
|
-
.md\:hawa-px-4 {
|
4487
|
-
padding-left: 1rem;
|
4488
|
-
padding-right: 1rem;
|
4489
|
-
}
|
4490
|
-
|
4491
|
-
.md\:hawa-px-64 {
|
4492
|
-
padding-left: 16rem;
|
4493
|
-
padding-right: 16rem;
|
4392
|
+
.tablet\:hawa-gap-0 {
|
4393
|
+
gap: 0px;
|
4494
4394
|
}
|
4495
4395
|
}
|
4496
4396
|
.\[\&\:has\(\[aria-selected\]\)\]\:hawa-bg-accent:has([aria-selected]) {
|
package/dist/index.d.mts
CHANGED
@@ -282,6 +282,11 @@ declare const Logos: {
|
|
282
282
|
twitter: (props: IconProps) => React__default.JSX.Element;
|
283
283
|
x: (props: IconProps) => React__default.JSX.Element;
|
284
284
|
instagram: (props: IconProps) => React__default.JSX.Element;
|
285
|
+
telegram: (props: IconProps) => React__default.JSX.Element;
|
286
|
+
youtube: (props: IconProps) => React__default.JSX.Element;
|
287
|
+
tiktok: (props: IconProps) => React__default.JSX.Element;
|
288
|
+
linkedin: (props: IconProps) => React__default.JSX.Element;
|
289
|
+
behance: (props: IconProps) => React__default.JSX.Element;
|
285
290
|
microsoft: (props: IconProps) => React__default.JSX.Element;
|
286
291
|
github: (props: IconProps) => React__default.JSX.Element;
|
287
292
|
radix: (props: IconProps) => React__default.JSX.Element;
|
@@ -494,15 +499,18 @@ type DataTableProps<DataProps = {}> = {
|
|
494
499
|
enableSearch?: boolean;
|
495
500
|
enableHideColumns?: boolean;
|
496
501
|
enableGoTo?: boolean;
|
502
|
+
enableSelection?: boolean;
|
497
503
|
hideHeader?: boolean;
|
498
504
|
data: DataProps[];
|
499
505
|
itemsPerPage?: any[];
|
500
506
|
showCount?: boolean;
|
507
|
+
showSelectionCount?: boolean;
|
501
508
|
paginationPosition?: "top" | "bottom";
|
502
509
|
condensed?: boolean;
|
503
510
|
isLoading?: boolean;
|
504
511
|
defaultSort?: string;
|
505
512
|
translateFn?: any;
|
513
|
+
bulkActions?: any[];
|
506
514
|
texts?: {
|
507
515
|
columns?: string;
|
508
516
|
searchPlaceholder?: string;
|
@@ -513,6 +521,8 @@ type DataTableProps<DataProps = {}> = {
|
|
513
521
|
of?: string;
|
514
522
|
total?: string;
|
515
523
|
goTo?: string;
|
524
|
+
selectedRows?: string;
|
525
|
+
bulkAction?: string;
|
516
526
|
};
|
517
527
|
};
|
518
528
|
declare module "@tanstack/table-core" {
|
@@ -523,7 +533,7 @@ declare module "@tanstack/table-core" {
|
|
523
533
|
i18nKey?: string;
|
524
534
|
}
|
525
535
|
}
|
526
|
-
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
536
|
+
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
527
537
|
|
528
538
|
type BackToTopTypes = {
|
529
539
|
/** Horizontal padding relative to the attached corner */
|
@@ -938,7 +948,7 @@ type BadgeTypes = {
|
|
938
948
|
className?: string;
|
939
949
|
};
|
940
950
|
declare const Badge: FC<BadgeTypes>;
|
941
|
-
declare const BadgedComponent: ({ children, className, hideBadge, position, size, text }: any) => React__default.JSX.Element;
|
951
|
+
declare const BadgedComponent: ({ children, className, hideBadge, position, size, text, }: any) => React__default.JSX.Element;
|
942
952
|
|
943
953
|
type PhoneInputProps = {
|
944
954
|
preferredCountry?: {
|
@@ -2230,7 +2240,7 @@ interface UseFocusWithinOptions {
|
|
2230
2240
|
onFocus?(event: FocusEvent): void;
|
2231
2241
|
onBlur?(event: FocusEvent): void;
|
2232
2242
|
}
|
2233
|
-
declare function useFocusWithin<T extends HTMLElement = any>({ onBlur, onFocus }?: UseFocusWithinOptions): {
|
2243
|
+
declare function useFocusWithin<T extends HTMLElement = any>({ onBlur, onFocus, }?: UseFocusWithinOptions): {
|
2234
2244
|
ref: React.MutableRefObject<T>;
|
2235
2245
|
focused: boolean;
|
2236
2246
|
};
|