@appolabs/ui 0.1.22 → 0.1.25

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 CHANGED
@@ -7,8 +7,8 @@ var AccordionPrimitive = require('@radix-ui/react-accordion');
7
7
  var lucideReact = require('lucide-react');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
  var classVarianceAuthority = require('class-variance-authority');
10
- var reactSlot = require('@radix-ui/react-slot');
11
10
  var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
11
+ var reactSlot = require('@radix-ui/react-slot');
12
12
  var AspectRatioPrimitive = require('@radix-ui/react-aspect-ratio');
13
13
  var AvatarPrimitive = require('@radix-ui/react-avatar');
14
14
  var reactDayPicker = require('react-day-picker');
@@ -304,8 +304,63 @@ var AlertDescription = React40__namespace.forwardRef(({ className, ...props }, r
304
304
  }
305
305
  ));
306
306
  AlertDescription.displayName = "AlertDescription";
307
+ function CookieBanner({
308
+ visible,
309
+ cookiePolicyUrl,
310
+ onAccept,
311
+ onReject,
312
+ onManage,
313
+ className
314
+ }) {
315
+ if (!visible) return null;
316
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("fixed bottom-0 left-0 right-0 z-50 sm:py-4 sm:px-4 md:px-6 lg:px-8", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:max-w-7xl sm:mx-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border border-white/10 bg-zinc-800/95 backdrop-blur-md flex flex-col gap-4 px-4 py-3 sm:rounded-xl sm:flex-row sm:items-center sm:justify-between", children: [
317
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-white/60", children: [
318
+ "Utilizziamo i cookie per migliorare la tua esperienza.",
319
+ " ",
320
+ /* @__PURE__ */ jsxRuntime.jsx(
321
+ "a",
322
+ {
323
+ href: cookiePolicyUrl,
324
+ className: "text-white underline underline-offset-2 hover:no-underline",
325
+ target: "_blank",
326
+ rel: "noreferrer",
327
+ children: "Cookie policy"
328
+ }
329
+ )
330
+ ] }),
331
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2 self-end sm:self-auto", children: [
332
+ onManage && /* @__PURE__ */ jsxRuntime.jsx(
333
+ "button",
334
+ {
335
+ type: "button",
336
+ onClick: onManage,
337
+ className: "h-9 cursor-pointer rounded-md px-3 text-sm text-white/60 transition-colors hover:underline",
338
+ children: "Gestisci"
339
+ }
340
+ ),
341
+ /* @__PURE__ */ jsxRuntime.jsx(
342
+ "button",
343
+ {
344
+ type: "button",
345
+ onClick: onReject,
346
+ className: "h-9 cursor-pointer rounded-xl border border-white/20 px-3 text-sm text-white/70 transition-colors hover:bg-white/10",
347
+ children: "Rifiuta"
348
+ }
349
+ ),
350
+ /* @__PURE__ */ jsxRuntime.jsx(
351
+ "button",
352
+ {
353
+ type: "button",
354
+ onClick: onAccept,
355
+ className: "h-9 cursor-pointer rounded-xl bg-gradient-to-r from-[#8a9eff] to-[#5e77cc] px-3 text-sm font-medium text-white transition-all hover:from-[#7a8eef] hover:to-[#4e67bc]",
356
+ children: "Accetta tutto"
357
+ }
358
+ )
359
+ ] })
360
+ ] }) }) });
361
+ }
307
362
  var buttonVariants = classVarianceAuthority.cva(
308
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-base font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
363
+ "inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
309
364
  {
310
365
  variants: {
311
366
  variant: {
@@ -317,10 +372,10 @@ var buttonVariants = classVarianceAuthority.cva(
317
372
  link: "text-primary underline-offset-4 hover:underline"
318
373
  },
319
374
  size: {
320
- default: "h-10 px-4 py-2",
321
- sm: "h-9 rounded-md px-3",
322
- lg: "h-11 rounded-md px-8",
323
- icon: "h-10 w-10"
375
+ default: "h-9 px-4 py-2",
376
+ sm: "h-8 rounded-md px-3 text-xs",
377
+ lg: "h-10 rounded-md px-8",
378
+ icon: "h-9 w-9"
324
379
  }
325
380
  },
326
381
  defaultVariants: {
@@ -345,37 +400,6 @@ var Button = React40__namespace.forwardRef(
345
400
  }
346
401
  );
347
402
  Button.displayName = "Button";
348
- function CookieBanner({
349
- visible,
350
- cookiePolicyUrl,
351
- onAccept,
352
- onReject,
353
- onManage,
354
- className
355
- }) {
356
- if (!visible) return null;
357
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("fixed bottom-0 left-0 right-0 z-50 sm:p-4", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border border-border bg-card/95 backdrop-blur-sm flex flex-col gap-4 px-4 py-4 sm:rounded-xl sm:flex-row sm:items-center sm:justify-between", children: [
358
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
359
- "Utilizziamo i cookie per migliorare la tua esperienza.",
360
- " ",
361
- /* @__PURE__ */ jsxRuntime.jsx(
362
- "a",
363
- {
364
- href: cookiePolicyUrl,
365
- className: "text-foreground underline underline-offset-2 hover:no-underline",
366
- target: "_blank",
367
- rel: "noreferrer",
368
- children: "Cookie policy"
369
- }
370
- )
371
- ] }),
372
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2 self-end sm:self-auto", children: [
373
- onManage && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: onManage, className: "hover:bg-transparent hover:underline", children: "Gestisci" }),
374
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: onReject, children: "Rifiuta" }),
375
- /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: onAccept, children: "Accetta tutto" })
376
- ] })
377
- ] }) });
378
- }
379
403
  var AlertDialog = AlertDialogPrimitive__namespace.Root;
380
404
  var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
381
405
  var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;