@sikka/hawa 0.23.2-next → 0.23.7-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 (145) hide show
  1. package/dist/accordion/index.js +30 -2399
  2. package/dist/accordion/index.mjs +19 -461
  3. package/dist/alert/index.mjs +0 -1
  4. package/dist/appStores/index.js +75 -0
  5. package/dist/appStores/index.mjs +38 -0
  6. package/dist/avatar/index.mjs +118 -3
  7. package/dist/backToTop/index.mjs +102 -4
  8. package/dist/badge/index.js +127 -0
  9. package/dist/badge/index.mjs +84 -0
  10. package/dist/blocks/auth/index.js +1173 -3092
  11. package/dist/blocks/auth/index.mjs +16 -10
  12. package/dist/blocks/feedback/index.js +864 -2913
  13. package/dist/blocks/feedback/index.mjs +14 -8
  14. package/dist/blocks/index.js +5714 -5316
  15. package/dist/blocks/index.mjs +390 -45
  16. package/dist/blocks/misc/index.js +634 -2409
  17. package/dist/blocks/misc/index.mjs +14 -8
  18. package/dist/blocks/pricing/index.js +522 -524
  19. package/dist/blocks/pricing/index.mjs +1861 -45
  20. package/dist/breadcrumb/index.js +63 -0
  21. package/dist/breadcrumb/index.mjs +26 -0
  22. package/dist/card/index.mjs +83 -8
  23. package/dist/checkbox/index.mjs +138 -3
  24. package/dist/chip/index.js +129 -0
  25. package/dist/chip/index.mjs +8 -0
  26. package/dist/{chunk-X6PCWJYD.mjs → chunk-2R2QPJT7.mjs} +761 -1104
  27. package/dist/chunk-677VOLD4.mjs +464 -0
  28. package/dist/chunk-72HYR6WB.mjs +88 -0
  29. package/dist/chunk-A25EXELT.mjs +131 -0
  30. package/dist/{chunk-OE27DSIY.mjs → chunk-F6TKEDDP.mjs} +2 -4
  31. package/dist/{chunk-YFC2GSJ6.mjs → chunk-P2O6R3S6.mjs} +66 -5
  32. package/dist/{chunk-GXXX5UB4.mjs → chunk-QGKW5R5F.mjs} +59 -20
  33. package/dist/chunk-TR56G3NM.mjs +2350 -0
  34. package/dist/chunk-UAVBFK53.mjs +346 -0
  35. package/dist/combobox/index.mjs +153 -7
  36. package/dist/dataTable/index.mjs +355 -8
  37. package/dist/elements/index.js +800 -1148
  38. package/dist/elements/index.mjs +1 -11
  39. package/dist/fileDropzone/index.mjs +226 -4
  40. package/dist/index.js +1721 -1721
  41. package/dist/index.mjs +1663 -1663
  42. package/dist/layout/index.js +493 -510
  43. package/dist/layout/index.mjs +1 -1
  44. package/dist/loading/index.mjs +0 -1
  45. package/dist/logos/index.mjs +204 -3
  46. package/dist/navigationMenu/index.mjs +155 -13
  47. package/dist/phoneInput/index.js +2074 -0
  48. package/dist/phoneInput/index.mjs +1776 -0
  49. package/dist/pinInput/index.js +130 -0
  50. package/dist/pinInput/index.mjs +88 -0
  51. package/dist/progress/index.js +71 -0
  52. package/dist/progress/index.mjs +29 -0
  53. package/dist/radio/index.mjs +202 -4
  54. package/dist/scrollArea/index.js +90 -0
  55. package/dist/scrollArea/index.mjs +47 -0
  56. package/dist/select/index.mjs +1 -1
  57. package/dist/sheet/index.mjs +137 -12
  58. package/dist/sortButton/index.mjs +40 -4
  59. package/dist/stopPropagationWrapper/index.js +48 -0
  60. package/dist/stopPropagationWrapper/index.mjs +11 -0
  61. package/dist/switch/index.mjs +79 -3
  62. package/dist/tabs/index.js +1 -1
  63. package/dist/tabs/index.mjs +68 -6
  64. package/dist/textarea/index.mjs +54 -4
  65. package/package.json +2 -2
  66. package/dist/Chip-DJ6ThZc_.d.ts +0 -21
  67. package/dist/Chip-eal8vwDz.d.mts +0 -21
  68. package/dist/accordion/index.d.mts +0 -42
  69. package/dist/accordion/index.d.ts +0 -42
  70. package/dist/alert/index.d.mts +0 -28
  71. package/dist/alert/index.d.ts +0 -28
  72. package/dist/avatar/index.d.mts +0 -15
  73. package/dist/avatar/index.d.ts +0 -15
  74. package/dist/backToTop/index.d.mts +0 -15
  75. package/dist/backToTop/index.d.ts +0 -15
  76. package/dist/button/index.d.mts +0 -16
  77. package/dist/button/index.d.ts +0 -16
  78. package/dist/card/index.d.mts +0 -17
  79. package/dist/card/index.d.ts +0 -17
  80. package/dist/checkbox/index.d.mts +0 -20
  81. package/dist/checkbox/index.d.ts +0 -20
  82. package/dist/chunk-BK5WF7UO.mjs +0 -231
  83. package/dist/chunk-CXWYC6FS.mjs +0 -360
  84. package/dist/chunk-D2USGMDT.mjs +0 -208
  85. package/dist/chunk-DX4SLF2L.mjs +0 -45
  86. package/dist/chunk-ENNSA4VR.mjs +0 -5566
  87. package/dist/chunk-GXSYCLZZ.mjs +0 -158
  88. package/dist/chunk-IQPGAHUR.mjs +0 -107
  89. package/dist/chunk-POT2IP62.mjs +0 -123
  90. package/dist/chunk-TWDZB2VH.mjs +0 -151
  91. package/dist/chunk-VBTYVVA7.mjs +0 -93
  92. package/dist/chunk-VCGW5DIP.mjs +0 -170
  93. package/dist/chunk-X3SMPIA3.mjs +0 -0
  94. package/dist/chunk-XA646BZ2.mjs +0 -143
  95. package/dist/chunk-ZCUUQ5VV.mjs +0 -84
  96. package/dist/combobox/index.d.mts +0 -32
  97. package/dist/combobox/index.d.ts +0 -32
  98. package/dist/command/index.d.mts +0 -48
  99. package/dist/command/index.d.ts +0 -48
  100. package/dist/commonTypes-gbO4hPli.d.mts +0 -7
  101. package/dist/commonTypes-gbO4hPli.d.ts +0 -7
  102. package/dist/dataTable/index.d.mts +0 -39
  103. package/dist/dataTable/index.d.ts +0 -39
  104. package/dist/dialog/index.d.mts +0 -57
  105. package/dist/dialog/index.d.ts +0 -57
  106. package/dist/dropdownMenu/index.d.mts +0 -95
  107. package/dist/dropdownMenu/index.d.ts +0 -95
  108. package/dist/fileDropzone/index.d.mts +0 -37
  109. package/dist/fileDropzone/index.d.ts +0 -37
  110. package/dist/input/index.d.mts +0 -36
  111. package/dist/input/index.d.ts +0 -36
  112. package/dist/label/index.d.mts +0 -12
  113. package/dist/label/index.d.ts +0 -12
  114. package/dist/loading/index.d.mts +0 -15
  115. package/dist/loading/index.d.ts +0 -15
  116. package/dist/logos/index.d.mts +0 -27
  117. package/dist/logos/index.d.ts +0 -27
  118. package/dist/navigationMenu/index.d.mts +0 -39
  119. package/dist/navigationMenu/index.d.ts +0 -39
  120. package/dist/popover/index.d.mts +0 -23
  121. package/dist/popover/index.d.ts +0 -23
  122. package/dist/radio/index.d.mts +0 -28
  123. package/dist/radio/index.d.ts +0 -28
  124. package/dist/select/index.d.mts +0 -43
  125. package/dist/select/index.d.ts +0 -43
  126. package/dist/sheet/index.d.mts +0 -30
  127. package/dist/sheet/index.d.ts +0 -30
  128. package/dist/skeleton/index.d.mts +0 -10
  129. package/dist/skeleton/index.d.ts +0 -10
  130. package/dist/sortButton/index.d.mts +0 -10
  131. package/dist/sortButton/index.d.ts +0 -10
  132. package/dist/splitButton/index.d.mts +0 -15
  133. package/dist/splitButton/index.d.ts +0 -15
  134. package/dist/switch/index.d.mts +0 -12
  135. package/dist/switch/index.d.ts +0 -12
  136. package/dist/table/index.d.mts +0 -21
  137. package/dist/table/index.d.ts +0 -21
  138. package/dist/tabs/index.d.mts +0 -16
  139. package/dist/tabs/index.d.ts +0 -16
  140. package/dist/textarea/index.d.mts +0 -17
  141. package/dist/textarea/index.d.ts +0 -17
  142. package/dist/tooltip/index.d.mts +0 -26
  143. package/dist/tooltip/index.d.ts +0 -26
  144. /package/dist/{chunk-A7OPD7H7.mjs → chunk-B6UCD4GP.mjs} +0 -0
  145. /package/dist/{chunk-O2ALK7UE.mjs → chunk-Z4M72OD3.mjs} +0 -0
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // components/elements/breadcrumb/index.ts
31
+ var breadcrumb_exports = {};
32
+ __export(breadcrumb_exports, {
33
+ Breadcrumb: () => Breadcrumb
34
+ });
35
+ module.exports = __toCommonJS(breadcrumb_exports);
36
+
37
+ // components/elements/breadcrumb/Breadcrumb.tsx
38
+ var import_react = __toESM(require("react"));
39
+ var Breadcrumb = ({
40
+ breadcrumbLinks,
41
+ separator = ">"
42
+ }) => {
43
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, breadcrumbLinks.map((singleBreadcrumbLink, index) => /* @__PURE__ */ import_react.default.createElement(
44
+ "div",
45
+ {
46
+ key: index,
47
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
48
+ },
49
+ /* @__PURE__ */ import_react.default.createElement(
50
+ "a",
51
+ {
52
+ href: singleBreadcrumbLink.href,
53
+ className: index + 1 === breadcrumbLinks.length ? "hawa-pointer-events-none" : "hawa-underline-offset-4 hawa-transition-all hover:hawa-text-primary hover:hawa-underline hover:hawa-decoration-2"
54
+ },
55
+ singleBreadcrumbLink.label
56
+ ),
57
+ index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */ import_react.default.createElement("div", null, separator) : /* @__PURE__ */ import_react.default.createElement("div", null, separator) : null
58
+ )));
59
+ };
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ Breadcrumb
63
+ });
@@ -0,0 +1,26 @@
1
+ // components/elements/breadcrumb/Breadcrumb.tsx
2
+ import React from "react";
3
+ var Breadcrumb = ({
4
+ breadcrumbLinks,
5
+ separator = ">"
6
+ }) => {
7
+ return /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, breadcrumbLinks.map((singleBreadcrumbLink, index) => /* @__PURE__ */ React.createElement(
8
+ "div",
9
+ {
10
+ key: index,
11
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
12
+ },
13
+ /* @__PURE__ */ React.createElement(
14
+ "a",
15
+ {
16
+ href: singleBreadcrumbLink.href,
17
+ className: index + 1 === breadcrumbLinks.length ? "hawa-pointer-events-none" : "hawa-underline-offset-4 hawa-transition-all hover:hawa-text-primary hover:hawa-underline hover:hawa-decoration-2"
18
+ },
19
+ singleBreadcrumbLink.label
20
+ ),
21
+ index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */ React.createElement("div", null, separator) : /* @__PURE__ */ React.createElement("div", null, separator) : null
22
+ )));
23
+ };
24
+ export {
25
+ Breadcrumb
26
+ };
@@ -1,12 +1,87 @@
1
1
  import {
2
- Card,
3
- CardContent,
4
- CardDescription,
5
- CardFooter,
6
- CardHeader,
7
- CardTitle
8
- } from "../chunk-VBTYVVA7.mjs";
9
- import "../chunk-TE3BKEXL.mjs";
2
+ cn
3
+ } from "../chunk-TE3BKEXL.mjs";
4
+
5
+ // components/elements/card/Card.tsx
6
+ import * as React from "react";
7
+ var Card = React.forwardRef(
8
+ ({ className, variant = "default", clickable = false, ...props }, ref) => {
9
+ let variantStyles = {
10
+ default: cn(
11
+ "hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
12
+ clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow"
13
+ ),
14
+ neoBrutalism: cn(
15
+ "neo-brutalism",
16
+ // "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] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]",
17
+ clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
18
+ )
19
+ };
20
+ return /* @__PURE__ */ React.createElement(
21
+ "div",
22
+ {
23
+ ref,
24
+ className: cn(className, variantStyles[variant]),
25
+ ...props
26
+ }
27
+ );
28
+ }
29
+ );
30
+ var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
31
+ "div",
32
+ {
33
+ ref,
34
+ className: cn(
35
+ "hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
36
+ className
37
+ ),
38
+ ...props
39
+ }
40
+ ));
41
+ var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
42
+ "h3",
43
+ {
44
+ ref,
45
+ className: cn("hawa-text-2xl hawa-font-semibold ", className),
46
+ ...props
47
+ }
48
+ ));
49
+ var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
50
+ "p",
51
+ {
52
+ ref,
53
+ className: cn("hawa-text-sm hawa-text-muted-foreground", className),
54
+ ...props
55
+ }
56
+ ));
57
+ var CardContent = React.forwardRef(
58
+ ({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React.createElement(
59
+ "div",
60
+ {
61
+ ref,
62
+ className: cn(
63
+ noPadding ? "hawa-p-0" : "hawa-p-6",
64
+ headless ? "hawa-pt-6" : "hawa-pt-0",
65
+ className
66
+ ),
67
+ ...props
68
+ }
69
+ )
70
+ );
71
+ var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
72
+ "div",
73
+ {
74
+ ref,
75
+ className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className),
76
+ ...props
77
+ }
78
+ ));
79
+ CardDescription.displayName = "CardDescription";
80
+ CardContent.displayName = "CardContent";
81
+ CardHeader.displayName = "CardHeader";
82
+ CardFooter.displayName = "CardFooter";
83
+ CardTitle.displayName = "CardTitle";
84
+ Card.displayName = "Card";
10
85
  export {
11
86
  Card,
12
87
  CardContent,
@@ -1,7 +1,142 @@
1
1
  import {
2
- Checkbox
3
- } from "../chunk-XA646BZ2.mjs";
4
- import "../chunk-TE3BKEXL.mjs";
2
+ cn
3
+ } from "../chunk-TE3BKEXL.mjs";
4
+
5
+ // components/elements/checkbox/Checkbox.tsx
6
+ import * as React from "react";
7
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
8
+ var Checkbox = ({
9
+ id,
10
+ label,
11
+ sublabel,
12
+ helperText,
13
+ disabled,
14
+ size = "default",
15
+ radius = "inherit",
16
+ ...props
17
+ }) => {
18
+ let labelLineHeightStyles = {
19
+ xs: sublabel || helperText ? 0.5 : 0.1,
20
+ sm: 0.6,
21
+ default: 0.7,
22
+ md: 0.8,
23
+ lg: 0.9,
24
+ xl: 1
25
+ };
26
+ return /* @__PURE__ */ React.createElement(
27
+ "div",
28
+ {
29
+ className: cn(
30
+ "hawa-flex hawa-gap-2",
31
+ "hawa-items-top",
32
+ sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
33
+ )
34
+ },
35
+ /* @__PURE__ */ React.createElement(
36
+ CheckboxElement,
37
+ {
38
+ ...props,
39
+ size,
40
+ radius,
41
+ disabled,
42
+ id
43
+ }
44
+ ),
45
+ (label || helperText) && /* @__PURE__ */ React.createElement("div", { className: "hawa-grid hawa-gap-1.5 hawa-leading-none" }, label && /* @__PURE__ */ React.createElement(
46
+ "label",
47
+ {
48
+ htmlFor: id,
49
+ className: cn(
50
+ "hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium hawa-leading-none",
51
+ disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
52
+ ),
53
+ style: {
54
+ lineHeight: labelLineHeightStyles[size]
55
+ }
56
+ },
57
+ label
58
+ ), sublabel && /* @__PURE__ */ React.createElement(
59
+ "label",
60
+ {
61
+ htmlFor: id,
62
+ className: cn(
63
+ "hawa-w-fit hawa-select-none hawa-text-sm hawa-text-muted-foreground",
64
+ disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
65
+ )
66
+ },
67
+ sublabel
68
+ ), helperText && !disabled && /* @__PURE__ */ React.createElement(
69
+ "label",
70
+ {
71
+ htmlFor: id,
72
+ className: cn(
73
+ "hawa-w-fit hawa-select-none hawa-text-xs hawa-text-helper-color",
74
+ disabled && "hawa-cursor-not-allowed hawa-opacity-70"
75
+ )
76
+ },
77
+ helperText
78
+ ))
79
+ );
80
+ };
81
+ var CheckboxElement = React.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
82
+ let checkboxRadius = {
83
+ none: "hawa-rounded-none",
84
+ inherit: "hawa-rounded-sm",
85
+ full: "hawa-rounded-full"
86
+ };
87
+ let checkboxSizes = {
88
+ xs: "hawa-w-3 hawa-h-3",
89
+ sm: "hawa-w-6 hawa-h-6",
90
+ default: "hawa-icon",
91
+ md: "hawa-w-8 hawa-h-8",
92
+ lg: "hawa-w-10 hawa-h-10",
93
+ xl: "hawa-w-12 hawa-h-12"
94
+ };
95
+ let checkboxIndicatorSizes = {
96
+ xs: "0.5em",
97
+ default: "0.60em",
98
+ sm: "0.75em",
99
+ md: "0.875em",
100
+ lg: "1em",
101
+ xl: "1.25em"
102
+ };
103
+ return /* @__PURE__ */ React.createElement(
104
+ CheckboxPrimitive.Root,
105
+ {
106
+ ref,
107
+ className: cn(
108
+ "hawa-peer hawa-shrink-0 hawa-border hawa-border-primary hawa-ring-offset-background focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50 data-[state=checked]:hawa-bg-primary data-[state=checked]:hawa-text-primary-foreground",
109
+ checkboxSizes[size],
110
+ checkboxRadius[radius],
111
+ className
112
+ ),
113
+ ...props
114
+ },
115
+ /* @__PURE__ */ React.createElement(
116
+ CheckboxPrimitive.Indicator,
117
+ {
118
+ className: cn(
119
+ "hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
120
+ )
121
+ },
122
+ /* @__PURE__ */ React.createElement(
123
+ "svg",
124
+ {
125
+ "aria-label": "Check Mark",
126
+ stroke: "currentColor",
127
+ fill: "currentColor",
128
+ strokeWidth: "0",
129
+ viewBox: "0 0 512 512",
130
+ height: checkboxIndicatorSizes[size],
131
+ width: checkboxIndicatorSizes[size]
132
+ },
133
+ /* @__PURE__ */ React.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
134
+ ),
135
+ " "
136
+ )
137
+ );
138
+ });
139
+ CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
5
140
  export {
6
141
  Checkbox
7
142
  };
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // components/elements/chip/index.ts
31
+ var chip_exports = {};
32
+ __export(chip_exports, {
33
+ Chip: () => Chip
34
+ });
35
+ module.exports = __toCommonJS(chip_exports);
36
+
37
+ // components/elements/chip/Chip.tsx
38
+ var import_react = __toESM(require("react"));
39
+
40
+ // components/util.ts
41
+ var import_clsx = require("clsx");
42
+ var import_tailwind_merge = require("tailwind-merge");
43
+ function cn(...inputs) {
44
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
45
+ }
46
+
47
+ // components/elements/chip/Chip.tsx
48
+ var Chip = import_react.default.forwardRef(
49
+ ({
50
+ label,
51
+ size = "normal",
52
+ icon,
53
+ color,
54
+ radius = "inherit",
55
+ dotType,
56
+ ...rest
57
+ }, ref) => {
58
+ let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
59
+ let radiusStyles = {
60
+ inherit: " hawa-rounded",
61
+ full: "hawa-rounded-full",
62
+ none: "hawa-rounded-none"
63
+ };
64
+ let sizeStyles = {
65
+ small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
66
+ normal: "hawa-h-fit hawa-text-xs",
67
+ large: "hawa-text-base"
68
+ };
69
+ let dotStyles = {
70
+ small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
71
+ normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
72
+ large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
73
+ };
74
+ let dotTypeStyles = {
75
+ available: "hawa-bg-green-500",
76
+ unavailable: "hawa-bg-red-500"
77
+ };
78
+ let colorStyles = {
79
+ green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
80
+ blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
81
+ red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
82
+ yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
83
+ orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
84
+ purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
85
+ cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
86
+ hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
87
+ oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
88
+ };
89
+ if (label) {
90
+ return /* @__PURE__ */ import_react.default.createElement(
91
+ "span",
92
+ {
93
+ ...rest,
94
+ ref,
95
+ className: cn(
96
+ defaultStyles,
97
+ sizeStyles[size],
98
+ radiusStyles[radius],
99
+ color ? colorStyles[color] : "hawa-border hawa-bg-none"
100
+ )
101
+ },
102
+ dotType && /* @__PURE__ */ import_react.default.createElement(
103
+ "span",
104
+ {
105
+ className: cn(dotStyles[size], dotTypeStyles[dotType])
106
+ }
107
+ ),
108
+ icon && icon,
109
+ label
110
+ );
111
+ } else {
112
+ return /* @__PURE__ */ import_react.default.createElement(
113
+ "span",
114
+ {
115
+ ...rest,
116
+ ref,
117
+ className: cn(
118
+ "hawa-h-2 hawa-w-2 hawa-rounded-full",
119
+ color ? colorStyles[color] : "hawa-border hawa-bg-none"
120
+ )
121
+ }
122
+ );
123
+ }
124
+ }
125
+ );
126
+ // Annotate the CommonJS export names for ESM import in node:
127
+ 0 && (module.exports = {
128
+ Chip
129
+ });
@@ -0,0 +1,8 @@
1
+ import "../chunk-B6UCD4GP.mjs";
2
+ import {
3
+ Chip
4
+ } from "../chunk-72HYR6WB.mjs";
5
+ import "../chunk-TE3BKEXL.mjs";
6
+ export {
7
+ Chip
8
+ };