@zentauri-ui/zentauri-components 0.0.91 → 0.0.92

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 (167) hide show
  1. package/dist/chunk-BZSIXBA7.js +70 -0
  2. package/dist/chunk-BZSIXBA7.js.map +1 -0
  3. package/dist/chunk-E5UX537J.js +11 -0
  4. package/dist/chunk-E5UX537J.js.map +1 -0
  5. package/dist/chunk-MEWYFWBX.mjs +14 -0
  6. package/dist/chunk-MEWYFWBX.mjs.map +1 -0
  7. package/dist/chunk-VJHD7QZH.mjs +73 -0
  8. package/dist/chunk-VJHD7QZH.mjs.map +1 -0
  9. package/dist/ui/accordion.js +51 -57
  10. package/dist/ui/accordion.js.map +1 -1
  11. package/dist/ui/{accordion.cjs → accordion.mjs} +38 -67
  12. package/dist/ui/accordion.mjs.map +1 -0
  13. package/dist/ui/{alert.d.cts → alert.d.mts} +1 -1
  14. package/dist/ui/alert.d.ts +1 -1
  15. package/dist/ui/alert.js +40 -46
  16. package/dist/ui/alert.js.map +1 -1
  17. package/dist/ui/{alert.cjs → alert.mjs} +29 -66
  18. package/dist/ui/alert.mjs.map +1 -0
  19. package/dist/ui/{badge.d.cts → badge.d.mts} +1 -1
  20. package/dist/ui/badge.d.ts +1 -1
  21. package/dist/ui/badge.js +20 -26
  22. package/dist/ui/badge.js.map +1 -1
  23. package/dist/ui/{badge.cjs → badge.mjs} +17 -48
  24. package/dist/ui/badge.mjs.map +1 -0
  25. package/dist/ui/{buttons.d.cts → buttons.d.mts} +1 -1
  26. package/dist/ui/buttons.d.ts +1 -1
  27. package/dist/ui/buttons.js +18 -87
  28. package/dist/ui/buttons.js.map +1 -1
  29. package/dist/ui/buttons.mjs +109 -0
  30. package/dist/ui/buttons.mjs.map +1 -0
  31. package/dist/ui/{card.d.cts → card.d.mts} +1 -1
  32. package/dist/ui/card.d.ts +1 -1
  33. package/dist/ui/card.js +40 -46
  34. package/dist/ui/card.js.map +1 -1
  35. package/dist/ui/{card.cjs → card.mjs} +26 -65
  36. package/dist/ui/card.mjs.map +1 -0
  37. package/dist/ui/{divider.d.cts → divider.d.mts} +2 -2
  38. package/dist/ui/divider.d.ts +2 -2
  39. package/dist/ui/divider.js +30 -36
  40. package/dist/ui/divider.js.map +1 -1
  41. package/dist/ui/{divider.cjs → divider.mjs} +22 -55
  42. package/dist/ui/divider.mjs.map +1 -0
  43. package/dist/ui/{drawer.d.cts → drawer.d.mts} +3 -3
  44. package/dist/ui/drawer.d.ts +3 -3
  45. package/dist/ui/drawer.js +64 -70
  46. package/dist/ui/drawer.js.map +1 -1
  47. package/dist/ui/{drawer.cjs → drawer.mjs} +48 -77
  48. package/dist/ui/drawer.mjs.map +1 -0
  49. package/dist/ui/{dropdown.d.cts → dropdown.d.mts} +4 -4
  50. package/dist/ui/dropdown.d.ts +4 -4
  51. package/dist/ui/dropdown.js +43 -49
  52. package/dist/ui/dropdown.js.map +1 -1
  53. package/dist/ui/{dropdown.cjs → dropdown.mjs} +34 -62
  54. package/dist/ui/dropdown.mjs.map +1 -0
  55. package/dist/ui/{empty-state.d.cts → empty-state.d.mts} +1 -1
  56. package/dist/ui/empty-state.d.ts +1 -1
  57. package/dist/ui/empty-state.js +31 -37
  58. package/dist/ui/empty-state.js.map +1 -1
  59. package/dist/ui/empty-state.mjs +150 -0
  60. package/dist/ui/empty-state.mjs.map +1 -0
  61. package/dist/ui/{inputs.d.cts → inputs.d.mts} +2 -2
  62. package/dist/ui/inputs.d.ts +2 -2
  63. package/dist/ui/inputs.js +26 -32
  64. package/dist/ui/inputs.js.map +1 -1
  65. package/dist/ui/{inputs.cjs → inputs.mjs} +21 -51
  66. package/dist/ui/inputs.mjs.map +1 -0
  67. package/dist/ui/{modal.d.cts → modal.d.mts} +3 -3
  68. package/dist/ui/modal.d.ts +3 -3
  69. package/dist/ui/modal.js +69 -75
  70. package/dist/ui/modal.js.map +1 -1
  71. package/dist/ui/{modal.cjs → modal.mjs} +53 -79
  72. package/dist/ui/modal.mjs.map +1 -0
  73. package/dist/ui/{pagination.d.cts → pagination.d.mts} +3 -3
  74. package/dist/ui/pagination.d.ts +3 -3
  75. package/dist/ui/pagination.js +48 -117
  76. package/dist/ui/pagination.js.map +1 -1
  77. package/dist/ui/{pagination.cjs → pagination.mjs} +35 -131
  78. package/dist/ui/pagination.mjs.map +1 -0
  79. package/dist/ui/{progress.d.cts → progress.d.mts} +5 -5
  80. package/dist/ui/progress.d.ts +5 -5
  81. package/dist/ui/progress.js +37 -43
  82. package/dist/ui/progress.js.map +1 -1
  83. package/dist/ui/{progress.cjs → progress.mjs} +25 -60
  84. package/dist/ui/progress.mjs.map +1 -0
  85. package/dist/ui/{select.d.cts → select.d.mts} +4 -4
  86. package/dist/ui/select.d.ts +4 -4
  87. package/dist/ui/select.js +43 -49
  88. package/dist/ui/select.js.map +1 -1
  89. package/dist/ui/{select.cjs → select.mjs} +31 -68
  90. package/dist/ui/select.mjs.map +1 -0
  91. package/dist/ui/{skeleton.d.cts → skeleton.d.mts} +3 -3
  92. package/dist/ui/skeleton.d.ts +3 -3
  93. package/dist/ui/skeleton.js +45 -51
  94. package/dist/ui/skeleton.js.map +1 -1
  95. package/dist/ui/{skeleton.cjs → skeleton.mjs} +31 -67
  96. package/dist/ui/skeleton.mjs.map +1 -0
  97. package/dist/ui/{spinner.d.cts → spinner.d.mts} +3 -3
  98. package/dist/ui/spinner.d.ts +3 -3
  99. package/dist/ui/spinner.js +34 -40
  100. package/dist/ui/spinner.js.map +1 -1
  101. package/dist/ui/{spinner.cjs → spinner.mjs} +27 -57
  102. package/dist/ui/spinner.mjs.map +1 -0
  103. package/dist/ui/{table.d.cts → table.d.mts} +4 -4
  104. package/dist/ui/table.d.ts +4 -4
  105. package/dist/ui/table.js +43 -49
  106. package/dist/ui/table.js.map +1 -1
  107. package/dist/ui/{table.cjs → table.mjs} +26 -65
  108. package/dist/ui/table.mjs.map +1 -0
  109. package/dist/ui/{tabs.d.cts → tabs.d.mts} +1 -1
  110. package/dist/ui/tabs.d.ts +1 -1
  111. package/dist/ui/tabs.js +41 -47
  112. package/dist/ui/tabs.js.map +1 -1
  113. package/dist/ui/{tabs.cjs → tabs.mjs} +29 -59
  114. package/dist/ui/tabs.mjs.map +1 -0
  115. package/dist/ui/{toast.d.cts → toast.d.mts} +1 -1
  116. package/dist/ui/toast.d.ts +1 -1
  117. package/dist/ui/toast.js +57 -63
  118. package/dist/ui/toast.js.map +1 -1
  119. package/dist/ui/{toast.cjs → toast.mjs} +43 -74
  120. package/dist/ui/toast.mjs.map +1 -0
  121. package/dist/ui/{toggle.d.cts → toggle.d.mts} +1 -1
  122. package/dist/ui/toggle.d.ts +1 -1
  123. package/dist/ui/toggle.js +23 -29
  124. package/dist/ui/toggle.js.map +1 -1
  125. package/dist/ui/{toggle.cjs → toggle.mjs} +19 -50
  126. package/dist/ui/toggle.mjs.map +1 -0
  127. package/dist/ui/{tooltip.d.cts → tooltip.d.mts} +2 -2
  128. package/dist/ui/tooltip.d.ts +2 -2
  129. package/dist/ui/tooltip.js +29 -35
  130. package/dist/ui/tooltip.js.map +1 -1
  131. package/dist/ui/{tooltip.cjs → tooltip.mjs} +26 -58
  132. package/dist/ui/tooltip.mjs.map +1 -0
  133. package/dist/variants-Dd9pe-ov.d.mts +8 -0
  134. package/dist/variants-Dd9pe-ov.d.ts +8 -0
  135. package/package.json +10 -15
  136. package/dist/ui/accordion.cjs.map +0 -1
  137. package/dist/ui/alert.cjs.map +0 -1
  138. package/dist/ui/badge.cjs.map +0 -1
  139. package/dist/ui/buttons.cjs +0 -202
  140. package/dist/ui/buttons.cjs.map +0 -1
  141. package/dist/ui/card.cjs.map +0 -1
  142. package/dist/ui/divider.cjs.map +0 -1
  143. package/dist/ui/drawer.cjs.map +0 -1
  144. package/dist/ui/dropdown.cjs.map +0 -1
  145. package/dist/ui/empty-state.cjs +0 -186
  146. package/dist/ui/empty-state.cjs.map +0 -1
  147. package/dist/ui/index.cjs +0 -5764
  148. package/dist/ui/index.cjs.map +0 -1
  149. package/dist/ui/index.d.cts +0 -27
  150. package/dist/ui/index.d.ts +0 -27
  151. package/dist/ui/index.js +0 -5626
  152. package/dist/ui/index.js.map +0 -1
  153. package/dist/ui/inputs.cjs.map +0 -1
  154. package/dist/ui/modal.cjs.map +0 -1
  155. package/dist/ui/pagination.cjs.map +0 -1
  156. package/dist/ui/progress.cjs.map +0 -1
  157. package/dist/ui/select.cjs.map +0 -1
  158. package/dist/ui/skeleton.cjs.map +0 -1
  159. package/dist/ui/spinner.cjs.map +0 -1
  160. package/dist/ui/table.cjs.map +0 -1
  161. package/dist/ui/tabs.cjs.map +0 -1
  162. package/dist/ui/toast.cjs.map +0 -1
  163. package/dist/ui/toggle.cjs.map +0 -1
  164. package/dist/ui/tooltip.cjs.map +0 -1
  165. package/dist/variants-1Bx3BEeS.d.cts +0 -8
  166. package/dist/variants-1Bx3BEeS.d.ts +0 -8
  167. /package/dist/ui/{accordion.d.cts → accordion.d.mts} +0 -0
@@ -1,49 +1,13 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ "use client";
19
2
 
20
- // src/ui/alert/index.ts
21
- var alert_exports = {};
22
- __export(alert_exports, {
23
- Alert: () => Alert,
24
- AlertClose: () => AlertClose,
25
- AlertDefaultIcon: () => AlertDefaultIcon,
26
- AlertDescription: () => AlertDescription,
27
- AlertIcon: () => AlertIcon,
28
- AlertTitle: () => AlertTitle,
29
- alertAnimationPresets: () => alertAnimationPresets,
30
- alertDescriptionVariants: () => alertDescriptionVariants,
31
- alertTitleVariants: () => alertTitleVariants,
32
- alertVariants: () => alertVariants
33
- });
34
- module.exports = __toCommonJS(alert_exports);
3
+ import {
4
+ cn
5
+ } from "../chunk-MEWYFWBX.mjs";
35
6
 
36
7
  // src/ui/alert/alert.tsx
37
- var import_react = require("react");
38
- var import_framer_motion = require("framer-motion");
39
- var import_hi2 = require("react-icons/hi2");
40
-
41
- // src/lib/utils.ts
42
- var import_clsx = require("clsx");
43
- var import_tailwind_merge = require("tailwind-merge");
44
- function cn(...inputs) {
45
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
46
- }
8
+ import { createContext, useContext, useMemo } from "react";
9
+ import { motion } from "framer-motion";
10
+ import { HiExclamationTriangle, HiInformationCircle, HiXMark } from "react-icons/hi2";
47
11
 
48
12
  // src/ui/alert/animations.ts
49
13
  var alertAnimationPresets = {
@@ -66,8 +30,8 @@ var alertAnimationPresets = {
66
30
  };
67
31
 
68
32
  // src/ui/alert/variants.ts
69
- var import_class_variance_authority = require("class-variance-authority");
70
- var alertVariants = (0, import_class_variance_authority.cva)(
33
+ import { cva } from "class-variance-authority";
34
+ var alertVariants = cva(
71
35
  "relative flex w-full gap-3 border text-sm ring-offset-slate-950 transition-colors",
72
36
  {
73
37
  variants: {
@@ -108,7 +72,7 @@ var alertVariants = (0, import_class_variance_authority.cva)(
108
72
  }
109
73
  }
110
74
  );
111
- var alertTitleVariants = (0, import_class_variance_authority.cva)("font-semibold leading-tight", {
75
+ var alertTitleVariants = cva("font-semibold leading-tight", {
112
76
  variants: {
113
77
  size: {
114
78
  sm: "text-xs md:text-sm",
@@ -118,7 +82,7 @@ var alertTitleVariants = (0, import_class_variance_authority.cva)("font-semibold
118
82
  },
119
83
  defaultVariants: { size: "md" }
120
84
  });
121
- var alertDescriptionVariants = (0, import_class_variance_authority.cva)("text-slate-300", {
85
+ var alertDescriptionVariants = cva("text-slate-300", {
122
86
  variants: {
123
87
  size: {
124
88
  sm: "text-xs md:text-sm",
@@ -130,10 +94,10 @@ var alertDescriptionVariants = (0, import_class_variance_authority.cva)("text-sl
130
94
  });
131
95
 
132
96
  // src/ui/alert/alert.tsx
133
- var import_jsx_runtime = require("react/jsx-runtime");
134
- var AlertSizeContext = (0, import_react.createContext)("md");
97
+ import { jsx, jsxs } from "react/jsx-runtime";
98
+ var AlertSizeContext = createContext("md");
135
99
  function useAlertSize() {
136
- const ctx = (0, import_react.useContext)(AlertSizeContext);
100
+ const ctx = useContext(AlertSizeContext);
137
101
  if (!ctx) {
138
102
  throw new Error("useAlertSize must be used within an Alert");
139
103
  }
@@ -155,9 +119,9 @@ function Alert(props) {
155
119
  } = props;
156
120
  const motionProps = alertAnimationPresets[animation];
157
121
  const live = appearance === "error" ? "assertive" : "polite";
158
- const ctx = (0, import_react.useMemo)(() => size ?? "md", [size]);
159
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertSizeContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
160
- import_framer_motion.motion.div,
122
+ const ctx = useMemo(() => size ?? "md", [size]);
123
+ return /* @__PURE__ */ jsx(AlertSizeContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxs(
124
+ motion.div,
161
125
  {
162
126
  ref,
163
127
  "data-slot": "alert",
@@ -173,7 +137,7 @@ function Alert(props) {
173
137
  ...rest,
174
138
  children: [
175
139
  children,
176
- closable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
140
+ closable ? /* @__PURE__ */ jsx(
177
141
  "button",
178
142
  {
179
143
  type: "button",
@@ -184,7 +148,7 @@ function Alert(props) {
184
148
  "absolute right-3 top-3 inline-flex size-8 items-center justify-center rounded-md text-slate-200 transition hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/30",
185
149
  triggerClassName
186
150
  ),
187
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hi2.HiXMark, { className: "size-4", "aria-hidden": true })
151
+ children: /* @__PURE__ */ jsx(HiXMark, { className: "size-4", "aria-hidden": true })
188
152
  }
189
153
  ) : null
190
154
  ]
@@ -193,17 +157,17 @@ function Alert(props) {
193
157
  }
194
158
  Alert.displayName = "Alert";
195
159
  function AlertIcon({ className, children }) {
196
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "data-slot": "alert-icon", className: cn("mt-0.5 shrink-0 text-current", className), children });
160
+ return /* @__PURE__ */ jsx("span", { "data-slot": "alert-icon", className: cn("mt-0.5 shrink-0 text-current", className), children });
197
161
  }
198
162
  AlertIcon.displayName = "AlertIcon";
199
163
  function AlertTitle({ className, children }) {
200
164
  const size = useAlertSize();
201
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "alert-title", className: cn(alertTitleVariants({ size }), className), children });
165
+ return /* @__PURE__ */ jsx("div", { "data-slot": "alert-title", className: cn(alertTitleVariants({ size }), className), children });
202
166
  }
203
167
  AlertTitle.displayName = "AlertTitle";
204
168
  function AlertDescription({ className, children }) {
205
169
  const size = useAlertSize();
206
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
170
+ return /* @__PURE__ */ jsx(
207
171
  "div",
208
172
  {
209
173
  "data-slot": "alert-description",
@@ -219,7 +183,7 @@ function AlertClose({
219
183
  "aria-label": ariaLabel = "Dismiss alert",
220
184
  onClick
221
185
  }) {
222
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
186
+ return /* @__PURE__ */ jsx(
223
187
  "button",
224
188
  {
225
189
  type: "button",
@@ -230,19 +194,18 @@ function AlertClose({
230
194
  "inline-flex size-8 items-center justify-center rounded-md text-slate-200 transition hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/30",
231
195
  className
232
196
  ),
233
- children: children ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hi2.HiXMark, { className: "size-4", "aria-hidden": true })
197
+ children: children ?? /* @__PURE__ */ jsx(HiXMark, { className: "size-4", "aria-hidden": true })
234
198
  }
235
199
  );
236
200
  }
237
201
  AlertClose.displayName = "AlertClose";
238
202
  function AlertDefaultIcon({ appearance }) {
239
203
  if (appearance === "error") {
240
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hi2.HiExclamationTriangle, { className: "size-5", "aria-hidden": true });
204
+ return /* @__PURE__ */ jsx(HiExclamationTriangle, { className: "size-5", "aria-hidden": true });
241
205
  }
242
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hi2.HiInformationCircle, { className: "size-5", "aria-hidden": true });
206
+ return /* @__PURE__ */ jsx(HiInformationCircle, { className: "size-5", "aria-hidden": true });
243
207
  }
244
- // Annotate the CommonJS export names for ESM import in node:
245
- 0 && (module.exports = {
208
+ export {
246
209
  Alert,
247
210
  AlertClose,
248
211
  AlertDefaultIcon,
@@ -253,5 +216,5 @@ function AlertDefaultIcon({ appearance }) {
253
216
  alertDescriptionVariants,
254
217
  alertTitleVariants,
255
218
  alertVariants
256
- });
257
- //# sourceMappingURL=alert.cjs.map
219
+ };
220
+ //# sourceMappingURL=alert.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ui/alert/alert.tsx","../../src/ui/alert/animations.ts","../../src/ui/alert/variants.ts"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, useMemo } from \"react\";\nimport { motion } from \"framer-motion\";\nimport { HiExclamationTriangle, HiInformationCircle, HiXMark } from \"react-icons/hi2\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport { alertAnimationPresets } from \"./animations\";\nimport type { AlertProps, AlertSectionProps, AlertSize } from \"./types\";\nimport {\n alertDescriptionVariants,\n alertTitleVariants,\n alertVariants,\n} from \"./variants\";\n\nconst AlertSizeContext = createContext<AlertSize>(\"md\");\n\nfunction useAlertSize(): AlertSize {\n const ctx = useContext(AlertSizeContext);\n if (!ctx) {\n throw new Error(\"useAlertSize must be used within an Alert\");\n }\n return ctx;\n}\n\nexport function Alert(props: AlertProps) {\n const {\n className,\n triggerClassName,\n appearance,\n size = \"md\",\n animation = \"none\",\n closable = false,\n onClose,\n closeLabel = \"Dismiss alert\",\n children,\n ref,\n ...rest\n } = props;\n const motionProps = alertAnimationPresets[animation];\n const live = appearance === \"error\" ? \"assertive\" : \"polite\";\n\n const ctx = useMemo(() => size ?? \"md\", [size]);\n\n return (\n <AlertSizeContext.Provider value={ctx}>\n <motion.div\n ref={ref}\n data-slot=\"alert\"\n role=\"alert\"\n aria-live={live}\n className={cn(\n alertVariants({ appearance, size }),\n closable ? \"pr-12\" : \"\",\n className,\n )}\n initial={animation === \"none\" ? false : undefined}\n {...motionProps}\n {...rest}\n >\n {children}\n {closable ? (\n <button\n type=\"button\"\n data-slot=\"alert-close\"\n aria-label={closeLabel}\n onClick={onClose}\n className={cn(\n \"absolute right-3 top-3 inline-flex size-8 items-center justify-center rounded-md text-slate-200 transition hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/30\",\n triggerClassName,\n )}\n >\n <HiXMark className=\"size-4\" aria-hidden />\n </button>\n ) : null}\n </motion.div>\n </AlertSizeContext.Provider>\n );\n}\n\nAlert.displayName = \"Alert\";\n\nexport function AlertIcon({ className, children }: AlertSectionProps) {\n return (\n <span data-slot=\"alert-icon\" className={cn(\"mt-0.5 shrink-0 text-current\", className)}>\n {children}\n </span>\n );\n}\n\nAlertIcon.displayName = \"AlertIcon\";\n\nexport function AlertTitle({ className, children }: AlertSectionProps) {\n const size = useAlertSize();\n return (\n <div data-slot=\"alert-title\" className={cn(alertTitleVariants({ size }), className)}>\n {children}\n </div>\n );\n}\n\nAlertTitle.displayName = \"AlertTitle\";\n\nexport function AlertDescription({ className, children }: AlertSectionProps) {\n const size = useAlertSize();\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(alertDescriptionVariants({ size }), className)}\n >\n {children}\n </div>\n );\n}\n\nAlertDescription.displayName = \"AlertDescription\";\n\nexport function AlertClose({\n className,\n children,\n \"aria-label\": ariaLabel = \"Dismiss alert\",\n onClick,\n}: AlertSectionProps & { onClick?: () => void; \"aria-label\"?: string }) {\n return (\n <button\n type=\"button\"\n data-slot=\"alert-close\"\n aria-label={ariaLabel}\n onClick={onClick}\n className={cn(\n \"inline-flex size-8 items-center justify-center rounded-md text-slate-200 transition hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/30\",\n className,\n )}\n >\n {children ?? <HiXMark className=\"size-4\" aria-hidden />}\n </button>\n );\n}\n\nAlertClose.displayName = \"AlertClose\";\n\nexport function AlertDefaultIcon({ appearance }: { appearance?: AlertProps[\"appearance\"] }) {\n if (appearance === \"error\") {\n return <HiExclamationTriangle className=\"size-5\" aria-hidden />;\n }\n return <HiInformationCircle className=\"size-5\" aria-hidden />;\n}\n","import type { HTMLMotionProps } from \"framer-motion\";\n\nimport type { AlertAnimation } from \"./types\";\n\ntype AlertPresetMotionProps = Pick<\n HTMLMotionProps<\"div\">,\n \"initial\" | \"animate\" | \"transition\"\n>;\n\nexport type AlertAnimationPresets = Record<AlertAnimation, AlertPresetMotionProps>;\n\nexport const alertAnimationPresets: AlertAnimationPresets = {\n none: {},\n \"slide-down\": {\n initial: { y: -8, opacity: 0 },\n animate: { y: 0, opacity: 1 },\n transition: { type: \"spring\", stiffness: 420, damping: 30 },\n },\n fade: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n pop: {\n initial: { scale: 0.96, opacity: 0 },\n animate: { scale: 1, opacity: 1 },\n transition: { type: \"spring\", stiffness: 520, damping: 28 },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\nexport const alertVariants = cva(\n \"relative flex w-full gap-3 border text-sm ring-offset-slate-950 transition-colors\",\n {\n variants: {\n appearance: {\n default: \"border-white/10 bg-white/5 text-slate-50\",\n success: \"border-emerald-500/40 bg-emerald-500/10 text-emerald-50\",\n warning: \"border-amber-500/40 bg-amber-500/10 text-amber-50\",\n error: \"border-rose-500/50 bg-rose-500/10 text-rose-50\",\n info: \"border-sky-500/40 bg-sky-500/10 text-sky-50\",\n ghost: \"border-transparent bg-transparent text-slate-200\",\n purple: \"border-purple-600 bg-purple-950/70 backdrop-blur-xl\",\n pink: \"border-pink-600 bg-pink-950/70 backdrop-blur-xl\",\n orange: \"border-orange-600 bg-orange-950/70 backdrop-blur-xl\",\n yellow: \"border-yellow-600 bg-yellow-950/70 backdrop-blur-xl\",\n teal: \"border-teal-600 bg-teal-950/70 backdrop-blur-xl\",\n indigo: \"border-indigo-600 bg-indigo-950/70 backdrop-blur-xl\",\n gray: \"border-gray-600 bg-gray-950/70 backdrop-blur-xl\",\n violet: \"border-violet-600 bg-violet-950/70 backdrop-blur-xl\",\n \"gradient-blue\": \"border-gradient-to-r from-blue-600 to-purple-600 bg-gradient-to-r from-blue-950/70 to-purple-950/70 backdrop-blur-xl\",\n \"gradient-green\": \"border-gradient-to-r from-green-600 to-lime-600 bg-gradient-to-r from-green-950/70 to-lime-950/70 backdrop-blur-xl\",\n \"gradient-red\": \"border-gradient-to-r from-red-600 to-pink-600 bg-gradient-to-r from-red-950/70 to-pink-950/70 backdrop-blur-xl\",\n \"gradient-yellow\": \"border-gradient-to-r from-yellow-600 to-orange-600 bg-gradient-to-r from-yellow-950/70 to-orange-950/70 backdrop-blur-xl\",\n \"gradient-purple\": \"border-gradient-to-r from-purple-600 to-pink-600 bg-gradient-to-r from-purple-950/70 to-pink-950/70 backdrop-blur-xl\",\n \"gradient-teal\": \"border-gradient-to-r from-teal-600 to-cyan-600 bg-gradient-to-r from-teal-950/70 to-cyan-950/70 backdrop-blur-xl\",\n \"gradient-indigo\": \"border-gradient-to-r from-indigo-600 to-purple-600 bg-gradient-to-r from-indigo-950/70 to-purple-950/70 backdrop-blur-xl\",\n \"gradient-pink\": \"border-gradient-to-r from-pink-600 to-rose-600 bg-gradient-to-r from-pink-950/70 to-rose-950/70 backdrop-blur-xl\",\n \"gradient-orange\": \"border-gradient-to-r from-orange-600 to-red-600 bg-gradient-to-r from-orange-950/70 to-red-950/70 backdrop-blur-xl\",\n },\n size: {\n sm: \"rounded-lg p-3\",\n md: \"rounded-xl p-4\",\n lg: \"rounded-2xl p-5 text-base\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport const alertTitleVariants = cva(\"font-semibold leading-tight\", {\n variants: {\n size: {\n sm: \"text-xs md:text-sm\",\n md: \"text-xs md:text-sm\",\n lg: \"text-xs md:text-sm\",\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nexport const alertDescriptionVariants = cva(\"text-slate-300\", {\n variants: {\n size: {\n sm: \"text-xs md:text-sm\",\n md: \"text-xs md:text-sm\",\n lg: \"text-xs md:text-sm\",\n },\n },\n defaultVariants: { size: \"md\" },\n});\n"],"mappings":";;;;;;;AAEA,SAAS,eAAe,YAAY,eAAe;AACnD,SAAS,cAAc;AACvB,SAAS,uBAAuB,qBAAqB,eAAe;;;ACO7D,IAAM,wBAA+C;AAAA,EAC1D,MAAM,CAAC;AAAA,EACP,cAAc;AAAA,IACZ,SAAS,EAAE,GAAG,IAAI,SAAS,EAAE;AAAA,IAC7B,SAAS,EAAE,GAAG,GAAG,SAAS,EAAE;AAAA,IAC5B,YAAY,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,GAAG;AAAA,EAC5D;AAAA,EACA,MAAM;AAAA,IACJ,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,YAAY,EAAE,UAAU,IAAI;AAAA,EAC9B;AAAA,EACA,KAAK;AAAA,IACH,SAAS,EAAE,OAAO,MAAM,SAAS,EAAE;AAAA,IACnC,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE;AAAA,IAChC,YAAY,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,GAAG;AA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AM,OAAO,aAAa;AAC1B,SACE,oBAAC,SAAI,aAAU,eAAc,WAAW,GAAG,mBAAmB,EAAE,KAAK,CAAC,GAAG,SAAS,GAC/E,UACH;AAEJ;AAEA,WAAW,cAAc;AAElB,SAAS,iBAAiB,EAAE,WAAW,SAAS,GAAsB;AAC3E,QAAM,OAAO,aAAa;AAC1B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,yBAAyB,EAAE,KAAK,CAAC,GAAG,SAAS;AAAA,MAE1D;AAAA;AAAA,EACH;AAEJ;AAEA,iBAAiB,cAAc;AAExB,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,cAAc,YAAY;AAAA,EAC1B;AACF,GAAwE;AACtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,cAAY;AAAA,MACZ;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEC,sBAAY,oBAAC,WAAQ,WAAU,UAAS,eAAW,MAAC;AAAA;AAAA,EACvD;AAEJ;AAEA,WAAW,cAAc;AAElB,SAAS,iBAAiB,EAAE,WAAW,GAA8C;AAC1F,MAAI,eAAe,SAAS;AAC1B,WAAO,oBAAC,yBAAsB,WAAU,UAAS,eAAW,MAAC;AAAA,EAC/D;AACA,SAAO,oBAAC,uBAAoB,WAAU,UAAS,eAAW,MAAC;AAC7D;","names":[]}
@@ -5,7 +5,7 @@ import { MouseEventHandler, ReactNode } from 'react';
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
6
6
 
7
7
  declare const badgeVariants: (props?: ({
8
- appearance?: "default" | "outline" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | "secondary" | "destructive" | "glass" | null | undefined;
8
+ appearance?: "default" | "outline" | "ghost" | "secondary" | "destructive" | "glass" | "emerald" | "indigo" | "purple" | "pink" | "rose" | "sky" | "teal" | "yellow" | "orange" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | null | undefined;
9
9
  size?: "sm" | "md" | "lg" | null | undefined;
10
10
  shape?: "pill" | "square" | "dot" | null | undefined;
11
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -5,7 +5,7 @@ import { MouseEventHandler, ReactNode } from 'react';
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
6
6
 
7
7
  declare const badgeVariants: (props?: ({
8
- appearance?: "default" | "outline" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | "secondary" | "destructive" | "glass" | null | undefined;
8
+ appearance?: "default" | "outline" | "ghost" | "secondary" | "destructive" | "glass" | "emerald" | "indigo" | "purple" | "pink" | "rose" | "sky" | "teal" | "yellow" | "orange" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | null | undefined;
9
9
  size?: "sm" | "md" | "lg" | null | undefined;
10
10
  shape?: "pill" | "square" | "dot" | null | undefined;
11
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
package/dist/ui/badge.js CHANGED
@@ -1,16 +1,10 @@
1
- "use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
+ var _chunkE5UX537Jjs = require('../chunk-E5UX537J.js');
3
4
 
4
5
  // src/ui/badge/badge.tsx
5
- import { motion } from "framer-motion";
6
- import { HiXMark } from "react-icons/hi2";
7
-
8
- // src/lib/utils.ts
9
- import { clsx } from "clsx";
10
- import { twMerge } from "tailwind-merge";
11
- function cn(...inputs) {
12
- return twMerge(clsx(inputs));
13
- }
6
+ var _framermotion = require('framer-motion');
7
+ var _hi2 = require('react-icons/hi2');
14
8
 
15
9
  // src/ui/badge/animations.ts
16
10
  var badgeAnimationPresets = {
@@ -33,7 +27,7 @@ var badgeAnimationPresets = {
33
27
  };
34
28
 
35
29
  // src/ui/badge/variants.ts
36
- import { cva } from "class-variance-authority";
30
+ var _classvarianceauthority = require('class-variance-authority');
37
31
  var buttonLikeSolidAppearances = {
38
32
  default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
39
33
  secondary: "bg-slate-800 text-slate-50",
@@ -65,7 +59,7 @@ var badgeAppearances = {
65
59
  outline: "border border-white/15 bg-transparent text-slate-200 shadow-none",
66
60
  ghost: "bg-transparent text-slate-300 shadow-none"
67
61
  };
68
- var badgeVariants = cva(
62
+ var badgeVariants = _classvarianceauthority.cva.call(void 0,
69
63
  [
70
64
  "inline-flex max-w-full items-center justify-center gap-1 font-medium",
71
65
  "whitespace-nowrap ring-offset-slate-950 transition-colors",
@@ -93,7 +87,7 @@ var badgeVariants = cva(
93
87
  }
94
88
  }
95
89
  );
96
- var badgeCloseButtonVariants = cva(
90
+ var badgeCloseButtonVariants = _classvarianceauthority.cva.call(void 0,
97
91
  "inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-current opacity-70 transition hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40",
98
92
  {
99
93
  variants: {
@@ -108,7 +102,7 @@ var badgeCloseButtonVariants = cva(
108
102
  );
109
103
 
110
104
  // src/ui/badge/badge.tsx
111
- import { jsx, jsxs } from "react/jsx-runtime";
105
+ var _jsxruntime = require('react/jsx-runtime');
112
106
  function Badge(props) {
113
107
  const {
114
108
  className,
@@ -126,21 +120,21 @@ function Badge(props) {
126
120
  } = props;
127
121
  const motionProps = badgeAnimationPresets[animation];
128
122
  const isDot = shape === "dot";
129
- const resolvedAriaLabel = ariaLabel ?? (isDot ? "Status indicator" : void 0);
130
- return /* @__PURE__ */ jsxs(
131
- motion.span,
123
+ const resolvedAriaLabel = _nullishCoalesce(ariaLabel, () => ( (isDot ? "Status indicator" : void 0)));
124
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
125
+ _framermotion.motion.span,
132
126
  {
133
127
  ref,
134
128
  role: "status",
135
129
  "data-slot": "badge",
136
130
  "aria-label": resolvedAriaLabel,
137
- className: cn(badgeVariants({ appearance, size, shape }), className),
131
+ className: _chunkE5UX537Jjs.cn.call(void 0, badgeVariants({ appearance, size, shape }), className),
138
132
  initial: animation === "none" ? false : void 0,
139
133
  ...motionProps,
140
134
  ...rest,
141
135
  children: [
142
136
  !isDot ? children : null,
143
- closable ? /* @__PURE__ */ jsx(
137
+ closable ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
144
138
  "button",
145
139
  {
146
140
  type: "button",
@@ -148,7 +142,7 @@ function Badge(props) {
148
142
  "aria-label": closeLabel,
149
143
  onClick: onClose,
150
144
  className: badgeCloseButtonVariants({ size }),
151
- children: /* @__PURE__ */ jsx(HiXMark, { className: "size-3.5", "aria-hidden": true })
145
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _hi2.HiXMark, { className: "size-3.5", "aria-hidden": true })
152
146
  }
153
147
  ) : null
154
148
  ]
@@ -156,10 +150,10 @@ function Badge(props) {
156
150
  );
157
151
  }
158
152
  Badge.displayName = "Badge";
159
- export {
160
- Badge,
161
- badgeAnimationPresets,
162
- badgeCloseButtonVariants,
163
- badgeVariants
164
- };
153
+
154
+
155
+
156
+
157
+
158
+ exports.Badge = Badge; exports.badgeAnimationPresets = badgeAnimationPresets; exports.badgeCloseButtonVariants = badgeCloseButtonVariants; exports.badgeVariants = badgeVariants;
165
159
  //# sourceMappingURL=badge.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ui/badge/badge.tsx","../../src/lib/utils.ts","../../src/ui/badge/animations.ts","../../src/ui/badge/variants.ts"],"sourcesContent":["\"use client\";\n\nimport { motion } from \"framer-motion\";\nimport { HiXMark } from \"react-icons/hi2\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport { badgeAnimationPresets } from \"./animations\";\nimport type { BadgeProps } from \"./types\";\nimport { badgeCloseButtonVariants, badgeVariants } from \"./variants\";\n\nexport function Badge(props: BadgeProps) {\n const {\n className,\n appearance,\n size,\n shape,\n animation = \"none\",\n closable = false,\n onClose,\n closeLabel = \"Remove\",\n children,\n ref,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n const motionProps = badgeAnimationPresets[animation];\n const isDot = shape === \"dot\";\n const resolvedAriaLabel =\n ariaLabel ?? (isDot ? \"Status indicator\" : undefined);\n\n return (\n <motion.span\n ref={ref}\n role=\"status\"\n data-slot=\"badge\"\n aria-label={resolvedAriaLabel}\n className={cn(badgeVariants({ appearance, size, shape }), className)}\n initial={animation === \"none\" ? false : undefined}\n {...motionProps}\n {...rest}\n >\n {!isDot ? children : null}\n {closable ? (\n <button\n type=\"button\"\n data-slot=\"badge-close\"\n aria-label={closeLabel}\n onClick={onClose}\n className={badgeCloseButtonVariants({ size })}\n >\n <HiXMark className=\"size-3.5\" aria-hidden />\n </button>\n ) : null}\n </motion.span>\n );\n}\n\nBadge.displayName = \"Badge\";\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}","import type { HTMLMotionProps } from \"framer-motion\";\n\nimport type { BadgeAnimation } from \"./types\";\n\ntype BadgePresetMotionProps = Pick<\n HTMLMotionProps<\"span\">,\n \"style\" | \"transition\" | \"whileHover\" | \"whileTap\" | \"animate\" | \"initial\"\n>;\n\nexport type BadgeAnimationPresets = Record<\n BadgeAnimation,\n BadgePresetMotionProps\n>;\n\nexport const badgeAnimationPresets: BadgeAnimationPresets = {\n none: {},\n pop: {\n initial: { scale: 0.92, opacity: 0 },\n animate: { scale: 1, opacity: 1 },\n transition: { type: \"spring\", stiffness: 520, damping: 28 },\n },\n bounce: {\n whileHover: { y: -2, scale: 1.04 },\n whileTap: { scale: 0.96 },\n transition: { type: \"spring\", bounce: 0.45, stiffness: 420, damping: 18 },\n },\n fade: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\n/**\n * Tailwind class maps mirroring `buttons/variants.ts` appearance tokens.\n * Reused by primitives that should stay visually aligned with Button.\n */\nexport const buttonLikeSolidAppearances = {\n default:\n \"bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]\",\n secondary: \"bg-slate-800 text-slate-50\",\n destructive: \"bg-rose-600 text-white\",\n outline: \"border border-white/10 bg-white/5 text-slate-50\",\n ghost: \"bg-transparent text-slate-200\",\n glass: \"border border-white/15 bg-white/10 text-white backdrop-blur-md\",\n emerald: \"bg-emerald-600 text-white\",\n indigo: \"bg-indigo-600 text-white\",\n purple: \"bg-purple-600 text-white\",\n pink: \"bg-pink-600 text-white\",\n rose: \"bg-rose-600 text-white\",\n sky: \"bg-sky-600 text-white\",\n teal: \"bg-teal-600 text-white\",\n yellow: \"bg-yellow-600 text-white\",\n orange: \"bg-orange-600 text-white\",\n \"gradient-blue\":\n \"bg-gradient-to-r from-blue-600 to-purple-600 text-white\",\n \"gradient-green\":\n \"bg-gradient-to-r from-green-600 to-lime-600 text-white\",\n \"gradient-red\":\n \"bg-gradient-to-r from-red-600 to-pink-600 text-white\",\n \"gradient-yellow\":\n \"bg-gradient-to-r from-yellow-600 to-orange-600 text-white\",\n \"gradient-purple\":\n \"bg-gradient-to-r from-purple-600 to-pink-600 text-white\",\n \"gradient-teal\":\n \"bg-gradient-to-r from-teal-600 to-cyan-600 text-white\",\n \"gradient-indigo\":\n \"bg-gradient-to-r from-indigo-600 to-purple-600 text-white\",\n \"gradient-pink\":\n \"bg-gradient-to-r from-pink-600 to-rose-600 text-white\",\n \"gradient-orange\":\n \"bg-gradient-to-r from-orange-600 to-red-600 text-white\",\n} as const;\n\nexport type ButtonLikeSolidAppearance = keyof typeof buttonLikeSolidAppearances;\n\n\nconst badgeAppearances = {\n ...buttonLikeSolidAppearances,\n outline:\n \"border border-white/15 bg-transparent text-slate-200 shadow-none\",\n ghost: \"bg-transparent text-slate-300 shadow-none\",\n} as const;\n\nexport const badgeVariants = cva(\n [\n \"inline-flex max-w-full items-center justify-center gap-1 font-medium\",\n \"whitespace-nowrap ring-offset-slate-950 transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2\",\n \"select-none\",\n ],\n {\n variants: {\n appearance: badgeAppearances,\n size: {\n sm: \"h-6 min-h-6 px-2 text-[0.65rem] leading-none\",\n md: \"h-7 min-h-7 px-2.5 text-xs leading-none\",\n lg: \"h-8 min-h-8 px-3 text-sm leading-none\",\n },\n shape: {\n pill: \"rounded-full\",\n square: \"rounded-md\",\n dot: \"h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n shape: \"pill\",\n },\n },\n);\n\nexport const badgeCloseButtonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-current opacity-70 transition hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40\",\n {\n variants: {\n size: {\n sm: \"size-4\",\n md: \"size-5\",\n lg: \"size-6\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n"],"mappings":";;;;AAEA,SAAS,cAAc;AACvB,SAAS,eAAe;;;ACHxB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACSO,IAAM,wBAA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;AACJ,MAAM,GAAG;AACT,MAAM,IAAI,EAAE,QAAQ;AACpB,MAAM,WAAW,EAAE,OAAO;AAC1B,MAAM,YAAY,EAAE,iBAAiB;AACrC,MAAM,SAAS,EAAE,iCAAE,aAAc,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC;AAC1E,MAAM,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;AACpD,MAAM,GAAG,WAAW;AACpB,MAAM,GAAG,IAAI;AACb,MAAM,QAAQ,EAAE;AAChB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI;AAChC,QAAQ,SAAS,kBAAkB,6BAAG;AACtC,UAAU,QAAQ;AAClB,UAAU;AACV,YAAY,IAAI,EAAE,QAAQ;AAC1B,YAAY,WAAW,EAAE,aAAa;AACtC,YAAY,YAAY,EAAE,UAAU;AACpC,YAAY,OAAO,EAAE,OAAO;AAC5B,YAAY,SAAS,EAAE,wBAAwB,CAAC,EAAE,KAAK,CAAC,CAAC;AACzD,YAAY,QAAQ,kBAAkB,6BAAG,YAAQ,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,CAAC;AACjG,UAAU;AACV,QAAQ,EAAE,EAAE;AACZ,MAAM;AACN,IAAI;AACJ,EAAE,CAAC;AACH;AACA,KAAK,CAAC,YAAY,EAAE,OAAO;AAC3B;AACE;AACA;AACA;AACA;AACF,iLAAC","file":"/Users/shubham/Desktop/Repos/NEXT JS/zentauri-ui/packages/components/dist/ui/badge.js","sourcesContent":[null]}
@@ -1,42 +1,12 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ "use client";
19
2
 
20
- // src/ui/badge/index.ts
21
- var badge_exports = {};
22
- __export(badge_exports, {
23
- Badge: () => Badge,
24
- badgeAnimationPresets: () => badgeAnimationPresets,
25
- badgeCloseButtonVariants: () => badgeCloseButtonVariants,
26
- badgeVariants: () => badgeVariants
27
- });
28
- module.exports = __toCommonJS(badge_exports);
3
+ import {
4
+ cn
5
+ } from "../chunk-MEWYFWBX.mjs";
29
6
 
30
7
  // src/ui/badge/badge.tsx
31
- var import_framer_motion = require("framer-motion");
32
- var import_hi2 = require("react-icons/hi2");
33
-
34
- // src/lib/utils.ts
35
- var import_clsx = require("clsx");
36
- var import_tailwind_merge = require("tailwind-merge");
37
- function cn(...inputs) {
38
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
39
- }
8
+ import { motion } from "framer-motion";
9
+ import { HiXMark } from "react-icons/hi2";
40
10
 
41
11
  // src/ui/badge/animations.ts
42
12
  var badgeAnimationPresets = {
@@ -59,7 +29,7 @@ var badgeAnimationPresets = {
59
29
  };
60
30
 
61
31
  // src/ui/badge/variants.ts
62
- var import_class_variance_authority = require("class-variance-authority");
32
+ import { cva } from "class-variance-authority";
63
33
  var buttonLikeSolidAppearances = {
64
34
  default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
65
35
  secondary: "bg-slate-800 text-slate-50",
@@ -91,7 +61,7 @@ var badgeAppearances = {
91
61
  outline: "border border-white/15 bg-transparent text-slate-200 shadow-none",
92
62
  ghost: "bg-transparent text-slate-300 shadow-none"
93
63
  };
94
- var badgeVariants = (0, import_class_variance_authority.cva)(
64
+ var badgeVariants = cva(
95
65
  [
96
66
  "inline-flex max-w-full items-center justify-center gap-1 font-medium",
97
67
  "whitespace-nowrap ring-offset-slate-950 transition-colors",
@@ -119,7 +89,7 @@ var badgeVariants = (0, import_class_variance_authority.cva)(
119
89
  }
120
90
  }
121
91
  );
122
- var badgeCloseButtonVariants = (0, import_class_variance_authority.cva)(
92
+ var badgeCloseButtonVariants = cva(
123
93
  "inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-current opacity-70 transition hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40",
124
94
  {
125
95
  variants: {
@@ -134,7 +104,7 @@ var badgeCloseButtonVariants = (0, import_class_variance_authority.cva)(
134
104
  );
135
105
 
136
106
  // src/ui/badge/badge.tsx
137
- var import_jsx_runtime = require("react/jsx-runtime");
107
+ import { jsx, jsxs } from "react/jsx-runtime";
138
108
  function Badge(props) {
139
109
  const {
140
110
  className,
@@ -153,8 +123,8 @@ function Badge(props) {
153
123
  const motionProps = badgeAnimationPresets[animation];
154
124
  const isDot = shape === "dot";
155
125
  const resolvedAriaLabel = ariaLabel ?? (isDot ? "Status indicator" : void 0);
156
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
157
- import_framer_motion.motion.span,
126
+ return /* @__PURE__ */ jsxs(
127
+ motion.span,
158
128
  {
159
129
  ref,
160
130
  role: "status",
@@ -166,7 +136,7 @@ function Badge(props) {
166
136
  ...rest,
167
137
  children: [
168
138
  !isDot ? children : null,
169
- closable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
+ closable ? /* @__PURE__ */ jsx(
170
140
  "button",
171
141
  {
172
142
  type: "button",
@@ -174,7 +144,7 @@ function Badge(props) {
174
144
  "aria-label": closeLabel,
175
145
  onClick: onClose,
176
146
  className: badgeCloseButtonVariants({ size }),
177
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hi2.HiXMark, { className: "size-3.5", "aria-hidden": true })
147
+ children: /* @__PURE__ */ jsx(HiXMark, { className: "size-3.5", "aria-hidden": true })
178
148
  }
179
149
  ) : null
180
150
  ]
@@ -182,11 +152,10 @@ function Badge(props) {
182
152
  );
183
153
  }
184
154
  Badge.displayName = "Badge";
185
- // Annotate the CommonJS export names for ESM import in node:
186
- 0 && (module.exports = {
155
+ export {
187
156
  Badge,
188
157
  badgeAnimationPresets,
189
158
  badgeCloseButtonVariants,
190
159
  badgeVariants
191
- });
192
- //# sourceMappingURL=badge.cjs.map
160
+ };
161
+ //# sourceMappingURL=badge.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ui/badge/badge.tsx","../../src/ui/badge/animations.ts","../../src/ui/badge/variants.ts"],"sourcesContent":["\"use client\";\n\nimport { motion } from \"framer-motion\";\nimport { HiXMark } from \"react-icons/hi2\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport { badgeAnimationPresets } from \"./animations\";\nimport type { BadgeProps } from \"./types\";\nimport { badgeCloseButtonVariants, badgeVariants } from \"./variants\";\n\nexport function Badge(props: BadgeProps) {\n const {\n className,\n appearance,\n size,\n shape,\n animation = \"none\",\n closable = false,\n onClose,\n closeLabel = \"Remove\",\n children,\n ref,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n const motionProps = badgeAnimationPresets[animation];\n const isDot = shape === \"dot\";\n const resolvedAriaLabel =\n ariaLabel ?? (isDot ? \"Status indicator\" : undefined);\n\n return (\n <motion.span\n ref={ref}\n role=\"status\"\n data-slot=\"badge\"\n aria-label={resolvedAriaLabel}\n className={cn(badgeVariants({ appearance, size, shape }), className)}\n initial={animation === \"none\" ? false : undefined}\n {...motionProps}\n {...rest}\n >\n {!isDot ? children : null}\n {closable ? (\n <button\n type=\"button\"\n data-slot=\"badge-close\"\n aria-label={closeLabel}\n onClick={onClose}\n className={badgeCloseButtonVariants({ size })}\n >\n <HiXMark className=\"size-3.5\" aria-hidden />\n </button>\n ) : null}\n </motion.span>\n );\n}\n\nBadge.displayName = \"Badge\";\n","import type { HTMLMotionProps } from \"framer-motion\";\n\nimport type { BadgeAnimation } from \"./types\";\n\ntype BadgePresetMotionProps = Pick<\n HTMLMotionProps<\"span\">,\n \"style\" | \"transition\" | \"whileHover\" | \"whileTap\" | \"animate\" | \"initial\"\n>;\n\nexport type BadgeAnimationPresets = Record<\n BadgeAnimation,\n BadgePresetMotionProps\n>;\n\nexport const badgeAnimationPresets: BadgeAnimationPresets = {\n none: {},\n pop: {\n initial: { scale: 0.92, opacity: 0 },\n animate: { scale: 1, opacity: 1 },\n transition: { type: \"spring\", stiffness: 520, damping: 28 },\n },\n bounce: {\n whileHover: { y: -2, scale: 1.04 },\n whileTap: { scale: 0.96 },\n transition: { type: \"spring\", bounce: 0.45, stiffness: 420, damping: 18 },\n },\n fade: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\n/**\n * Tailwind class maps mirroring `buttons/variants.ts` appearance tokens.\n * Reused by primitives that should stay visually aligned with Button.\n */\nexport const buttonLikeSolidAppearances = {\n default:\n \"bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]\",\n secondary: \"bg-slate-800 text-slate-50\",\n destructive: \"bg-rose-600 text-white\",\n outline: \"border border-white/10 bg-white/5 text-slate-50\",\n ghost: \"bg-transparent text-slate-200\",\n glass: \"border border-white/15 bg-white/10 text-white backdrop-blur-md\",\n emerald: \"bg-emerald-600 text-white\",\n indigo: \"bg-indigo-600 text-white\",\n purple: \"bg-purple-600 text-white\",\n pink: \"bg-pink-600 text-white\",\n rose: \"bg-rose-600 text-white\",\n sky: \"bg-sky-600 text-white\",\n teal: \"bg-teal-600 text-white\",\n yellow: \"bg-yellow-600 text-white\",\n orange: \"bg-orange-600 text-white\",\n \"gradient-blue\":\n \"bg-gradient-to-r from-blue-600 to-purple-600 text-white\",\n \"gradient-green\":\n \"bg-gradient-to-r from-green-600 to-lime-600 text-white\",\n \"gradient-red\":\n \"bg-gradient-to-r from-red-600 to-pink-600 text-white\",\n \"gradient-yellow\":\n \"bg-gradient-to-r from-yellow-600 to-orange-600 text-white\",\n \"gradient-purple\":\n \"bg-gradient-to-r from-purple-600 to-pink-600 text-white\",\n \"gradient-teal\":\n \"bg-gradient-to-r from-teal-600 to-cyan-600 text-white\",\n \"gradient-indigo\":\n \"bg-gradient-to-r from-indigo-600 to-purple-600 text-white\",\n \"gradient-pink\":\n \"bg-gradient-to-r from-pink-600 to-rose-600 text-white\",\n \"gradient-orange\":\n \"bg-gradient-to-r from-orange-600 to-red-600 text-white\",\n} as const;\n\nexport type ButtonLikeSolidAppearance = keyof typeof buttonLikeSolidAppearances;\n\n\nconst badgeAppearances = {\n ...buttonLikeSolidAppearances,\n outline:\n \"border border-white/15 bg-transparent text-slate-200 shadow-none\",\n ghost: \"bg-transparent text-slate-300 shadow-none\",\n} as const;\n\nexport const badgeVariants = cva(\n [\n \"inline-flex max-w-full items-center justify-center gap-1 font-medium\",\n \"whitespace-nowrap ring-offset-slate-950 transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2\",\n \"select-none\",\n ],\n {\n variants: {\n appearance: badgeAppearances,\n size: {\n sm: \"h-6 min-h-6 px-2 text-[0.65rem] leading-none\",\n md: \"h-7 min-h-7 px-2.5 text-xs leading-none\",\n lg: \"h-8 min-h-8 px-3 text-sm leading-none\",\n },\n shape: {\n pill: \"rounded-full\",\n square: \"rounded-md\",\n dot: \"h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n shape: \"pill\",\n },\n },\n);\n\nexport const badgeCloseButtonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-current opacity-70 transition hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40\",\n {\n variants: {\n size: {\n sm: \"size-4\",\n md: \"size-5\",\n lg: \"size-6\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n"],"mappings":";;;;;;;AAEA,SAAS,cAAc;AACvB,SAAS,eAAe;;;ACWjB,IAAM,wBAA+C;AAAA,EAC1D,MAAM,CAAC;AAAA,EACP,KAAK;AAAA,IACH,SAAS,EAAE,OAAO,MAAM,SAAS,EAAE;AAAA,IACnC,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE;AAAA,IAChC,YAAY,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,GAAG;AAAA,EAC5D;AAAA,EACA,QAAQ;AAAA,IACN,YAAY,EAAE,GAAG,IAAI,OAAO,KAAK;AAAA,IACjC,UAAU,EAAE,OAAO,KAAK;AAAA,IACxB,YAAY,EAAE,MAAM,UAAU,QAAQ,MAAM,WAAW,KAAK,SAAS,GAAG;AAAA,EAC1E;AAAA,EACA,MAAM;AAAA,IACJ,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,YAAY,EAAE,UAAU,IAAI;AAAA,EAC9B;AACF;;;AC/BA,SAAS,WAAW;AAMb,IAAM,6BAA6B;AAAA,EACxC,SACE;AAAA,EACF,WAAW;AAAA,EACX,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,iBACE;AAAA,EACF,kBACE;AAAA,EACF,gBACE;AAAA,EACF,mBACE;AAAA,EACF,mBACE;AAAA,EACF,iBACE;AAAA,EACF,mBACE;AAAA,EACF,iBACE;AAAA,EACF,mBACE;AACJ;AAKA,IAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,SACE;AAAA,EACF,O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AAQ,WAAW;AAAA,QACpB,WACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,aAAU;AAAA,YACV,cAAY;AAAA,YACZ,SAAS;AAAA,YACT,WAAW,yBAAyB,EAAE,KAAK,CAAC;AAAA,YAE5C,8BAAC,WAAQ,WAAU,YAAW,eAAW,MAAC;AAAA;AAAA,QAC5C,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAEA,MAAM,cAAc;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { HTMLMotionProps } from 'framer-motion';
4
- import { b as buttonVariants } from '../variants-1Bx3BEeS.cjs';
4
+ import { b as buttonVariants } from '../variants-Dd9pe-ov.mjs';
5
5
  import 'class-variance-authority/types';
6
6
 
7
7
  type ButtonAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { HTMLMotionProps } from 'framer-motion';
4
- import { b as buttonVariants } from '../variants-1Bx3BEeS.js';
4
+ import { b as buttonVariants } from '../variants-Dd9pe-ov.js';
5
5
  import 'class-variance-authority/types';
6
6
 
7
7
  type ButtonAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";