@huahaharis/ui 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,416 @@
1
+ 'use strict';
2
+
3
+ var React2 = require('react');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var clsx = require('clsx');
7
+ var tailwindMerge = require('tailwind-merge');
8
+ var AccordionPrimitive = require('@radix-ui/react-accordion');
9
+ var lucideReact = require('lucide-react');
10
+ var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n.default = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
31
+ var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
32
+ var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
33
+
34
+ // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.8_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs
35
+ function setRef(ref, value) {
36
+ if (typeof ref === "function") {
37
+ return ref(value);
38
+ } else if (ref !== null && ref !== void 0) {
39
+ ref.current = value;
40
+ }
41
+ }
42
+ function composeRefs(...refs) {
43
+ return (node) => {
44
+ let hasCleanup = false;
45
+ const cleanups = refs.map((ref) => {
46
+ const cleanup = setRef(ref, node);
47
+ if (!hasCleanup && typeof cleanup == "function") {
48
+ hasCleanup = true;
49
+ }
50
+ return cleanup;
51
+ });
52
+ if (hasCleanup) {
53
+ return () => {
54
+ for (let i = 0; i < cleanups.length; i++) {
55
+ const cleanup = cleanups[i];
56
+ if (typeof cleanup == "function") {
57
+ cleanup();
58
+ } else {
59
+ setRef(refs[i], null);
60
+ }
61
+ }
62
+ };
63
+ }
64
+ };
65
+ }
66
+ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
67
+ var use = React2__namespace[" use ".trim().toString()];
68
+ function isPromiseLike(value) {
69
+ return typeof value === "object" && value !== null && "then" in value;
70
+ }
71
+ function isLazyComponent(element) {
72
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
73
+ }
74
+ // @__NO_SIDE_EFFECTS__
75
+ function createSlot(ownerName) {
76
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
77
+ const Slot2 = React2__namespace.forwardRef((props, forwardedRef) => {
78
+ let { children, ...slotProps } = props;
79
+ if (isLazyComponent(children) && typeof use === "function") {
80
+ children = use(children._payload);
81
+ }
82
+ const childrenArray = React2__namespace.Children.toArray(children);
83
+ const slottable = childrenArray.find(isSlottable);
84
+ if (slottable) {
85
+ const newElement = slottable.props.children;
86
+ const newChildren = childrenArray.map((child) => {
87
+ if (child === slottable) {
88
+ if (React2__namespace.Children.count(newElement) > 1) return React2__namespace.Children.only(null);
89
+ return React2__namespace.isValidElement(newElement) ? newElement.props.children : null;
90
+ } else {
91
+ return child;
92
+ }
93
+ });
94
+ return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React2__namespace.isValidElement(newElement) ? React2__namespace.cloneElement(newElement, void 0, newChildren) : null });
95
+ }
96
+ return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
97
+ });
98
+ Slot2.displayName = `${ownerName}.Slot`;
99
+ return Slot2;
100
+ }
101
+ var Slot = /* @__PURE__ */ createSlot("Slot");
102
+ // @__NO_SIDE_EFFECTS__
103
+ function createSlotClone(ownerName) {
104
+ const SlotClone = React2__namespace.forwardRef((props, forwardedRef) => {
105
+ let { children, ...slotProps } = props;
106
+ if (isLazyComponent(children) && typeof use === "function") {
107
+ children = use(children._payload);
108
+ }
109
+ if (React2__namespace.isValidElement(children)) {
110
+ const childrenRef = getElementRef(children);
111
+ const props2 = mergeProps(slotProps, children.props);
112
+ if (children.type !== React2__namespace.Fragment) {
113
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
114
+ }
115
+ return React2__namespace.cloneElement(children, props2);
116
+ }
117
+ return React2__namespace.Children.count(children) > 1 ? React2__namespace.Children.only(null) : null;
118
+ });
119
+ SlotClone.displayName = `${ownerName}.SlotClone`;
120
+ return SlotClone;
121
+ }
122
+ var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
123
+ function isSlottable(child) {
124
+ return React2__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
125
+ }
126
+ function mergeProps(slotProps, childProps) {
127
+ const overrideProps = { ...childProps };
128
+ for (const propName in childProps) {
129
+ const slotPropValue = slotProps[propName];
130
+ const childPropValue = childProps[propName];
131
+ const isHandler = /^on[A-Z]/.test(propName);
132
+ if (isHandler) {
133
+ if (slotPropValue && childPropValue) {
134
+ overrideProps[propName] = (...args) => {
135
+ const result = childPropValue(...args);
136
+ slotPropValue(...args);
137
+ return result;
138
+ };
139
+ } else if (slotPropValue) {
140
+ overrideProps[propName] = slotPropValue;
141
+ }
142
+ } else if (propName === "style") {
143
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
144
+ } else if (propName === "className") {
145
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
146
+ }
147
+ }
148
+ return { ...slotProps, ...overrideProps };
149
+ }
150
+ function getElementRef(element) {
151
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
152
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
153
+ if (mayWarn) {
154
+ return element.ref;
155
+ }
156
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
157
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
158
+ if (mayWarn) {
159
+ return element.props.ref;
160
+ }
161
+ return element.props.ref || element.ref;
162
+ }
163
+ function cn(...inputs) {
164
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
165
+ }
166
+ var buttonVariants = classVarianceAuthority.cva(
167
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
168
+ {
169
+ variants: {
170
+ variant: {
171
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
172
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
173
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
174
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
175
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
176
+ link: "text-primary underline-offset-4 hover:underline"
177
+ },
178
+ size: {
179
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
180
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
181
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
182
+ icon: "size-9",
183
+ "icon-sm": "size-8",
184
+ "icon-lg": "size-10"
185
+ }
186
+ },
187
+ defaultVariants: {
188
+ variant: "default",
189
+ size: "default"
190
+ }
191
+ }
192
+ );
193
+ function Button({
194
+ className,
195
+ variant,
196
+ size,
197
+ asChild = false,
198
+ ...props
199
+ }) {
200
+ const Comp = asChild ? Slot : "button";
201
+ return /* @__PURE__ */ jsxRuntime.jsx(
202
+ Comp,
203
+ {
204
+ "data-slot": "button",
205
+ className: cn(buttonVariants({ variant, size, className })),
206
+ ...props
207
+ }
208
+ );
209
+ }
210
+ function Accordion({
211
+ ...props
212
+ }) {
213
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
214
+ }
215
+ function AccordionItem({
216
+ className,
217
+ ...props
218
+ }) {
219
+ return /* @__PURE__ */ jsxRuntime.jsx(
220
+ AccordionPrimitive__namespace.Item,
221
+ {
222
+ "data-slot": "accordion-item",
223
+ className: cn("border-b last:border-b-0", className),
224
+ ...props
225
+ }
226
+ );
227
+ }
228
+ function AccordionTrigger({
229
+ className,
230
+ children,
231
+ ...props
232
+ }) {
233
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
234
+ AccordionPrimitive__namespace.Trigger,
235
+ {
236
+ "data-slot": "accordion-trigger",
237
+ className: cn(
238
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
239
+ className
240
+ ),
241
+ ...props,
242
+ children: [
243
+ children,
244
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
245
+ ]
246
+ }
247
+ ) });
248
+ }
249
+ function AccordionContent({
250
+ className,
251
+ children,
252
+ ...props
253
+ }) {
254
+ return /* @__PURE__ */ jsxRuntime.jsx(
255
+ AccordionPrimitive__namespace.Content,
256
+ {
257
+ "data-slot": "accordion-content",
258
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
259
+ ...props,
260
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pt-0 pb-4", className), children })
261
+ }
262
+ );
263
+ }
264
+ function AlertDialog({
265
+ ...props
266
+ }) {
267
+ return /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Root, { "data-slot": "alert-dialog", ...props });
268
+ }
269
+ function AlertDialogTrigger({
270
+ ...props
271
+ }) {
272
+ return /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
273
+ }
274
+ function AlertDialogPortal({
275
+ ...props
276
+ }) {
277
+ return /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Portal, { "data-slot": "alert-dialog-portal", ...props });
278
+ }
279
+ function AlertDialogOverlay({
280
+ className,
281
+ ...props
282
+ }) {
283
+ return /* @__PURE__ */ jsxRuntime.jsx(
284
+ AlertDialogPrimitive__namespace.Overlay,
285
+ {
286
+ "data-slot": "alert-dialog-overlay",
287
+ className: cn(
288
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
289
+ className
290
+ ),
291
+ ...props
292
+ }
293
+ );
294
+ }
295
+ function AlertDialogContent({
296
+ className,
297
+ ...props
298
+ }) {
299
+ return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
300
+ /* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
301
+ /* @__PURE__ */ jsxRuntime.jsx(
302
+ AlertDialogPrimitive__namespace.Content,
303
+ {
304
+ "data-slot": "alert-dialog-content",
305
+ className: cn(
306
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
307
+ className
308
+ ),
309
+ ...props
310
+ }
311
+ )
312
+ ] });
313
+ }
314
+ function AlertDialogHeader({
315
+ className,
316
+ ...props
317
+ }) {
318
+ return /* @__PURE__ */ jsxRuntime.jsx(
319
+ "div",
320
+ {
321
+ "data-slot": "alert-dialog-header",
322
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
323
+ ...props
324
+ }
325
+ );
326
+ }
327
+ function AlertDialogFooter({
328
+ className,
329
+ ...props
330
+ }) {
331
+ return /* @__PURE__ */ jsxRuntime.jsx(
332
+ "div",
333
+ {
334
+ "data-slot": "alert-dialog-footer",
335
+ className: cn(
336
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
337
+ className
338
+ ),
339
+ ...props
340
+ }
341
+ );
342
+ }
343
+ function AlertDialogTitle({
344
+ className,
345
+ ...props
346
+ }) {
347
+ return /* @__PURE__ */ jsxRuntime.jsx(
348
+ AlertDialogPrimitive__namespace.Title,
349
+ {
350
+ "data-slot": "alert-dialog-title",
351
+ className: cn("text-lg font-semibold", className),
352
+ ...props
353
+ }
354
+ );
355
+ }
356
+ function AlertDialogDescription({
357
+ className,
358
+ ...props
359
+ }) {
360
+ return /* @__PURE__ */ jsxRuntime.jsx(
361
+ AlertDialogPrimitive__namespace.Description,
362
+ {
363
+ "data-slot": "alert-dialog-description",
364
+ className: cn("text-muted-foreground text-sm", className),
365
+ ...props
366
+ }
367
+ );
368
+ }
369
+ function AlertDialogAction({
370
+ className,
371
+ ...props
372
+ }) {
373
+ return /* @__PURE__ */ jsxRuntime.jsx(
374
+ AlertDialogPrimitive__namespace.Action,
375
+ {
376
+ className: cn(buttonVariants(), className),
377
+ ...props
378
+ }
379
+ );
380
+ }
381
+ function AlertDialogCancel({
382
+ className,
383
+ ...props
384
+ }) {
385
+ return /* @__PURE__ */ jsxRuntime.jsx(
386
+ AlertDialogPrimitive__namespace.Cancel,
387
+ {
388
+ className: cn(buttonVariants({ variant: "outline" }), className),
389
+ ...props
390
+ }
391
+ );
392
+ }
393
+ function cn2(...inputs) {
394
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
395
+ }
396
+
397
+ exports.Accordion = Accordion;
398
+ exports.AccordionContent = AccordionContent;
399
+ exports.AccordionItem = AccordionItem;
400
+ exports.AccordionTrigger = AccordionTrigger;
401
+ exports.AlertDialog = AlertDialog;
402
+ exports.AlertDialogAction = AlertDialogAction;
403
+ exports.AlertDialogCancel = AlertDialogCancel;
404
+ exports.AlertDialogContent = AlertDialogContent;
405
+ exports.AlertDialogDescription = AlertDialogDescription;
406
+ exports.AlertDialogFooter = AlertDialogFooter;
407
+ exports.AlertDialogHeader = AlertDialogHeader;
408
+ exports.AlertDialogOverlay = AlertDialogOverlay;
409
+ exports.AlertDialogPortal = AlertDialogPortal;
410
+ exports.AlertDialogTitle = AlertDialogTitle;
411
+ exports.AlertDialogTrigger = AlertDialogTrigger;
412
+ exports.Button = Button;
413
+ exports.buttonVariants = buttonVariants;
414
+ exports.cn = cn2;
415
+ //# sourceMappingURL=index.cjs.map
416
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.8_react@19.2.3/node_modules/@radix-ui/react-compose-refs/src/compose-refs.tsx","../../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.8_react@19.2.3/node_modules/@radix-ui/react-slot/src/slot.tsx","../../../src/lib/utils.ts","../../../src/components/ui/button.tsx","../../../src/components/ui/accordion.tsx","../../../src/components/ui/alert-dialog.tsx","../src/lib/utils.ts"],"names":["React","Slot","React2","jsx","props","twMerge","clsx","cva","AccordionPrimitive","jsxs","ChevronDownIcon","AlertDialogPrimitive","cn"],"mappings":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C3D,EAAA,uBACER,cAAAA;AAAA,IAAsBQ,+BAAA,CAAA,MAAA;AAAA,IAArB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,cAAA,EAAe,EAAG,SAAS,CAAA;AAAA,MACxC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,iBAAA,CAAkB;AAAA,EACzB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA6D;AAC3D,EAAA,uBACER,cAAAA;AAAA,IAAsBQ,+BAAA,CAAA,MAAA;AAAA,IAArB;AAAA,MACC,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,SAAA,EAAW,GAAG,SAAS,CAAA;AAAA,MAC9D,GAAG;AAAA;AAAA,GACN;AAEJ;AC3IO,SAASC,OAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOP,qBAAAA,CAAQC,SAAAA,CAAK,MAAM,CAAC,CAAA;AAC7B","file":"index.cjs","sourcesContent":["import * as React from 'react';\n\ntype PossibleRef<T> = React.Ref<T> | undefined;\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef<T>(ref: PossibleRef<T>, value: T) {\n if (typeof ref === 'function') {\n return ref(value);\n } else if (ref !== null && ref !== undefined) {\n ref.current = value;\n }\n}\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == 'function') {\n hasCleanup = true;\n }\n return cleanup;\n });\n\n // React <19 will log an error to the console if a callback ref returns a\n // value. We don't use ref cleanups internally so this will only happen if a\n // user's ref callback returns a value, which we only expect if they are\n // using the cleanup functionality added in React 19.\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == 'function') {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs);\n}\n\nexport { composeRefs, useComposedRefs };\n","import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\ndeclare module 'react' {\n interface ReactElement {\n $$typeof?: symbol | string;\n }\n}\n\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\n\ninterface LazyReactElement extends React.ReactElement {\n $$typeof: typeof REACT_LAZY_TYPE;\n _payload: PromiseLike<Exclude<React.ReactNode, PromiseLike<any>>>;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type Usable<T> = PromiseLike<T> | React.Context<T>;\nconst use: typeof React.use | undefined = (React as any)[' use '.trim().toString()];\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\nfunction isPromiseLike(value: unknown): value is PromiseLike<unknown> {\n return typeof value === 'object' && value !== null && 'then' in value;\n}\n\nfunction isLazyComponent(element: React.ReactNode): element is LazyReactElement {\n return (\n element != null &&\n typeof element === 'object' &&\n '$$typeof' in element &&\n element.$$typeof === REACT_LAZY_TYPE &&\n '_payload' in element &&\n isPromiseLike(element._payload)\n );\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === 'function') {\n children = use(children._payload);\n }\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === 'function') {\n children = use(children._payload);\n }\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC<SlottableProps> {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children}</>;\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode,\n): child is React.ReactElement<SlottableProps, typeof Slottable> {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref<unknown> }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref<unknown> }).ref || (element as any).ref;\n}\n\nexport {\n Slot,\n Slottable,\n //\n Slot as Root,\n};\nexport type { SlotProps };\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../../lib/utils'\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n 'icon-sm': 'size-8',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n)\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","'use client'\n\nimport * as React from 'react'\nimport * as AccordionPrimitive from '@radix-ui/react-accordion'\nimport { ChevronDownIcon } from 'lucide-react'\n\nimport { cn } from '../../lib/utils'\n\nfunction Accordion({\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn('border-b last:border-b-0', className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm\"\n {...props}\n >\n <div className={cn('pt-0 pb-4', className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n","'use client'\n\nimport * as React from 'react'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\n\nimport { cn } from '../../lib/utils'\nimport { buttonVariants } from './button'\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants(), className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant: 'outline' }), className)}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"]}