@zentauri-ui/zentauri-components 0.0.84 → 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 (144) hide show
  1. package/README.md +47 -29
  2. package/dist/chunk-BZSIXBA7.js +70 -0
  3. package/dist/chunk-BZSIXBA7.js.map +1 -0
  4. package/dist/chunk-E5UX537J.js +11 -0
  5. package/dist/chunk-E5UX537J.js.map +1 -0
  6. package/dist/chunk-MEWYFWBX.mjs +14 -0
  7. package/dist/chunk-MEWYFWBX.mjs.map +1 -0
  8. package/dist/chunk-VJHD7QZH.mjs +73 -0
  9. package/dist/chunk-VJHD7QZH.mjs.map +1 -0
  10. package/dist/ui/accordion.d.mts +70 -0
  11. package/dist/ui/accordion.d.ts +70 -0
  12. package/dist/ui/accordion.js +280 -0
  13. package/dist/ui/accordion.js.map +1 -0
  14. package/dist/ui/accordion.mjs +282 -0
  15. package/dist/ui/accordion.mjs.map +1 -0
  16. package/dist/ui/alert.d.mts +66 -0
  17. package/dist/ui/alert.d.ts +66 -0
  18. package/dist/ui/alert.js +218 -0
  19. package/dist/ui/alert.js.map +1 -0
  20. package/dist/ui/alert.mjs +220 -0
  21. package/dist/ui/alert.mjs.map +1 -0
  22. package/dist/ui/badge.d.mts +37 -0
  23. package/dist/ui/badge.d.ts +37 -0
  24. package/dist/ui/badge.js +159 -0
  25. package/dist/ui/badge.js.map +1 -0
  26. package/dist/ui/badge.mjs +161 -0
  27. package/dist/ui/badge.mjs.map +1 -0
  28. package/dist/ui/buttons.d.mts +27 -0
  29. package/dist/ui/buttons.d.ts +27 -0
  30. package/dist/ui/buttons.js +107 -0
  31. package/dist/ui/buttons.js.map +1 -0
  32. package/dist/ui/buttons.mjs +109 -0
  33. package/dist/ui/buttons.mjs.map +1 -0
  34. package/dist/ui/card.d.mts +77 -0
  35. package/dist/ui/card.d.ts +77 -0
  36. package/dist/ui/card.js +252 -0
  37. package/dist/ui/card.js.map +1 -0
  38. package/dist/ui/card.mjs +254 -0
  39. package/dist/ui/card.mjs.map +1 -0
  40. package/dist/ui/divider.d.mts +39 -0
  41. package/dist/ui/divider.d.ts +39 -0
  42. package/dist/ui/divider.js +194 -0
  43. package/dist/ui/divider.js.map +1 -0
  44. package/dist/ui/divider.mjs +196 -0
  45. package/dist/ui/divider.mjs.map +1 -0
  46. package/dist/ui/drawer.d.mts +81 -0
  47. package/dist/ui/drawer.d.ts +81 -0
  48. package/dist/ui/drawer.js +377 -0
  49. package/dist/ui/drawer.js.map +1 -0
  50. package/dist/ui/drawer.mjs +379 -0
  51. package/dist/ui/drawer.mjs.map +1 -0
  52. package/dist/ui/dropdown.d.mts +50 -0
  53. package/dist/ui/dropdown.d.ts +50 -0
  54. package/dist/ui/dropdown.js +272 -0
  55. package/dist/ui/dropdown.js.map +1 -0
  56. package/dist/ui/dropdown.mjs +274 -0
  57. package/dist/ui/dropdown.mjs.map +1 -0
  58. package/dist/ui/empty-state.d.mts +55 -0
  59. package/dist/ui/empty-state.d.ts +55 -0
  60. package/dist/ui/empty-state.js +148 -0
  61. package/dist/ui/empty-state.js.map +1 -0
  62. package/dist/ui/empty-state.mjs +150 -0
  63. package/dist/ui/empty-state.mjs.map +1 -0
  64. package/dist/ui/inputs.d.mts +35 -0
  65. package/dist/ui/inputs.d.ts +35 -0
  66. package/dist/ui/inputs.js +426 -0
  67. package/dist/ui/inputs.js.map +1 -0
  68. package/dist/ui/inputs.mjs +428 -0
  69. package/dist/ui/inputs.mjs.map +1 -0
  70. package/dist/ui/modal.d.mts +84 -0
  71. package/dist/ui/modal.d.ts +84 -0
  72. package/dist/ui/modal.js +378 -0
  73. package/dist/ui/modal.js.map +1 -0
  74. package/dist/ui/modal.mjs +380 -0
  75. package/dist/ui/modal.mjs.map +1 -0
  76. package/dist/ui/pagination.d.mts +114 -0
  77. package/dist/ui/pagination.d.ts +114 -0
  78. package/dist/ui/pagination.js +425 -0
  79. package/dist/ui/pagination.js.map +1 -0
  80. package/dist/ui/pagination.mjs +427 -0
  81. package/dist/ui/pagination.mjs.map +1 -0
  82. package/dist/ui/progress.d.mts +61 -0
  83. package/dist/ui/progress.d.ts +61 -0
  84. package/dist/ui/progress.js +231 -0
  85. package/dist/ui/progress.js.map +1 -0
  86. package/dist/ui/progress.mjs +233 -0
  87. package/dist/ui/progress.mjs.map +1 -0
  88. package/dist/ui/select.d.mts +73 -0
  89. package/dist/ui/select.d.ts +73 -0
  90. package/dist/ui/select.js +321 -0
  91. package/dist/ui/select.js.map +1 -0
  92. package/dist/ui/select.mjs +323 -0
  93. package/dist/ui/select.mjs.map +1 -0
  94. package/dist/ui/skeleton.d.mts +90 -0
  95. package/dist/ui/skeleton.d.ts +90 -0
  96. package/dist/ui/skeleton.js +538 -0
  97. package/dist/ui/skeleton.js.map +1 -0
  98. package/dist/ui/skeleton.mjs +540 -0
  99. package/dist/ui/skeleton.mjs.map +1 -0
  100. package/dist/ui/spinner.d.mts +27 -0
  101. package/dist/ui/spinner.d.ts +27 -0
  102. package/dist/ui/spinner.js +187 -0
  103. package/dist/ui/spinner.js.map +1 -0
  104. package/dist/ui/spinner.mjs +189 -0
  105. package/dist/ui/spinner.mjs.map +1 -0
  106. package/dist/ui/table.d.mts +81 -0
  107. package/dist/ui/table.d.ts +81 -0
  108. package/dist/ui/table.js +287 -0
  109. package/dist/ui/table.js.map +1 -0
  110. package/dist/ui/table.mjs +289 -0
  111. package/dist/ui/table.mjs.map +1 -0
  112. package/dist/ui/tabs.d.mts +58 -0
  113. package/dist/ui/tabs.d.ts +58 -0
  114. package/dist/ui/tabs.js +268 -0
  115. package/dist/ui/tabs.js.map +1 -0
  116. package/dist/ui/tabs.mjs +270 -0
  117. package/dist/ui/tabs.mjs.map +1 -0
  118. package/dist/ui/toast.d.mts +86 -0
  119. package/dist/ui/toast.d.ts +86 -0
  120. package/dist/ui/toast.js +252 -0
  121. package/dist/ui/toast.js.map +1 -0
  122. package/dist/ui/toast.mjs +254 -0
  123. package/dist/ui/toast.mjs.map +1 -0
  124. package/dist/ui/toggle.d.mts +37 -0
  125. package/dist/ui/toggle.d.ts +37 -0
  126. package/dist/ui/toggle.js +152 -0
  127. package/dist/ui/toggle.js.map +1 -0
  128. package/dist/ui/toggle.mjs +154 -0
  129. package/dist/ui/toggle.mjs.map +1 -0
  130. package/dist/ui/tooltip.d.mts +46 -0
  131. package/dist/ui/tooltip.d.ts +46 -0
  132. package/dist/ui/tooltip.js +208 -0
  133. package/dist/ui/tooltip.js.map +1 -0
  134. package/dist/ui/tooltip.mjs +210 -0
  135. package/dist/ui/tooltip.mjs.map +1 -0
  136. package/dist/variants-Dd9pe-ov.d.mts +8 -0
  137. package/dist/variants-Dd9pe-ov.d.ts +8 -0
  138. package/package.json +15 -14
  139. package/dist/ui/index.cjs +0 -5764
  140. package/dist/ui/index.cjs.map +0 -1
  141. package/dist/ui/index.d.cts +0 -1164
  142. package/dist/ui/index.d.ts +0 -1164
  143. package/dist/ui/index.js +0 -5626
  144. package/dist/ui/index.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { HTMLMotionProps } from 'framer-motion';
4
+ import { MouseEventHandler, ReactNode } from 'react';
5
+ import * as class_variance_authority_types from 'class-variance-authority/types';
6
+
7
+ declare const badgeVariants: (props?: ({
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
+ size?: "sm" | "md" | "lg" | null | undefined;
10
+ shape?: "pill" | "square" | "dot" | null | undefined;
11
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
12
+ declare const badgeCloseButtonVariants: (props?: ({
13
+ size?: "sm" | "md" | "lg" | null | undefined;
14
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
15
+
16
+ type BadgeAnimation = "none" | "pop" | "bounce" | "fade";
17
+ type BadgeVariantProps = VariantProps<typeof badgeVariants>;
18
+ type BadgeProps = BadgeVariantProps & Omit<HTMLMotionProps<"span">, "children"> & {
19
+ animation?: BadgeAnimation;
20
+ closable?: boolean;
21
+ onClose?: MouseEventHandler<HTMLButtonElement>;
22
+ closeLabel?: string;
23
+ children?: ReactNode;
24
+ /** Dot shape hides text; set for accessibility. */
25
+ "aria-label"?: string;
26
+ };
27
+
28
+ declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
29
+ declare namespace Badge {
30
+ var displayName: string;
31
+ }
32
+
33
+ type BadgePresetMotionProps = Pick<HTMLMotionProps<"span">, "style" | "transition" | "whileHover" | "whileTap" | "animate" | "initial">;
34
+ type BadgeAnimationPresets = Record<BadgeAnimation, BadgePresetMotionProps>;
35
+ declare const badgeAnimationPresets: BadgeAnimationPresets;
36
+
37
+ export { Badge, type BadgeAnimation, type BadgeProps, badgeAnimationPresets, badgeCloseButtonVariants, badgeVariants };
@@ -0,0 +1,159 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkE5UX537Jjs = require('../chunk-E5UX537J.js');
4
+
5
+ // src/ui/badge/badge.tsx
6
+ var _framermotion = require('framer-motion');
7
+ var _hi2 = require('react-icons/hi2');
8
+
9
+ // src/ui/badge/animations.ts
10
+ var badgeAnimationPresets = {
11
+ none: {},
12
+ pop: {
13
+ initial: { scale: 0.92, opacity: 0 },
14
+ animate: { scale: 1, opacity: 1 },
15
+ transition: { type: "spring", stiffness: 520, damping: 28 }
16
+ },
17
+ bounce: {
18
+ whileHover: { y: -2, scale: 1.04 },
19
+ whileTap: { scale: 0.96 },
20
+ transition: { type: "spring", bounce: 0.45, stiffness: 420, damping: 18 }
21
+ },
22
+ fade: {
23
+ initial: { opacity: 0 },
24
+ animate: { opacity: 1 },
25
+ transition: { duration: 0.2 }
26
+ }
27
+ };
28
+
29
+ // src/ui/badge/variants.ts
30
+ var _classvarianceauthority = require('class-variance-authority');
31
+ var buttonLikeSolidAppearances = {
32
+ default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
33
+ secondary: "bg-slate-800 text-slate-50",
34
+ destructive: "bg-rose-600 text-white",
35
+ outline: "border border-white/10 bg-white/5 text-slate-50",
36
+ ghost: "bg-transparent text-slate-200",
37
+ glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md",
38
+ emerald: "bg-emerald-600 text-white",
39
+ indigo: "bg-indigo-600 text-white",
40
+ purple: "bg-purple-600 text-white",
41
+ pink: "bg-pink-600 text-white",
42
+ rose: "bg-rose-600 text-white",
43
+ sky: "bg-sky-600 text-white",
44
+ teal: "bg-teal-600 text-white",
45
+ yellow: "bg-yellow-600 text-white",
46
+ orange: "bg-orange-600 text-white",
47
+ "gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white",
48
+ "gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white",
49
+ "gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white",
50
+ "gradient-yellow": "bg-gradient-to-r from-yellow-600 to-orange-600 text-white",
51
+ "gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white",
52
+ "gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white",
53
+ "gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white",
54
+ "gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white",
55
+ "gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white"
56
+ };
57
+ var badgeAppearances = {
58
+ ...buttonLikeSolidAppearances,
59
+ outline: "border border-white/15 bg-transparent text-slate-200 shadow-none",
60
+ ghost: "bg-transparent text-slate-300 shadow-none"
61
+ };
62
+ var badgeVariants = _classvarianceauthority.cva.call(void 0,
63
+ [
64
+ "inline-flex max-w-full items-center justify-center gap-1 font-medium",
65
+ "whitespace-nowrap ring-offset-slate-950 transition-colors",
66
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
67
+ "select-none"
68
+ ],
69
+ {
70
+ variants: {
71
+ appearance: badgeAppearances,
72
+ size: {
73
+ sm: "h-6 min-h-6 px-2 text-[0.65rem] leading-none",
74
+ md: "h-7 min-h-7 px-2.5 text-xs leading-none",
75
+ lg: "h-8 min-h-8 px-3 text-sm leading-none"
76
+ },
77
+ shape: {
78
+ pill: "rounded-full",
79
+ square: "rounded-md",
80
+ dot: "h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]"
81
+ }
82
+ },
83
+ defaultVariants: {
84
+ appearance: "default",
85
+ size: "md",
86
+ shape: "pill"
87
+ }
88
+ }
89
+ );
90
+ var badgeCloseButtonVariants = _classvarianceauthority.cva.call(void 0,
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",
92
+ {
93
+ variants: {
94
+ size: {
95
+ sm: "size-4",
96
+ md: "size-5",
97
+ lg: "size-6"
98
+ }
99
+ },
100
+ defaultVariants: { size: "md" }
101
+ }
102
+ );
103
+
104
+ // src/ui/badge/badge.tsx
105
+ var _jsxruntime = require('react/jsx-runtime');
106
+ function Badge(props) {
107
+ const {
108
+ className,
109
+ appearance,
110
+ size,
111
+ shape,
112
+ animation = "none",
113
+ closable = false,
114
+ onClose,
115
+ closeLabel = "Remove",
116
+ children,
117
+ ref,
118
+ "aria-label": ariaLabel,
119
+ ...rest
120
+ } = props;
121
+ const motionProps = badgeAnimationPresets[animation];
122
+ const isDot = shape === "dot";
123
+ const resolvedAriaLabel = _nullishCoalesce(ariaLabel, () => ( (isDot ? "Status indicator" : void 0)));
124
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
125
+ _framermotion.motion.span,
126
+ {
127
+ ref,
128
+ role: "status",
129
+ "data-slot": "badge",
130
+ "aria-label": resolvedAriaLabel,
131
+ className: _chunkE5UX537Jjs.cn.call(void 0, badgeVariants({ appearance, size, shape }), className),
132
+ initial: animation === "none" ? false : void 0,
133
+ ...motionProps,
134
+ ...rest,
135
+ children: [
136
+ !isDot ? children : null,
137
+ closable ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
138
+ "button",
139
+ {
140
+ type: "button",
141
+ "data-slot": "badge-close",
142
+ "aria-label": closeLabel,
143
+ onClick: onClose,
144
+ className: badgeCloseButtonVariants({ size }),
145
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _hi2.HiXMark, { className: "size-3.5", "aria-hidden": true })
146
+ }
147
+ ) : null
148
+ ]
149
+ }
150
+ );
151
+ }
152
+ Badge.displayName = "Badge";
153
+
154
+
155
+
156
+
157
+
158
+ exports.Badge = Badge; exports.badgeAnimationPresets = badgeAnimationPresets; exports.badgeCloseButtonVariants = badgeCloseButtonVariants; exports.badgeVariants = badgeVariants;
159
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/shubham/Desktop/Repos/NEXT%20JS/zentauri-ui/packages/components/dist/ui/badge.js"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B;AACA;AACA,6CAAsC;AACtC,sCAAyC;AACzC;AACA;AACA,IAAI,sBAAsB,EAAE;AAC5B,EAAE,IAAI,EAAE,CAAC,CAAC;AACV,EAAE,GAAG,EAAE;AACP,IAAI,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;AACxC,IAAI,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;AACrC,IAAI,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,G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E,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]}
@@ -0,0 +1,161 @@
1
+ "use client";
2
+
3
+ import {
4
+ cn
5
+ } from "../chunk-MEWYFWBX.mjs";
6
+
7
+ // src/ui/badge/badge.tsx
8
+ import { motion } from "framer-motion";
9
+ import { HiXMark } from "react-icons/hi2";
10
+
11
+ // src/ui/badge/animations.ts
12
+ var badgeAnimationPresets = {
13
+ none: {},
14
+ pop: {
15
+ initial: { scale: 0.92, opacity: 0 },
16
+ animate: { scale: 1, opacity: 1 },
17
+ transition: { type: "spring", stiffness: 520, damping: 28 }
18
+ },
19
+ bounce: {
20
+ whileHover: { y: -2, scale: 1.04 },
21
+ whileTap: { scale: 0.96 },
22
+ transition: { type: "spring", bounce: 0.45, stiffness: 420, damping: 18 }
23
+ },
24
+ fade: {
25
+ initial: { opacity: 0 },
26
+ animate: { opacity: 1 },
27
+ transition: { duration: 0.2 }
28
+ }
29
+ };
30
+
31
+ // src/ui/badge/variants.ts
32
+ import { cva } from "class-variance-authority";
33
+ var buttonLikeSolidAppearances = {
34
+ default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
35
+ secondary: "bg-slate-800 text-slate-50",
36
+ destructive: "bg-rose-600 text-white",
37
+ outline: "border border-white/10 bg-white/5 text-slate-50",
38
+ ghost: "bg-transparent text-slate-200",
39
+ glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md",
40
+ emerald: "bg-emerald-600 text-white",
41
+ indigo: "bg-indigo-600 text-white",
42
+ purple: "bg-purple-600 text-white",
43
+ pink: "bg-pink-600 text-white",
44
+ rose: "bg-rose-600 text-white",
45
+ sky: "bg-sky-600 text-white",
46
+ teal: "bg-teal-600 text-white",
47
+ yellow: "bg-yellow-600 text-white",
48
+ orange: "bg-orange-600 text-white",
49
+ "gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white",
50
+ "gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white",
51
+ "gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white",
52
+ "gradient-yellow": "bg-gradient-to-r from-yellow-600 to-orange-600 text-white",
53
+ "gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white",
54
+ "gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white",
55
+ "gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white",
56
+ "gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white",
57
+ "gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white"
58
+ };
59
+ var badgeAppearances = {
60
+ ...buttonLikeSolidAppearances,
61
+ outline: "border border-white/15 bg-transparent text-slate-200 shadow-none",
62
+ ghost: "bg-transparent text-slate-300 shadow-none"
63
+ };
64
+ var badgeVariants = cva(
65
+ [
66
+ "inline-flex max-w-full items-center justify-center gap-1 font-medium",
67
+ "whitespace-nowrap ring-offset-slate-950 transition-colors",
68
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
69
+ "select-none"
70
+ ],
71
+ {
72
+ variants: {
73
+ appearance: badgeAppearances,
74
+ size: {
75
+ sm: "h-6 min-h-6 px-2 text-[0.65rem] leading-none",
76
+ md: "h-7 min-h-7 px-2.5 text-xs leading-none",
77
+ lg: "h-8 min-h-8 px-3 text-sm leading-none"
78
+ },
79
+ shape: {
80
+ pill: "rounded-full",
81
+ square: "rounded-md",
82
+ dot: "h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]"
83
+ }
84
+ },
85
+ defaultVariants: {
86
+ appearance: "default",
87
+ size: "md",
88
+ shape: "pill"
89
+ }
90
+ }
91
+ );
92
+ var badgeCloseButtonVariants = cva(
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",
94
+ {
95
+ variants: {
96
+ size: {
97
+ sm: "size-4",
98
+ md: "size-5",
99
+ lg: "size-6"
100
+ }
101
+ },
102
+ defaultVariants: { size: "md" }
103
+ }
104
+ );
105
+
106
+ // src/ui/badge/badge.tsx
107
+ import { jsx, jsxs } from "react/jsx-runtime";
108
+ function Badge(props) {
109
+ const {
110
+ className,
111
+ appearance,
112
+ size,
113
+ shape,
114
+ animation = "none",
115
+ closable = false,
116
+ onClose,
117
+ closeLabel = "Remove",
118
+ children,
119
+ ref,
120
+ "aria-label": ariaLabel,
121
+ ...rest
122
+ } = props;
123
+ const motionProps = badgeAnimationPresets[animation];
124
+ const isDot = shape === "dot";
125
+ const resolvedAriaLabel = ariaLabel ?? (isDot ? "Status indicator" : void 0);
126
+ return /* @__PURE__ */ jsxs(
127
+ motion.span,
128
+ {
129
+ ref,
130
+ role: "status",
131
+ "data-slot": "badge",
132
+ "aria-label": resolvedAriaLabel,
133
+ className: cn(badgeVariants({ appearance, size, shape }), className),
134
+ initial: animation === "none" ? false : void 0,
135
+ ...motionProps,
136
+ ...rest,
137
+ children: [
138
+ !isDot ? children : null,
139
+ closable ? /* @__PURE__ */ jsx(
140
+ "button",
141
+ {
142
+ type: "button",
143
+ "data-slot": "badge-close",
144
+ "aria-label": closeLabel,
145
+ onClick: onClose,
146
+ className: badgeCloseButtonVariants({ size }),
147
+ children: /* @__PURE__ */ jsx(HiXMark, { className: "size-3.5", "aria-hidden": true })
148
+ }
149
+ ) : null
150
+ ]
151
+ }
152
+ );
153
+ }
154
+ Badge.displayName = "Badge";
155
+ export {
156
+ Badge,
157
+ badgeAnimationPresets,
158
+ badgeCloseButtonVariants,
159
+ badgeVariants
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,M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;AAAA;AAAA,EACN;AAEJ;AAEA,MAAM,cAAc;","names":[]}
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { HTMLMotionProps } from 'framer-motion';
4
+ import { b as buttonVariants } from '../variants-Dd9pe-ov.mjs';
5
+ import 'class-variance-authority/types';
6
+
7
+ type ButtonAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
8
+ type ButtonSharedProps = VariantProps<typeof buttonVariants> & {
9
+ animation?: ButtonAnimation;
10
+ };
11
+ /** Motion props applied by presets; valid on both `motion.button` and `motion.a`. */
12
+ type ButtonPresetMotionProps = Pick<HTMLMotionProps<"button">, "style" | "transition" | "whileHover" | "whileTap">;
13
+ type ButtonProps = (ButtonSharedProps & HTMLMotionProps<"button"> & {
14
+ as?: "button";
15
+ }) | (ButtonSharedProps & HTMLMotionProps<"a"> & {
16
+ as: "link";
17
+ });
18
+ type AnimationPresets = Record<ButtonAnimation, ButtonPresetMotionProps>;
19
+
20
+ declare const Button: {
21
+ (props: ButtonProps): react_jsx_runtime.JSX.Element;
22
+ displayName: string;
23
+ };
24
+
25
+ declare const buttonAnimationPresets: AnimationPresets;
26
+
27
+ export { Button, type ButtonAnimation, type ButtonProps, buttonAnimationPresets, buttonVariants };
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { HTMLMotionProps } from 'framer-motion';
4
+ import { b as buttonVariants } from '../variants-Dd9pe-ov.js';
5
+ import 'class-variance-authority/types';
6
+
7
+ type ButtonAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
8
+ type ButtonSharedProps = VariantProps<typeof buttonVariants> & {
9
+ animation?: ButtonAnimation;
10
+ };
11
+ /** Motion props applied by presets; valid on both `motion.button` and `motion.a`. */
12
+ type ButtonPresetMotionProps = Pick<HTMLMotionProps<"button">, "style" | "transition" | "whileHover" | "whileTap">;
13
+ type ButtonProps = (ButtonSharedProps & HTMLMotionProps<"button"> & {
14
+ as?: "button";
15
+ }) | (ButtonSharedProps & HTMLMotionProps<"a"> & {
16
+ as: "link";
17
+ });
18
+ type AnimationPresets = Record<ButtonAnimation, ButtonPresetMotionProps>;
19
+
20
+ declare const Button: {
21
+ (props: ButtonProps): react_jsx_runtime.JSX.Element;
22
+ displayName: string;
23
+ };
24
+
25
+ declare const buttonAnimationPresets: AnimationPresets;
26
+
27
+ export { Button, type ButtonAnimation, type ButtonProps, buttonAnimationPresets, buttonVariants };
@@ -0,0 +1,107 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkBZSIXBA7js = require('../chunk-BZSIXBA7.js');
4
+
5
+
6
+ var _chunkE5UX537Jjs = require('../chunk-E5UX537J.js');
7
+
8
+ // src/ui/buttons/button.tsx
9
+ var _framermotion = require('framer-motion');
10
+
11
+ // src/ui/buttons/animations.ts
12
+ var buttonAnimationPresets = {
13
+ none: {},
14
+ lift: {
15
+ whileHover: { y: -2, scale: 1.02 },
16
+ whileTap: { y: 0, scale: 0.98 },
17
+ transition: { type: "spring", stiffness: 420, damping: 28 }
18
+ },
19
+ press: {
20
+ whileTap: { scale: 0.96 },
21
+ transition: { type: "spring", stiffness: 520, damping: 30 }
22
+ },
23
+ glow: {
24
+ whileHover: {
25
+ boxShadow: "0 0 0 1px rgba(255,255,255,0.25), 0 18px 42px rgba(15,23,42,0.35)",
26
+ scale: 1.01
27
+ },
28
+ whileTap: { scale: 0.98 },
29
+ transition: { duration: 0.2, ease: "easeOut" }
30
+ },
31
+ tilt: {
32
+ whileHover: { rotateX: 6, rotateY: -6, scale: 1.01 },
33
+ whileTap: { scale: 0.98, rotateX: 0, rotateY: 0 },
34
+ transition: { type: "spring", stiffness: 300, damping: 20 },
35
+ style: { transformStyle: "preserve-3d" }
36
+ },
37
+ bounce: {
38
+ whileHover: { y: -4, scale: 1.03 },
39
+ whileTap: { y: 0, scale: 0.97 },
40
+ transition: { type: "spring", bounce: 0.45, duration: 0.45 }
41
+ }
42
+ };
43
+
44
+ // src/ui/buttons/button.tsx
45
+ var _jsxruntime = require('react/jsx-runtime');
46
+ var Button = (props) => {
47
+ if (props.as === "link") {
48
+ const {
49
+ className: className2,
50
+ appearance: appearance2,
51
+ size: size2,
52
+ children: children2,
53
+ ref: ref2,
54
+ href,
55
+ target,
56
+ animation: animation2 = "none",
57
+ ...rest2
58
+ } = props;
59
+ const motionProps2 = buttonAnimationPresets[animation2];
60
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
61
+ _framermotion.motion.a,
62
+ {
63
+ ref: ref2,
64
+ href,
65
+ target,
66
+ rel: target === "_blank" ? "noopener noreferrer" : void 0,
67
+ "data-slot": "button",
68
+ className: _chunkE5UX537Jjs.cn.call(void 0, _chunkBZSIXBA7js.buttonVariants.call(void 0, { appearance: appearance2, size: size2 }), className2),
69
+ initial: false,
70
+ ...motionProps2,
71
+ ...rest2,
72
+ children: children2
73
+ }
74
+ );
75
+ }
76
+ const {
77
+ className,
78
+ appearance,
79
+ size,
80
+ type = "button",
81
+ children,
82
+ ref,
83
+ animation = "none",
84
+ ...rest
85
+ } = props;
86
+ const motionProps = buttonAnimationPresets[animation];
87
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
88
+ _framermotion.motion.button,
89
+ {
90
+ ref,
91
+ type,
92
+ "data-slot": "button",
93
+ className: _chunkE5UX537Jjs.cn.call(void 0, _chunkBZSIXBA7js.buttonVariants.call(void 0, { appearance, size }), className),
94
+ initial: false,
95
+ ...motionProps,
96
+ ...rest,
97
+ children
98
+ }
99
+ );
100
+ };
101
+ Button.displayName = "Button";
102
+
103
+
104
+
105
+
106
+ exports.Button = Button; exports.buttonAnimationPresets = buttonAnimationPresets; exports.buttonVariants = _chunkBZSIXBA7js.buttonVariants;
107
+ //# sourceMappingURL=buttons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/shubham/Des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UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC;AAC3F,QAAQ,OAAO,EAAE,KAAK;AACtB,QAAQ,GAAG,YAAY;AACvB,QAAQ,GAAG,KAAK;AAChB,QAAQ,QAAQ,EAAE;AAClB,MAAM;AACN,IAAI,CAAC;AACL,EAAE;AACF,EAAE,MAAM;AACR,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,IAAI;AACR,IAAI,KAAK,EAAE,QAAQ;AACnB,IAAI,QAAQ;AACZ,IAAI,GAAG;AACP,IAAI,UAAU,EAAE,MAAM;AACtB,IAAI,GAAG;AACP,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,MAAM,YAAY,EAAE,sBAAsB,CAAC,SAAS,CAAC;AACvD,EAAE,uBAAuB,6BAAG;AAC5B,IAAI,oBAAM,CAAC,MAAM;AACjB,IAAI;AACJ,MAAM,GAAG;AACT,MAAM,IAAI;AACV,MAAM,WAAW,EAAE,QAAQ;AAC3B,MAAM,SAAS,EAAE,iCAAE,6CAAe,EAAG,UAAU,EAAE,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC;AACpE,MAAM,OAAO,EAAE,KAAK;AACpB,MAAM,GAAG,WAAW;AACpB,MAAM,GAAG,IAAI;AACb,MAAM;AACN,IAAI;AACJ,EAAE,CAAC;AACH,CAAC;AACD,MAAM,CAAC,YAAY,EAAE,QAAQ;AAC7B;AACE;AACA;AACA;AACF,2IAAC","file":"/Users/shubham/Desktop/Repos/NEXT JS/zentauri-ui/packages/components/dist/ui/buttons.js","sourcesContent":[null]}
@@ -0,0 +1,109 @@
1
+ "use client";
2
+
3
+ import {
4
+ buttonVariants
5
+ } from "../chunk-VJHD7QZH.mjs";
6
+ import {
7
+ cn
8
+ } from "../chunk-MEWYFWBX.mjs";
9
+
10
+ // src/ui/buttons/button.tsx
11
+ import { motion } from "framer-motion";
12
+
13
+ // src/ui/buttons/animations.ts
14
+ var buttonAnimationPresets = {
15
+ none: {},
16
+ lift: {
17
+ whileHover: { y: -2, scale: 1.02 },
18
+ whileTap: { y: 0, scale: 0.98 },
19
+ transition: { type: "spring", stiffness: 420, damping: 28 }
20
+ },
21
+ press: {
22
+ whileTap: { scale: 0.96 },
23
+ transition: { type: "spring", stiffness: 520, damping: 30 }
24
+ },
25
+ glow: {
26
+ whileHover: {
27
+ boxShadow: "0 0 0 1px rgba(255,255,255,0.25), 0 18px 42px rgba(15,23,42,0.35)",
28
+ scale: 1.01
29
+ },
30
+ whileTap: { scale: 0.98 },
31
+ transition: { duration: 0.2, ease: "easeOut" }
32
+ },
33
+ tilt: {
34
+ whileHover: { rotateX: 6, rotateY: -6, scale: 1.01 },
35
+ whileTap: { scale: 0.98, rotateX: 0, rotateY: 0 },
36
+ transition: { type: "spring", stiffness: 300, damping: 20 },
37
+ style: { transformStyle: "preserve-3d" }
38
+ },
39
+ bounce: {
40
+ whileHover: { y: -4, scale: 1.03 },
41
+ whileTap: { y: 0, scale: 0.97 },
42
+ transition: { type: "spring", bounce: 0.45, duration: 0.45 }
43
+ }
44
+ };
45
+
46
+ // src/ui/buttons/button.tsx
47
+ import { jsx } from "react/jsx-runtime";
48
+ var Button = (props) => {
49
+ if (props.as === "link") {
50
+ const {
51
+ className: className2,
52
+ appearance: appearance2,
53
+ size: size2,
54
+ children: children2,
55
+ ref: ref2,
56
+ href,
57
+ target,
58
+ animation: animation2 = "none",
59
+ ...rest2
60
+ } = props;
61
+ const motionProps2 = buttonAnimationPresets[animation2];
62
+ return /* @__PURE__ */ jsx(
63
+ motion.a,
64
+ {
65
+ ref: ref2,
66
+ href,
67
+ target,
68
+ rel: target === "_blank" ? "noopener noreferrer" : void 0,
69
+ "data-slot": "button",
70
+ className: cn(buttonVariants({ appearance: appearance2, size: size2 }), className2),
71
+ initial: false,
72
+ ...motionProps2,
73
+ ...rest2,
74
+ children: children2
75
+ }
76
+ );
77
+ }
78
+ const {
79
+ className,
80
+ appearance,
81
+ size,
82
+ type = "button",
83
+ children,
84
+ ref,
85
+ animation = "none",
86
+ ...rest
87
+ } = props;
88
+ const motionProps = buttonAnimationPresets[animation];
89
+ return /* @__PURE__ */ jsx(
90
+ motion.button,
91
+ {
92
+ ref,
93
+ type,
94
+ "data-slot": "button",
95
+ className: cn(buttonVariants({ appearance, size }), className),
96
+ initial: false,
97
+ ...motionProps,
98
+ ...rest,
99
+ children
100
+ }
101
+ );
102
+ };
103
+ Button.displayName = "Button";
104
+ export {
105
+ Button,
106
+ buttonAnimationPresets,
107
+ buttonVariants
108
+ };
109
+ //# sourceMappingURL=buttons.mjs.map