@sikka/hawa 0.30.25-next → 0.30.27-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/blocks/index.js +345 -211
- package/dist/blocks/index.mjs +3 -2
- package/dist/blocks/misc/index.js +289 -155
- package/dist/blocks/misc/index.mjs +212 -76
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/chunk-R2SKHHDK.mjs +411 -0
- package/dist/{chunk-7LAUVLVZ.mjs → chunk-SW7UK35T.mjs} +123 -63
- package/dist/{chunk-H7ZADF2Z.mjs → chunk-UDCDD66A.mjs} +8 -0
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/commonTypes-LrR8QrYP.d.mts +5 -0
- package/dist/commonTypes-LrR8QrYP.d.ts +5 -0
- package/dist/commonTypes-MeUyaBib.d.mts +5 -0
- package/dist/commonTypes-MeUyaBib.d.ts +5 -0
- package/dist/elements/index.d.mts +5 -1
- package/dist/elements/index.d.ts +5 -1
- package/dist/elements/index.js +431 -294
- package/dist/elements/index.mjs +9 -5
- package/dist/floatBox/index.d.mts +14 -0
- package/dist/floatBox/index.d.ts +14 -0
- package/dist/floatBox/index.js +97 -0
- package/dist/floatBox/index.js.map +1 -0
- package/dist/floatBox/index.mjs +61 -0
- package/dist/floatBox/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +12 -2
- package/dist/hooks/index.d.ts +12 -2
- package/dist/hooks/index.js +36 -0
- package/dist/hooks/index.mjs +16 -340
- package/dist/index.css +101 -56
- package/dist/index.d.mts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +7860 -7765
- package/dist/index.mjs +1529 -1437
- package/dist/input/index.d.mts +2 -1
- package/dist/input/index.d.ts +2 -1
- package/dist/label/index.d.mts +1 -2
- package/dist/label/index.d.ts +1 -2
- package/dist/layout/index.mjs +3 -4
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.d.mts +2 -1
- package/dist/phoneInput/index.d.ts +2 -1
- package/dist/popover/index.d.mts +3 -1
- package/dist/popover/index.d.ts +3 -1
- package/dist/popover/index.js +6 -0
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +4 -0
- package/dist/popover/index.mjs.map +1 -1
- package/dist/progress/index.d.mts +8 -1
- package/dist/progress/index.d.ts +8 -1
- package/dist/radio/index.d.mts +9 -1
- package/dist/radio/index.d.ts +9 -1
- package/dist/scrollArea/index.d.mts +1 -1
- package/dist/scrollArea/index.d.ts +1 -1
- package/dist/separator/index.d.mts +1 -1
- package/dist/separator/index.d.ts +1 -1
- package/dist/signature/index.d.mts +1 -2
- package/dist/signature/index.d.ts +1 -2
- package/dist/simpleTable/index.d.mts +1 -1
- package/dist/simpleTable/index.d.ts +1 -1
- package/dist/switch/index.d.mts +2 -1
- package/dist/switch/index.d.ts +2 -1
- package/dist/tabs/index.d.mts +3 -1
- package/dist/tabs/index.d.ts +3 -1
- package/dist/tabs/index.js +172 -38
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +172 -38
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.d.mts +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/toast/index.d.mts +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toaster/index.d.mts +22 -4
- package/dist/toaster/index.d.ts +22 -4
- package/dist/tooltip/index.d.mts +3 -4
- package/dist/tooltip/index.d.ts +3 -4
- package/package.json +8 -8
- package/dist/Label-9FHRF7Ex.d.mts +0 -14
- package/dist/Label-9FHRF7Ex.d.ts +0 -14
- package/dist/chunk-4OOSUQZG.mjs +0 -12
- package/dist/chunk-57SB6MBG.mjs +0 -31
- package/dist/commonTypes-3k5cNB1s.d.mts +0 -4
- package/dist/commonTypes-3k5cNB1s.d.ts +0 -4
- package/dist/commonTypes-PBumfOBg.d.mts +0 -3
- package/dist/commonTypes-PBumfOBg.d.ts +0 -3
- /package/dist/{chunk-CVOMHXJK.mjs → chunk-BXGDHNAY.mjs} +0 -0
package/dist/popover/index.d.mts
CHANGED
@@ -21,5 +21,7 @@ interface PopoverProps {
|
|
21
21
|
type HawaPopoverTypes = PopoverProps & React.ComponentProps<typeof PopoverPrimitive.Root>;
|
22
22
|
declare const Popover: React.FC<HawaPopoverTypes>;
|
23
23
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
24
|
+
declare const PopoverPortal: React.FC<PopoverPrimitive.PopoverPortalProps>;
|
25
|
+
declare const PopoverRoot: React.FC<PopoverPrimitive.PopoverProps>;
|
24
26
|
|
25
|
-
export { Popover, PopoverContent, PopoverTrigger };
|
27
|
+
export { Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger };
|
package/dist/popover/index.d.ts
CHANGED
@@ -21,5 +21,7 @@ interface PopoverProps {
|
|
21
21
|
type HawaPopoverTypes = PopoverProps & React.ComponentProps<typeof PopoverPrimitive.Root>;
|
22
22
|
declare const Popover: React.FC<HawaPopoverTypes>;
|
23
23
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
24
|
+
declare const PopoverPortal: React.FC<PopoverPrimitive.PopoverPortalProps>;
|
25
|
+
declare const PopoverRoot: React.FC<PopoverPrimitive.PopoverProps>;
|
24
26
|
|
25
|
-
export { Popover, PopoverContent, PopoverTrigger };
|
27
|
+
export { Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger };
|
package/dist/popover/index.js
CHANGED
@@ -33,6 +33,8 @@ var popover_exports = {};
|
|
33
33
|
__export(popover_exports, {
|
34
34
|
Popover: () => Popover,
|
35
35
|
PopoverContent: () => PopoverContent,
|
36
|
+
PopoverPortal: () => PopoverPortal,
|
37
|
+
PopoverRoot: () => PopoverRoot,
|
36
38
|
PopoverTrigger: () => PopoverTrigger
|
37
39
|
});
|
38
40
|
module.exports = __toCommonJS(popover_exports);
|
@@ -109,10 +111,14 @@ var Popover = ({
|
|
109
111
|
));
|
110
112
|
};
|
111
113
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
114
|
+
var PopoverPortal = PopoverPrimitive.Portal;
|
115
|
+
var PopoverRoot = PopoverPrimitive.Root;
|
112
116
|
// Annotate the CommonJS export names for ESM import in node:
|
113
117
|
0 && (module.exports = {
|
114
118
|
Popover,
|
115
119
|
PopoverContent,
|
120
|
+
PopoverPortal,
|
121
|
+
PopoverRoot,
|
116
122
|
PopoverTrigger
|
117
123
|
});
|
118
124
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/popover/index.ts","../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Popover\";\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(\n (\n { className, align = \"center\", sideOffset = 4, container, ...props },\n ref
|
1
|
+
{"version":3,"sources":["../../elements/popover/index.ts","../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Popover\";\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(\n (\n { className, align = \"center\", sideOffset = 4, container, ...props },\n ref,\n ) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n ),\n);\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps &\n React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger\n className=\"hawa-w-full\"\n disabled={disableTrigger}\n {...triggerProps}\n >\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width],\n maxWidth: \"var(--radix-popover-content-available-width)\",\n maxHeight: \"var(--radix-popover-content-available-height)\",\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverPortal = PopoverPrimitive.Portal;\nconst PopoverRoot = PopoverPrimitive.Root;\n\nexport { Popover, PopoverPortal, PopoverRoot, PopoverContent, PopoverTrigger };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAEvB,uBAAkC;;;ACFlC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADEA,IAAM,iBAAuB;AAAA,EAM3B,CACE,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,WAAW,GAAG,MAAM,GACnE,QAEA,oCAAkB,yBAAjB,EAAwB,aACvB;AAAA,IAAkB;AAAA,IAAjB;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN,CACF;AAEJ;AACA,eAAe,cAA+B,yBAAQ;AAmBtD,IAAM,UAAsC,CAAC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,MAAI,cAAc;AAAA,IAChB,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAEA,SACE,oCAAkB,uBAAjB,EAAsB,MAAa,GAAG,SACrC;AAAA,IAAkB;AAAA,IAAjB;AAAA,MACC,WAAU;AAAA,MACV,UAAU;AAAA,MACT,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,GACA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,OAAO,YAAY,KAAK;AAAA,QACxB,UAAU;AAAA,QACV,WAAW;AAAA,MACb;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,CACF;AAEJ;AAEA,IAAM,iBAAkC;AACxC,IAAM,gBAAiC;AACvC,IAAM,cAA+B;","names":[]}
|
package/dist/popover/index.mjs
CHANGED
@@ -72,9 +72,13 @@ var Popover = ({
|
|
72
72
|
));
|
73
73
|
};
|
74
74
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
75
|
+
var PopoverPortal = PopoverPrimitive.Portal;
|
76
|
+
var PopoverRoot = PopoverPrimitive.Root;
|
75
77
|
export {
|
76
78
|
Popover,
|
77
79
|
PopoverContent,
|
80
|
+
PopoverPortal,
|
81
|
+
PopoverRoot,
|
78
82
|
PopoverTrigger
|
79
83
|
};
|
80
84
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(\n (\n { className, align = \"center\", sideOffset = 4, container, ...props },\n ref
|
1
|
+
{"version":3,"sources":["../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(\n (\n { className, align = \"center\", sideOffset = 4, container, ...props },\n ref,\n ) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n ),\n);\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps &\n React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger\n className=\"hawa-w-full\"\n disabled={disableTrigger}\n {...triggerProps}\n >\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width],\n maxWidth: \"var(--radix-popover-content-available-width)\",\n maxHeight: \"var(--radix-popover-content-available-height)\",\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverPortal = PopoverPrimitive.Portal;\nconst PopoverRoot = PopoverPrimitive.Root;\n\nexport { Popover, PopoverPortal, PopoverRoot, PopoverContent, PopoverTrigger };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;AAAA,YAAY,WAAW;AAEvB,YAAY,sBAAsB;;;ACFlC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADEA,IAAM,iBAAuB;AAAA,EAM3B,CACE,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,WAAW,GAAG,MAAM,GACnE,QAEA,oCAAkB,yBAAjB,EAAwB,aACvB;AAAA,IAAkB;AAAA,IAAjB;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN,CACF;AAEJ;AACA,eAAe,cAA+B,yBAAQ;AAmBtD,IAAM,UAAsC,CAAC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,MAAI,cAAc;AAAA,IAChB,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAEA,SACE,oCAAkB,uBAAjB,EAAsB,MAAa,GAAG,SACrC;AAAA,IAAkB;AAAA,IAAjB;AAAA,MACC,WAAU;AAAA,MACV,UAAU;AAAA,MACT,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,GACA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,OAAO,YAAY,KAAK;AAAA,QACxB,UAAU;AAAA,QACV,WAAW;AAAA,MACb;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,CACF;AAEJ;AAEA,IAAM,iBAAkC;AACxC,IAAM,gBAAiC;AACvC,IAAM,cAA+B;","names":[]}
|
@@ -1,6 +1,13 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
3
|
-
import {
|
3
|
+
import { P as PositionType } from '../commonTypes-2IGtJ5cq.mjs';
|
4
|
+
|
5
|
+
type LabelProps = {
|
6
|
+
hint?: React.ReactNode;
|
7
|
+
hintSide?: PositionType;
|
8
|
+
htmlFor?: string;
|
9
|
+
required?: boolean;
|
10
|
+
};
|
4
11
|
|
5
12
|
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
6
13
|
label?: string | undefined;
|
package/dist/progress/index.d.ts
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
3
|
-
import {
|
3
|
+
import { P as PositionType } from '../commonTypes-2IGtJ5cq.js';
|
4
|
+
|
5
|
+
type LabelProps = {
|
6
|
+
hint?: React.ReactNode;
|
7
|
+
hintSide?: PositionType;
|
8
|
+
htmlFor?: string;
|
9
|
+
required?: boolean;
|
10
|
+
};
|
4
11
|
|
5
12
|
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
6
13
|
label?: string | undefined;
|
package/dist/radio/index.d.mts
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
+
import * as React from 'react';
|
1
2
|
import React__default from 'react';
|
2
|
-
import {
|
3
|
+
import { P as PositionType, O as OrientationType, D as DirectionType } from '../commonTypes-LrR8QrYP.mjs';
|
4
|
+
|
5
|
+
type LabelProps = {
|
6
|
+
hint?: React.ReactNode;
|
7
|
+
hintSide?: PositionType;
|
8
|
+
htmlFor?: string;
|
9
|
+
required?: boolean;
|
10
|
+
};
|
3
11
|
|
4
12
|
type RadioOptionsTypes = {
|
5
13
|
value: any;
|
package/dist/radio/index.d.ts
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
+
import * as React from 'react';
|
1
2
|
import React__default from 'react';
|
2
|
-
import {
|
3
|
+
import { P as PositionType, O as OrientationType, D as DirectionType } from '../commonTypes-LrR8QrYP.js';
|
4
|
+
|
5
|
+
type LabelProps = {
|
6
|
+
hint?: React.ReactNode;
|
7
|
+
hintSide?: PositionType;
|
8
|
+
htmlFor?: string;
|
9
|
+
required?: boolean;
|
10
|
+
};
|
3
11
|
|
4
12
|
type RadioOptionsTypes = {
|
5
13
|
value: any;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
3
|
-
import { O as OrientationType } from '../commonTypes-
|
3
|
+
import { O as OrientationType } from '../commonTypes-LrR8QrYP.mjs';
|
4
4
|
|
5
5
|
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
6
6
|
orientation?: OrientationType | undefined;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
3
|
-
import { O as OrientationType } from '../commonTypes-
|
3
|
+
import { O as OrientationType } from '../commonTypes-LrR8QrYP.js';
|
4
4
|
|
5
5
|
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
6
6
|
orientation?: OrientationType | undefined;
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default, { FC } from 'react';
|
3
3
|
import { SignaturePadOptions } from 'signature_pad';
|
4
|
-
|
5
|
-
type PositionType = "top" | "bottom" | "right" | "left";
|
4
|
+
import { P as PositionType } from '../commonTypes-_11epZYh.mjs';
|
6
5
|
|
7
6
|
type LabelProps = {
|
8
7
|
hint?: React.ReactNode;
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default, { FC } from 'react';
|
3
3
|
import { SignaturePadOptions } from 'signature_pad';
|
4
|
-
|
5
|
-
type PositionType = "top" | "bottom" | "right" | "left";
|
4
|
+
import { P as PositionType } from '../commonTypes-_11epZYh.js';
|
6
5
|
|
7
6
|
type LabelProps = {
|
8
7
|
hint?: React.ReactNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
3
|
-
import { D as DirectionType } from '../commonTypes-
|
3
|
+
import { D as DirectionType } from '../commonTypes-_11epZYh.mjs';
|
4
4
|
|
5
5
|
type SimpleTableProps<DataProps = {}> = {
|
6
6
|
direction?: DirectionType;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
3
|
-
import { D as DirectionType } from '../commonTypes-
|
3
|
+
import { D as DirectionType } from '../commonTypes-_11epZYh.js';
|
4
4
|
|
5
5
|
type SimpleTableProps<DataProps = {}> = {
|
6
6
|
direction?: DirectionType;
|
package/dist/switch/index.d.mts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
3
|
-
|
3
|
+
|
4
|
+
type RadiusType = "full" | "inherit" | "none";
|
4
5
|
|
5
6
|
interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
6
7
|
size?: "default" | "sm" | "lg";
|
package/dist/switch/index.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
3
|
-
|
3
|
+
|
4
|
+
type RadiusType = "full" | "inherit" | "none";
|
4
5
|
|
5
6
|
interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
6
7
|
size?: "default" | "sm" | "lg";
|
package/dist/tabs/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default from 'react';
|
3
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
4
|
-
import { R as RadiusType } from '../commonTypes-
|
4
|
+
import { R as RadiusType } from '../commonTypes-MeUyaBib.mjs';
|
5
5
|
|
6
6
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
7
7
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
@@ -28,6 +28,8 @@ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsL
|
|
28
28
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
29
29
|
chipProps?: ChipTypes | undefined;
|
30
30
|
className?: string | undefined;
|
31
|
+
showPopover?: boolean | undefined;
|
32
|
+
popoverContent?: React.ReactNode;
|
31
33
|
} & React.RefAttributes<HTMLButtonElement>>;
|
32
34
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
33
35
|
|
package/dist/tabs/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default from 'react';
|
3
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
4
|
-
import { R as RadiusType } from '../commonTypes-
|
4
|
+
import { R as RadiusType } from '../commonTypes-MeUyaBib.js';
|
5
5
|
|
6
6
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
7
7
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
@@ -28,6 +28,8 @@ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsL
|
|
28
28
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
29
29
|
chipProps?: ChipTypes | undefined;
|
30
30
|
className?: string | undefined;
|
31
|
+
showPopover?: boolean | undefined;
|
32
|
+
popoverContent?: React.ReactNode;
|
31
33
|
} & React.RefAttributes<HTMLButtonElement>>;
|
32
34
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
33
35
|
|