@sikka/hawa 0.30.24-next → 0.30.26-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/blocks/index.js +100 -72
  2. package/dist/blocks/index.mjs +1 -1
  3. package/dist/blocks/misc/index.js +88 -60
  4. package/dist/blocks/misc/index.mjs +105 -75
  5. package/dist/blocks/pricing/index.mjs +1 -1
  6. package/dist/breadcrumb/index.d.mts +7 -5
  7. package/dist/breadcrumb/index.d.ts +7 -5
  8. package/dist/breadcrumb/index.js +36 -12
  9. package/dist/breadcrumb/index.js.map +1 -1
  10. package/dist/breadcrumb/index.mjs +36 -12
  11. package/dist/breadcrumb/index.mjs.map +1 -1
  12. package/dist/{chunk-7LAUVLVZ.mjs → chunk-QDRFTC7W.mjs} +96 -62
  13. package/dist/combobox/index.js.map +1 -1
  14. package/dist/combobox/index.mjs.map +1 -1
  15. package/dist/commonTypes-LrR8QrYP.d.mts +5 -0
  16. package/dist/commonTypes-LrR8QrYP.d.ts +5 -0
  17. package/dist/commonTypes-MeUyaBib.d.mts +5 -0
  18. package/dist/commonTypes-MeUyaBib.d.ts +5 -0
  19. package/dist/elements/index.d.mts +11 -5
  20. package/dist/elements/index.d.ts +11 -5
  21. package/dist/elements/index.js +149 -98
  22. package/dist/elements/index.mjs +32 -13
  23. package/dist/floatBox/index.d.mts +12 -0
  24. package/dist/floatBox/index.d.ts +12 -0
  25. package/dist/floatBox/index.js +85 -0
  26. package/dist/floatBox/index.js.map +1 -0
  27. package/dist/floatBox/index.mjs +49 -0
  28. package/dist/floatBox/index.mjs.map +1 -0
  29. package/dist/index.css +101 -56
  30. package/dist/index.d.mts +11 -5
  31. package/dist/index.d.ts +11 -5
  32. package/dist/index.js +189 -138
  33. package/dist/index.mjs +706 -657
  34. package/dist/input/index.d.mts +2 -1
  35. package/dist/input/index.d.ts +2 -1
  36. package/dist/label/index.d.mts +1 -2
  37. package/dist/label/index.d.ts +1 -2
  38. package/dist/passwordInput/index.js.map +1 -1
  39. package/dist/passwordInput/index.mjs.map +1 -1
  40. package/dist/phoneInput/index.d.mts +2 -1
  41. package/dist/phoneInput/index.d.ts +2 -1
  42. package/dist/popover/index.d.mts +3 -1
  43. package/dist/popover/index.d.ts +3 -1
  44. package/dist/popover/index.js +6 -0
  45. package/dist/popover/index.js.map +1 -1
  46. package/dist/popover/index.mjs +4 -0
  47. package/dist/popover/index.mjs.map +1 -1
  48. package/dist/progress/index.d.mts +8 -1
  49. package/dist/progress/index.d.ts +8 -1
  50. package/dist/radio/index.d.mts +9 -1
  51. package/dist/radio/index.d.ts +9 -1
  52. package/dist/scrollArea/index.d.mts +1 -1
  53. package/dist/scrollArea/index.d.ts +1 -1
  54. package/dist/separator/index.d.mts +1 -1
  55. package/dist/separator/index.d.ts +1 -1
  56. package/dist/signature/index.d.mts +1 -2
  57. package/dist/signature/index.d.ts +1 -2
  58. package/dist/simpleTable/index.d.mts +1 -1
  59. package/dist/simpleTable/index.d.ts +1 -1
  60. package/dist/switch/index.d.mts +2 -1
  61. package/dist/switch/index.d.ts +2 -1
  62. package/dist/tabs/index.d.mts +3 -1
  63. package/dist/tabs/index.d.ts +3 -1
  64. package/dist/tabs/index.js +60 -32
  65. package/dist/tabs/index.js.map +1 -1
  66. package/dist/tabs/index.mjs +60 -32
  67. package/dist/tabs/index.mjs.map +1 -1
  68. package/dist/textarea/index.d.mts +1 -1
  69. package/dist/textarea/index.d.ts +1 -1
  70. package/dist/toast/index.d.mts +1 -1
  71. package/dist/toast/index.d.ts +1 -1
  72. package/dist/toaster/index.d.mts +22 -4
  73. package/dist/toaster/index.d.ts +22 -4
  74. package/dist/tooltip/index.d.mts +3 -4
  75. package/dist/tooltip/index.d.ts +3 -4
  76. package/package.json +8 -8
  77. package/dist/Label-9FHRF7Ex.d.mts +0 -14
  78. package/dist/Label-9FHRF7Ex.d.ts +0 -14
  79. package/dist/commonTypes-3k5cNB1s.d.mts +0 -4
  80. package/dist/commonTypes-3k5cNB1s.d.ts +0 -4
  81. package/dist/commonTypes-PBumfOBg.d.mts +0 -3
  82. package/dist/commonTypes-PBumfOBg.d.ts +0 -3
  83. /package/dist/{chunk-CVOMHXJK.mjs → chunk-BXGDHNAY.mjs} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  // elements/tabs/Tabs.tsx
4
- import * as React2 from "react";
4
+ import * as React3 from "react";
5
5
  import * as TabsPrimitive from "@radix-ui/react-tabs";
6
6
 
7
7
  // util/index.ts
@@ -95,6 +95,41 @@ var Chip = React.forwardRef(
95
95
  }
96
96
  );
97
97
 
98
+ // elements/floatBox/FloatBox.tsx
99
+ import * as React2 from "react";
100
+ var FloatBox = ({
101
+ className,
102
+ open,
103
+ side = "bottom",
104
+ sideOffset = 40,
105
+ ...props
106
+ }) => {
107
+ let widthStyles = {
108
+ trigger: "var(--radix-popover-trigger-width)",
109
+ default: "auto"
110
+ };
111
+ let sideOffsetStyles = {
112
+ bottom: { top: sideOffset },
113
+ top: { bottom: sideOffset },
114
+ right: { left: sideOffset },
115
+ left: { right: sideOffset }
116
+ };
117
+ return /* @__PURE__ */ React2.createElement(
118
+ "div",
119
+ {
120
+ className: cn(
121
+ "data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[floatbox-state=open]:hawa-animate-in data-[floatbox-state=closed]:hawa-animate-out data-[floatbox-state=closed]:hawa-fade-out-0 data-[floatbox-state=open]:hawa-fade-in-0 data-[floatbox-state=closed]:hawa-zoom-out-95 data-[floatbox-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",
122
+ sideOffsetStyles[side],
123
+ className
124
+ ),
125
+ style: { ...sideOffsetStyles[side] },
126
+ "data-side": side,
127
+ "data-floatbox-state": open ? "open" : "closed"
128
+ },
129
+ props.children
130
+ );
131
+ };
132
+
98
133
  // elements/tabs/Tabs.tsx
99
134
  var tabsListVariant = tv({
100
135
  base: "",
@@ -104,10 +139,7 @@ var tabsListVariant = tv({
104
139
  underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
105
140
  underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
106
141
  },
107
- orientation: {
108
- horizontal: "",
109
- vertical: ""
110
- }
142
+ orientation: { horizontal: "", vertical: "" }
111
143
  },
112
144
  compoundVariants: [
113
145
  {
@@ -121,10 +153,7 @@ var tabsListVariant = tv({
121
153
  class: "hawa-border-b-2 hawa-border-b-primary"
122
154
  }
123
155
  ],
124
- defaultVariants: {
125
- variant: "default",
126
- orientation: "horizontal"
127
- }
156
+ defaultVariants: { variant: "default", orientation: "horizontal" }
128
157
  });
129
158
  var tabsTriggerVariant = tv({
130
159
  base: "",
@@ -134,10 +163,7 @@ var tabsTriggerVariant = tv({
134
163
  underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all 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",
135
164
  underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all 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 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
136
165
  },
137
- orientation: {
138
- horizontal: "",
139
- vertical: ""
140
- }
166
+ orientation: { horizontal: "", vertical: "" }
141
167
  },
142
168
  compoundVariants: [
143
169
  {
@@ -161,13 +187,10 @@ var tabsTriggerVariant = tv({
161
187
  class: "hawa-rounded-e-none"
162
188
  }
163
189
  ],
164
- defaultVariants: {
165
- variant: "default",
166
- orientation: "horizontal"
167
- }
190
+ defaultVariants: { variant: "default", orientation: "horizontal" }
168
191
  });
169
- var TabsContext = React2.createContext({ orientation: "horizontal", variant: "default" });
170
- var Tabs = React2.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
192
+ var TabsContext = React3.createContext({ orientation: "horizontal", variant: "default" });
193
+ var Tabs = React3.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React3.createElement(
171
194
  TabsPrimitive.Root,
172
195
  {
173
196
  ref,
@@ -178,12 +201,11 @@ var Tabs = React2.forwardRef(({ className, orientation, variant = "default", ...
178
201
  ),
179
202
  ...props
180
203
  },
181
- /* @__PURE__ */ React2.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
204
+ /* @__PURE__ */ React3.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
182
205
  ));
183
- Tabs.displayName = TabsPrimitive.Root.displayName;
184
- var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
185
- const { orientation, variant } = React2.useContext(TabsContext);
186
- return /* @__PURE__ */ React2.createElement(
206
+ var TabsList = React3.forwardRef(({ className, ...props }, ref) => {
207
+ const { orientation, variant } = React3.useContext(TabsContext);
208
+ return /* @__PURE__ */ React3.createElement(
187
209
  TabsPrimitive.List,
188
210
  {
189
211
  ref,
@@ -196,22 +218,25 @@ var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
196
218
  }
197
219
  );
198
220
  });
199
- TabsList.displayName = TabsPrimitive.List.displayName;
200
- var TabsTrigger = React2.forwardRef(({ className, chipProps, ...props }, ref) => {
201
- const { orientation, variant } = React2.useContext(TabsContext);
202
- return /* @__PURE__ */ React2.createElement(
221
+ var TabsTrigger = React3.forwardRef(({ className, chipProps, ...props }, ref) => {
222
+ const { orientation, variant } = React3.useContext(TabsContext);
223
+ return /* @__PURE__ */ React3.createElement(
203
224
  TabsPrimitive.Trigger,
204
225
  {
205
226
  ref,
206
- className: cn(tabsTriggerVariant({ variant, orientation }), className),
227
+ className: cn(
228
+ tabsTriggerVariant({ variant, orientation }),
229
+ "hawa-relative",
230
+ className
231
+ ),
207
232
  ...props
208
233
  },
209
234
  props.children,
210
- chipProps && /* @__PURE__ */ React2.createElement(Chip, { ...chipProps })
235
+ chipProps && /* @__PURE__ */ React3.createElement(Chip, { ...chipProps }),
236
+ /* @__PURE__ */ React3.createElement(FloatBox, { open: props.showPopover }, props.popoverContent)
211
237
  );
212
238
  });
213
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
214
- var TabsContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
239
+ var TabsContent = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
215
240
  TabsPrimitive.Content,
216
241
  {
217
242
  ref,
@@ -222,6 +247,9 @@ var TabsContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
222
247
  ...props
223
248
  }
224
249
  ));
250
+ Tabs.displayName = TabsPrimitive.Root.displayName;
251
+ TabsList.displayName = TabsPrimitive.List.displayName;
252
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
225
253
  TabsContent.displayName = TabsPrimitive.Content.displayName;
226
254
  export {
227
255
  Tabs,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/tabs/Tabs.tsx","../../util/index.ts","../../elements/chip/Chip.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport { cn } from \"@util/index\";\nimport { VariantProps, cva } from \"class-variance-authority\";\nimport { tv } from \"tailwind-variants\";\n\nimport { OrientationType } from \"@_types/commonTypes\";\n\nimport { Chip, ChipTypes } from \"../chip/Chip\";\n\nconst tabsListVariant = tv({\n base: \"\",\n variants: {\n variant: {\n default:\n \"hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10\",\n underlined:\n \"hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10\",\n underlined_tabs:\n \"hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground\"\n },\n orientation: {\n horizontal: \"\",\n vertical: \"\"\n }\n },\n compoundVariants: [\n {\n variant: \"underlined_tabs\",\n orientation: \"vertical\",\n class: \"hawa-border-e-2 hawa-border-e-primary\"\n },\n {\n variant: \"underlined_tabs\",\n orientation: \"horizontal\",\n class: \"hawa-border-b-2 hawa-border-b-primary\"\n }\n ],\n defaultVariants: {\n variant: \"default\",\n orientation: \"horizontal\"\n }\n});\n\nconst tabsTriggerVariant = tv({\n base: \"\",\n variants: {\n variant: {\n default:\n \"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all 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 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10\",\n underlined:\n \"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all 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 underlined_tabs:\n \"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all 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 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10\"\n },\n orientation: {\n horizontal: \"\",\n vertical: \"\"\n }\n },\n compoundVariants: [\n {\n variant: \"underlined\",\n orientation: \"horizontal\",\n class:\n \"data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2\"\n },\n {\n variant: \"underlined\",\n orientation: \"vertical\",\n class:\n \"data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2\"\n },\n {\n variant: \"underlined_tabs\",\n orientation: \"horizontal\",\n class: \"hawa-rounded-b-none\"\n },\n {\n variant: \"underlined_tabs\",\n orientation: \"vertical\",\n class: \"hawa-rounded-e-none\"\n }\n ],\n defaultVariants: {\n variant: \"default\",\n orientation: \"horizontal\"\n }\n});\n\ntype TabsVariants = \"default\" | \"underlined\" | \"underlined_tabs\";\n\nconst TabsContext = React.createContext<{\n orientation?: OrientationType;\n variant?: TabsVariants;\n}>({ orientation: \"horizontal\", variant: \"default\" });\n\ntype TabsRootProps = React.ComponentPropsWithoutRef<\n typeof TabsPrimitive.Root\n> & {\n variant?: TabsVariants;\n};\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n TabsRootProps\n>(({ className, orientation, variant = \"default\", ...props }, ref) => (\n <TabsPrimitive.Root\n ref={ref}\n className={cn(\n \"hawa-flex hawa-gap-2\",\n orientation === \"vertical\" ? \"hawa-flex-row\" : \"hawa-flex-col\",\n className\n )}\n {...props}\n >\n <TabsContext.Provider value={{ orientation, variant }}>\n {props.children}\n </TabsContext.Provider>\n </TabsPrimitive.Root>\n));\nTabs.displayName = TabsPrimitive.Root.displayName;\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const { orientation, variant } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n tabsListVariant({ variant, orientation }),\n orientation === \"vertical\" ? \"hawa-flex-col\" : \"hawa-flex-row\",\n className\n )}\n {...props}\n />\n );\n});\nTabsList.displayName = TabsPrimitive.List.displayName;\n\ntype TabsTriggerProps = React.ComponentPropsWithoutRef<\n typeof TabsPrimitive.Trigger\n> & {\n chipProps?: ChipTypes;\n className?: string;\n};\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, chipProps, ...props }, ref) => {\n const { orientation, variant } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(tabsTriggerVariant({ variant, orientation }), className)}\n {...props}\n >\n {props.children}\n {chipProps && <Chip {...chipProps} />}\n </TabsPrimitive.Trigger>\n );\n});\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"hawa-ring-offset-hawa-background hawa-w-full focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2\",\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\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 React from \"react\";\n\nimport { RadiusType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\n\nexport type ChipColors =\n | \"green\"\n | \"blue\"\n | \"red\"\n | \"yellow\"\n | \"orange\"\n | \"purple\"\n | \"cyan\"\n | \"hyper\"\n | \"oceanic\";\n\nexport type ChipTypes = React.HTMLAttributes<HTMLSpanElement> & {\n /** The text inside the chip */\n label: string;\n /** The small icon before the chip label */\n icon?: JSX.Element;\n /** The color of the chip, must be a tailwind color */\n color?: ChipColors;\n /** The size of the chip */\n size?: \"small\" | \"normal\" | \"large\";\n /** Enable/Disable the dot before the label of the chip */\n dot?: boolean;\n /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */\n dotType?: \"available\" | \"unavailable\";\n radius?: RadiusType;\n};\n\nexport const Chip = React.forwardRef<HTMLSpanElement, ChipTypes>(\n (\n {\n label,\n size = \"normal\",\n icon,\n color,\n radius = \"inherit\",\n dotType,\n ...rest\n },\n ref\n ) => {\n let defaultStyles =\n \"hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold \";\n let radiusStyles = {\n inherit: \" hawa-rounded\",\n full: \"hawa-rounded-full\",\n none: \"hawa-rounded-none\"\n };\n let sizeStyles = {\n small:\n \"hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 \",\n normal: \"hawa-h-fit hawa-text-xs\",\n large: \"hawa-text-base\"\n };\n let dotStyles = {\n small: \"hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full\",\n normal: \"hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full\",\n large: \"hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full\"\n };\n let dotTypeStyles = {\n available: \"hawa-bg-green-500\",\n unavailable: \"hawa-bg-red-500\"\n };\n let colorStyles: any = {\n green:\n \"hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800\",\n blue: \"hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100\",\n red: \"hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100\",\n yellow:\n \"hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800\",\n orange:\n \"hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100\",\n purple:\n \"hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100\",\n cyan: \"hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800\",\n hyper:\n \"hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 \",\n oceanic:\n \"hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600\"\n };\n if (label) {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n defaultStyles,\n sizeStyles[size],\n radiusStyles[radius],\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\"\n )}\n >\n {dotType && (\n <span\n className={cn(dotStyles[size], dotTypeStyles[dotType])}\n ></span>\n )}\n {icon && icon}\n {label}\n </span>\n );\n } else {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n \"hawa-h-2 hawa-w-2 hawa-rounded-full\",\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\"\n )}\n ></span>\n );\n }\n }\n);\n"],"mappings":";;;AAAA,YAAYA,YAAW;AAEvB,YAAY,mBAAmB;;;ACF/B,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADAA,SAAS,UAAU;;;AELnB,OAAO,WAAW;AAiCX,IAAM,OAAO,MAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,QAAI,gBACF;AACF,QAAI,eAAe;AAAA,MACjB,SAAS;AAAA,MACT,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AACA,QAAI,aAAa;AAAA,MACf,OACE;AAAA,MACF,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,YAAY;AAAA,MACd,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,gBAAgB;AAAA,MAClB,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AACA,QAAI,cAAmB;AAAA,MACrB,OACE;AAAA,MACF,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QACE;AAAA,MACF,QACE;AAAA,MACF,QACE;AAAA,MACF,MAAM;AAAA,MACN,OACE;AAAA,MACF,SACE;AAAA,IACJ;AACA,QAAI,OAAO;AACT,aACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,WAAW,IAAI;AAAA,YACf,aAAa,MAAM;AAAA,YACnB,QAAQ,YAAY,KAAK,IAAI;AAAA,UAC/B;AAAA;AAAA,QAEC,WACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,UAAU,IAAI,GAAG,cAAc,OAAO,CAAC;AAA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,cAA4B,sBAAQ;AAEhD,IAAM,cAAoB,kBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAe;AAAA,EAAd;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAA4B,sBAAQ;","names":["React"]}
1
+ {"version":3,"sources":["../../elements/tabs/Tabs.tsx","../../util/index.ts","../../elements/chip/Chip.tsx","../../elements/floatBox/FloatBox.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport { cn } from \"@util/index\";\nimport { tv } from \"tailwind-variants\";\n\nimport { OrientationType } from \"@_types/commonTypes\";\n\nimport { Chip, ChipTypes } from \"../chip\";\nimport { FloatBox } from \"../floatBox\";\n\nconst tabsListVariant = tv({\n base: \"\",\n variants: {\n variant: {\n default:\n \"hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10\",\n underlined:\n \"hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10\",\n underlined_tabs:\n \"hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground\",\n },\n orientation: { horizontal: \"\", vertical: \"\" },\n },\n compoundVariants: [\n {\n variant: \"underlined_tabs\",\n orientation: \"vertical\",\n class: \"hawa-border-e-2 hawa-border-e-primary\",\n },\n {\n variant: \"underlined_tabs\",\n orientation: \"horizontal\",\n class: \"hawa-border-b-2 hawa-border-b-primary\",\n },\n ],\n defaultVariants: { variant: \"default\", orientation: \"horizontal\" },\n});\n\nconst tabsTriggerVariant = tv({\n base: \"\",\n variants: {\n variant: {\n default:\n \"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all 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 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10\",\n underlined:\n \"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all 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 underlined_tabs:\n \"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all 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 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10\",\n },\n orientation: { horizontal: \"\", vertical: \"\" },\n },\n compoundVariants: [\n {\n variant: \"underlined\",\n orientation: \"horizontal\",\n class:\n \"data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2\",\n },\n {\n variant: \"underlined\",\n orientation: \"vertical\",\n class:\n \"data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2\",\n },\n {\n variant: \"underlined_tabs\",\n orientation: \"horizontal\",\n class: \"hawa-rounded-b-none\",\n },\n {\n variant: \"underlined_tabs\",\n orientation: \"vertical\",\n class: \"hawa-rounded-e-none\",\n },\n ],\n defaultVariants: { variant: \"default\", orientation: \"horizontal\" },\n});\n\ntype TabsVariants = \"default\" | \"underlined\" | \"underlined_tabs\";\n\nconst TabsContext = React.createContext<{\n orientation?: OrientationType;\n variant?: TabsVariants;\n}>({ orientation: \"horizontal\", variant: \"default\" });\n\ntype TabsRootProps = React.ComponentPropsWithoutRef<\n typeof TabsPrimitive.Root\n> & { variant?: TabsVariants };\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n TabsRootProps\n>(({ className, orientation, variant = \"default\", ...props }, ref) => (\n <TabsPrimitive.Root\n ref={ref}\n className={cn(\n \"hawa-flex hawa-gap-2\",\n orientation === \"vertical\" ? \"hawa-flex-row\" : \"hawa-flex-col\",\n className,\n )}\n {...props}\n >\n <TabsContext.Provider value={{ orientation, variant }}>\n {props.children}\n </TabsContext.Provider>\n </TabsPrimitive.Root>\n));\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const { orientation, variant } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n tabsListVariant({ variant, orientation }),\n orientation === \"vertical\" ? \"hawa-flex-col\" : \"hawa-flex-row\",\n className,\n )}\n {...props}\n />\n );\n});\n\ntype TabsTriggerProps = React.ComponentPropsWithoutRef<\n typeof TabsPrimitive.Trigger\n> & {\n chipProps?: ChipTypes;\n className?: string;\n showPopover?: boolean;\n popoverContent?: React.ReactNode;\n};\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, chipProps, ...props }, ref) => {\n const { orientation, variant } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n tabsTriggerVariant({ variant, orientation }),\n \"hawa-relative\",\n className,\n )}\n {...props}\n >\n {props.children}\n {chipProps && <Chip {...chipProps} />}\n\n <FloatBox open={props.showPopover}>{props.popoverContent}</FloatBox>\n </TabsPrimitive.Trigger>\n );\n});\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"hawa-ring-offset-hawa-background hawa-w-full focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2\",\n className,\n )}\n {...props}\n />\n));\n\nTabs.displayName = TabsPrimitive.Root.displayName;\nTabsList.displayName = TabsPrimitive.List.displayName;\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\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 React from \"react\";\n\nimport { RadiusType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\n\nexport type ChipColors =\n | \"green\"\n | \"blue\"\n | \"red\"\n | \"yellow\"\n | \"orange\"\n | \"purple\"\n | \"cyan\"\n | \"hyper\"\n | \"oceanic\";\n\nexport type ChipTypes = React.HTMLAttributes<HTMLSpanElement> & {\n /** The text inside the chip */\n label: string;\n /** The small icon before the chip label */\n icon?: JSX.Element;\n /** The color of the chip, must be a tailwind color */\n color?: ChipColors;\n /** The size of the chip */\n size?: \"small\" | \"normal\" | \"large\";\n /** Enable/Disable the dot before the label of the chip */\n dot?: boolean;\n /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */\n dotType?: \"available\" | \"unavailable\";\n radius?: RadiusType;\n};\n\nexport const Chip = React.forwardRef<HTMLSpanElement, ChipTypes>(\n (\n {\n label,\n size = \"normal\",\n icon,\n color,\n radius = \"inherit\",\n dotType,\n ...rest\n },\n ref\n ) => {\n let defaultStyles =\n \"hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold \";\n let radiusStyles = {\n inherit: \" hawa-rounded\",\n full: \"hawa-rounded-full\",\n none: \"hawa-rounded-none\"\n };\n let sizeStyles = {\n small:\n \"hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 \",\n normal: \"hawa-h-fit hawa-text-xs\",\n large: \"hawa-text-base\"\n };\n let dotStyles = {\n small: \"hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full\",\n normal: \"hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full\",\n large: \"hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full\"\n };\n let dotTypeStyles = {\n available: \"hawa-bg-green-500\",\n unavailable: \"hawa-bg-red-500\"\n };\n let colorStyles: any = {\n green:\n \"hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800\",\n blue: \"hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100\",\n red: \"hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100\",\n yellow:\n \"hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800\",\n orange:\n \"hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100\",\n purple:\n \"hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100\",\n cyan: \"hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800\",\n hyper:\n \"hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 \",\n oceanic:\n \"hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600\"\n };\n if (label) {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n defaultStyles,\n sizeStyles[size],\n radiusStyles[radius],\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\"\n )}\n >\n {dotType && (\n <span\n className={cn(dotStyles[size], dotTypeStyles[dotType])}\n ></span>\n )}\n {icon && icon}\n {label}\n </span>\n );\n } else {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n \"hawa-h-2 hawa-w-2 hawa-rounded-full\",\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\"\n )}\n ></span>\n );\n }\n }\n);\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport type FloatBoxProps = {\n className?: string;\n open?: boolean;\n children?: React.ReactNode;\n side?: \"bottom\" | \"left\" | \"right\" | \"top\";\n sideOffset?: number;\n};\n\nconst FloatBox: React.FC<FloatBoxProps> = ({\n className,\n open,\n side = \"bottom\",\n sideOffset = 40,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n let sideOffsetStyles = {\n bottom: { top: sideOffset },\n top: { bottom: sideOffset },\n right: { left: sideOffset },\n left: { right: sideOffset },\n };\n\n return (\n <div\n className={cn(\n \"data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[floatbox-state=open]:hawa-animate-in data-[floatbox-state=closed]:hawa-animate-out data-[floatbox-state=closed]:hawa-fade-out-0 data-[floatbox-state=open]:hawa-fade-in-0 data-[floatbox-state=closed]:hawa-zoom-out-95 data-[floatbox-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 sideOffsetStyles[side],\n className,\n )}\n style={{ ...sideOffsetStyles[side] }}\n data-side={side}\n data-floatbox-state={open ? \"open\" : \"closed\"}\n >\n {props.children}\n </div>\n );\n};\n\nexport { FloatBox };\n"],"mappings":";;;AAAA,YAAYA,YAAW;AAEvB,YAAY,mBAAmB;;;ACF/B,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADDA,SAAS,UAAU;;;AEJnB,OAAO,WAAW;AAiCX,IAAM,OAAO,MAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,QAAI,gBACF;AACF,QAAI,eAAe;AAAA,MACjB,SAAS;AAAA,MACT,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AACA,QAAI,aAAa;AAAA,MACf,OACE;AAAA,MACF,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,YAAY;AAAA,MACd,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,gBAAgB;AAAA,MAClB,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AACA,QAAI,cAAmB;AAAA,MACrB,OACE;AAAA,MACF,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QACE;AAAA,MACF,QACE;AAAA,MACF,QACE;AAAA,MACF,MAAM;AAAA,MACN,OACE;AAAA,MACF,SACE;AAAA,IACJ;AACA,QAAI,OAAO;AACT,aACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,WAAW,IAAI;AAAA,YACf,aAAa,MAAM;AAAA,YACnB,QAAQ,YAAY,KAAK,IAAI;AAAA,UAC/B;AAAA;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M,EAAE,aAAa,QAAQ,IAAU,kBAAW,WAAW;AAC7D,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT,gBAAgB,EAAE,SAAS,YAAY,CAAC;AAAA,QACxC,gBAAgB,aAAa,kBAAkB;AAAA,QAC/C;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AAWD,IAAM,cAAoB,kBAGxB,CAAC,EAAE,WAAW,WAAW,GAAG,MAAM,GAAG,QAAQ;AAC7C,QAAM,EAAE,aAAa,QAAQ,IAAU,kBAAW,WAAW;AAC7D,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT,mBAAmB,EAAE,SAAS,YAAY,CAAC;AAAA,QAC3C;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,IAEH,MAAM;AAAA,IACN,aAAa,qCAAC,QAAM,GAAG,WAAW;AAAA,IAEnC,qCAAC,YAAS,MAAM,MAAM,eAAc,MAAM,cAAe;AAAA,EAC3D;AAEJ,CAAC;AAED,IAAM,cAAoB,kBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAe;AAAA,EAAd;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AAED,KAAK,cAA4B,mBAAK;AACtC,SAAS,cAA4B,mBAAK;AAC1C,YAAY,cAA4B,sBAAQ;AAChD,YAAY,cAA4B,sBAAQ;","names":["React","React"]}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PositionType } from '../commonTypes-_11epZYh.mjs';
2
+ import { P as PositionType } from '../commonTypes-MeUyaBib.mjs';
3
3
 
4
4
  type LabelProps = {
5
5
  hint?: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PositionType } from '../commonTypes-_11epZYh.js';
2
+ import { P as PositionType } from '../commonTypes-MeUyaBib.js';
3
3
 
4
4
  type LabelProps = {
5
5
  hint?: React.ReactNode;
@@ -2,7 +2,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
2
2
  import * as React from 'react';
3
3
  import * as ToastPrimitives from '@radix-ui/react-toast';
4
4
  import { VariantProps } from 'class-variance-authority';
5
- import { D as DirectionType } from '../commonTypes-_11epZYh.mjs';
5
+ import { D as DirectionType } from '../commonTypes-MeUyaBib.mjs';
6
6
 
7
7
  declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
8
8
  declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
@@ -2,7 +2,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
2
2
  import * as React from 'react';
3
3
  import * as ToastPrimitives from '@radix-ui/react-toast';
4
4
  import { VariantProps } from 'class-variance-authority';
5
- import { D as DirectionType } from '../commonTypes-_11epZYh.js';
5
+ import { D as DirectionType } from '../commonTypes-MeUyaBib.js';
6
6
 
7
7
  declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
8
8
  declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
@@ -1,9 +1,27 @@
1
+ import * as React from 'react';
1
2
  import React__default from 'react';
2
3
  import { D as DirectionType } from '../commonTypes-_11epZYh.mjs';
3
- import { ToasterToastProps } from '../toast/index.mjs';
4
- import 'class-variance-authority/types';
5
- import '@radix-ui/react-toast';
6
- import 'class-variance-authority';
4
+ import * as class_variance_authority_types from 'class-variance-authority/types';
5
+ import * as ToastPrimitives from '@radix-ui/react-toast';
6
+ import { VariantProps } from 'class-variance-authority';
7
+
8
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
9
+ variant?: "default" | "destructive" | null | undefined;
10
+ severity?: "info" | "warning" | "error" | "success" | "none" | null | undefined;
11
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & {
12
+ direction?: DirectionType | undefined;
13
+ } & React.RefAttributes<HTMLLIElement>>;
14
+ declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
15
+ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
16
+ type ToastActionElement = React.ReactElement<typeof ToastAction>;
17
+ type ToasterToastProps = ToastProps & {
18
+ id: string;
19
+ title?: React.ReactNode;
20
+ description?: React.ReactNode;
21
+ severity?: "info" | "warning" | "error" | "success" | "none";
22
+ action?: ToastActionElement;
23
+ size?: "default" | "sm";
24
+ };
7
25
 
8
26
  type ToasterProps = {
9
27
  direction?: DirectionType;
@@ -1,9 +1,27 @@
1
+ import * as React from 'react';
1
2
  import React__default from 'react';
2
3
  import { D as DirectionType } from '../commonTypes-_11epZYh.js';
3
- import { ToasterToastProps } from '../toast/index.js';
4
- import 'class-variance-authority/types';
5
- import '@radix-ui/react-toast';
6
- import 'class-variance-authority';
4
+ import * as class_variance_authority_types from 'class-variance-authority/types';
5
+ import * as ToastPrimitives from '@radix-ui/react-toast';
6
+ import { VariantProps } from 'class-variance-authority';
7
+
8
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
9
+ variant?: "default" | "destructive" | null | undefined;
10
+ severity?: "info" | "warning" | "error" | "success" | "none" | null | undefined;
11
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & {
12
+ direction?: DirectionType | undefined;
13
+ } & React.RefAttributes<HTMLLIElement>>;
14
+ declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
15
+ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
16
+ type ToastActionElement = React.ReactElement<typeof ToastAction>;
17
+ type ToasterToastProps = ToastProps & {
18
+ id: string;
19
+ title?: React.ReactNode;
20
+ description?: React.ReactNode;
21
+ severity?: "info" | "warning" | "error" | "success" | "none";
22
+ action?: ToastActionElement;
23
+ size?: "default" | "sm";
24
+ };
7
25
 
8
26
  type ToasterProps = {
9
27
  direction?: DirectionType;
@@ -1,7 +1,6 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
-
4
- type PositionType = "top" | "bottom" | "right" | "left";
3
+ import { P as PositionType } from '../commonTypes-_11epZYh.mjs';
5
4
 
6
5
  type TooltipTypes = {
7
6
  /** Controls the open state of the tooltip. */
@@ -26,6 +25,6 @@ type TooltipTypes = {
26
25
  contentProps?: TooltipPrimitive.TooltipContentProps;
27
26
  providerProps?: TooltipPrimitive.TooltipProviderProps;
28
27
  };
29
- declare const Tooltip: React.FunctionComponent<TooltipTypes>;
28
+ declare const Tooltip: React__default.FunctionComponent<TooltipTypes>;
30
29
 
31
30
  export { Tooltip };
@@ -1,7 +1,6 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
-
4
- type PositionType = "top" | "bottom" | "right" | "left";
3
+ import { P as PositionType } from '../commonTypes-_11epZYh.js';
5
4
 
6
5
  type TooltipTypes = {
7
6
  /** Controls the open state of the tooltip. */
@@ -26,6 +25,6 @@ type TooltipTypes = {
26
25
  contentProps?: TooltipPrimitive.TooltipContentProps;
27
26
  providerProps?: TooltipPrimitive.TooltipProviderProps;
28
27
  };
29
- declare const Tooltip: React.FunctionComponent<TooltipTypes>;
28
+ declare const Tooltip: React__default.FunctionComponent<TooltipTypes>;
30
29
 
31
30
  export { Tooltip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.30.24-next",
3
+ "version": "0.30.26-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",
@@ -61,8 +61,8 @@
61
61
  "@radix-ui/react-tabs": "^1.0.4",
62
62
  "@radix-ui/react-toast": "^1.1.5",
63
63
  "@radix-ui/react-tooltip": "^1.0.7",
64
- "@tanstack/react-table": "^8.15.0",
65
- "@tanstack/table-core": "^8.14.0",
64
+ "@tanstack/react-table": "^8.15.3",
65
+ "@tanstack/table-core": "^8.15.3",
66
66
  "class-variance-authority": "^0.7.0",
67
67
  "clsx": "^2.1.0",
68
68
  "cmdk": "^1.0.0",
@@ -70,14 +70,14 @@
70
70
  "embla-carousel-react": "^8.0.0",
71
71
  "eslint": "^8.57.0",
72
72
  "eslint-config-next": "^14.1.4",
73
- "libphonenumber-js": "^1.10.58",
73
+ "libphonenumber-js": "^1.10.59",
74
74
  "prism-react-renderer": "^2.3.1",
75
75
  "prismjs": "^1.29.0",
76
76
  "react": "18.2.0",
77
77
  "react-dom": "18.2.0",
78
78
  "react-dropzone": "^14.2.3",
79
79
  "react-headless-pagination": "^1.1.5",
80
- "react-hook-form": "^7.51.1",
80
+ "react-hook-form": "^7.51.2",
81
81
  "react-select": "^5.8.0",
82
82
  "signature_pad": "^4.2.0",
83
83
  "tailwind-merge": "^2.2.2",
@@ -91,8 +91,8 @@
91
91
  "@testing-library/jest-dom": "^6.4.2",
92
92
  "@testing-library/react": "^14.2.2",
93
93
  "@types/jest": "^29.5.12",
94
- "@types/react": "^18.2.69",
95
- "@types/react-dom": "^18.2.22",
94
+ "@types/react": "^18.2.73",
95
+ "@types/react-dom": "^18.2.23",
96
96
  "autoprefixer": "^10.4.19",
97
97
  "boxen": "^7.1.1",
98
98
  "chalk": "^5.3.0",
@@ -103,7 +103,7 @@
103
103
  "postcss": "^8.4.38",
104
104
  "postcss-cli": "^11.0.0",
105
105
  "postcss-import": "^16.1.0",
106
- "tailwindcss": "^3.4.1",
106
+ "tailwindcss": "^3.4.3",
107
107
  "tailwindcss-animate": "^1.0.7",
108
108
  "tsconfig-paths-webpack-plugin": "^4.1.0",
109
109
  "tsup": "^8.0.2"
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
-
3
- type DirectionType = "rtl" | "ltr";
4
- type PositionType = "top" | "bottom" | "right" | "left";
5
- type OrientationType = "vertical" | "horizontal";
6
-
7
- type LabelProps = {
8
- hint?: React.ReactNode;
9
- hintSide?: PositionType;
10
- htmlFor?: string;
11
- required?: boolean;
12
- };
13
-
14
- export type { DirectionType as D, LabelProps as L, OrientationType as O };
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
-
3
- type DirectionType = "rtl" | "ltr";
4
- type PositionType = "top" | "bottom" | "right" | "left";
5
- type OrientationType = "vertical" | "horizontal";
6
-
7
- type LabelProps = {
8
- hint?: React.ReactNode;
9
- hintSide?: PositionType;
10
- htmlFor?: string;
11
- required?: boolean;
12
- };
13
-
14
- export type { DirectionType as D, LabelProps as L, OrientationType as O };
@@ -1,4 +0,0 @@
1
- type DirectionType = "rtl" | "ltr";
2
- type OrientationType = "vertical" | "horizontal";
3
-
4
- export type { DirectionType as D, OrientationType as O };
@@ -1,4 +0,0 @@
1
- type DirectionType = "rtl" | "ltr";
2
- type OrientationType = "vertical" | "horizontal";
3
-
4
- export type { DirectionType as D, OrientationType as O };
@@ -1,3 +0,0 @@
1
- type RadiusType = "full" | "inherit" | "none";
2
-
3
- export type { RadiusType as R };
@@ -1,3 +0,0 @@
1
- type RadiusType = "full" | "inherit" | "none";
2
-
3
- export type { RadiusType as R };
File without changes