@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.d.cts CHANGED
@@ -98,6 +98,15 @@ interface CookieBannerProps {
98
98
  onManage?: () => void;
99
99
  className?: string;
100
100
  }
101
+ /**
102
+ * Brand-fixed cookie consent banner. Hardcoded zinc-800/95 card + gradient
103
+ * accept button — intentionally NOT theme-aware. Cookie banners are a
104
+ * cross-product brand element; consistency across apps-web-app and the
105
+ * marketing website matters more than per-app theming.
106
+ *
107
+ * If you need a different visual for a future product, do not add a variant
108
+ * prop to this component — duplicate it under a different name.
109
+ */
101
110
  declare function CookieBanner({ visible, cookiePolicyUrl, onAccept, onReject, onManage, className, }: CookieBannerProps): react_jsx_runtime.JSX.Element | null;
102
111
 
103
112
  declare const AlertDialog: React$1.FC<AlertDialogPrimitive.AlertDialogProps>;
package/dist/index.d.ts CHANGED
@@ -98,6 +98,15 @@ interface CookieBannerProps {
98
98
  onManage?: () => void;
99
99
  className?: string;
100
100
  }
101
+ /**
102
+ * Brand-fixed cookie consent banner. Hardcoded zinc-800/95 card + gradient
103
+ * accept button — intentionally NOT theme-aware. Cookie banners are a
104
+ * cross-product brand element; consistency across apps-web-app and the
105
+ * marketing website matters more than per-app theming.
106
+ *
107
+ * If you need a different visual for a future product, do not add a variant
108
+ * prop to this component — duplicate it under a different name.
109
+ */
101
110
  declare function CookieBanner({ visible, cookiePolicyUrl, onAccept, onReject, onManage, className, }: CookieBannerProps): react_jsx_runtime.JSX.Element | null;
102
111
 
103
112
  declare const AlertDialog: React$1.FC<AlertDialogPrimitive.AlertDialogProps>;
package/dist/index.js CHANGED
@@ -6,8 +6,8 @@ import * as AccordionPrimitive from '@radix-ui/react-accordion';
6
6
  import { ChevronDown, X, ArrowLeft, ArrowRight, Check, Search, ChevronRight, Circle, Dot, ChevronUp, PanelLeft, MoreHorizontal, ChevronLeft, GripVertical } from 'lucide-react';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { cva } from 'class-variance-authority';
9
- import { Slot } from '@radix-ui/react-slot';
10
9
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
10
+ import { Slot } from '@radix-ui/react-slot';
11
11
  import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
12
12
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
13
13
  import { DayPicker } from 'react-day-picker';
@@ -252,8 +252,63 @@ var AlertDescription = React40.forwardRef(({ className, ...props }, ref) => /* @
252
252
  }
253
253
  ));
254
254
  AlertDescription.displayName = "AlertDescription";
255
+ function CookieBanner({
256
+ visible,
257
+ cookiePolicyUrl,
258
+ onAccept,
259
+ onReject,
260
+ onManage,
261
+ className
262
+ }) {
263
+ if (!visible) return null;
264
+ return /* @__PURE__ */ 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__ */ jsx("div", { className: "sm:max-w-7xl sm:mx-auto", children: /* @__PURE__ */ 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: [
265
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-white/60", children: [
266
+ "Utilizziamo i cookie per migliorare la tua esperienza.",
267
+ " ",
268
+ /* @__PURE__ */ jsx(
269
+ "a",
270
+ {
271
+ href: cookiePolicyUrl,
272
+ className: "text-white underline underline-offset-2 hover:no-underline",
273
+ target: "_blank",
274
+ rel: "noreferrer",
275
+ children: "Cookie policy"
276
+ }
277
+ )
278
+ ] }),
279
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 self-end sm:self-auto", children: [
280
+ onManage && /* @__PURE__ */ jsx(
281
+ "button",
282
+ {
283
+ type: "button",
284
+ onClick: onManage,
285
+ className: "h-9 cursor-pointer rounded-md px-3 text-sm text-white/60 transition-colors hover:underline",
286
+ children: "Gestisci"
287
+ }
288
+ ),
289
+ /* @__PURE__ */ jsx(
290
+ "button",
291
+ {
292
+ type: "button",
293
+ onClick: onReject,
294
+ className: "h-9 cursor-pointer rounded-xl border border-white/20 px-3 text-sm text-white/70 transition-colors hover:bg-white/10",
295
+ children: "Rifiuta"
296
+ }
297
+ ),
298
+ /* @__PURE__ */ jsx(
299
+ "button",
300
+ {
301
+ type: "button",
302
+ onClick: onAccept,
303
+ 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]",
304
+ children: "Accetta tutto"
305
+ }
306
+ )
307
+ ] })
308
+ ] }) }) });
309
+ }
255
310
  var buttonVariants = cva(
256
- "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",
311
+ "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",
257
312
  {
258
313
  variants: {
259
314
  variant: {
@@ -265,10 +320,10 @@ var buttonVariants = cva(
265
320
  link: "text-primary underline-offset-4 hover:underline"
266
321
  },
267
322
  size: {
268
- default: "h-10 px-4 py-2",
269
- sm: "h-9 rounded-md px-3",
270
- lg: "h-11 rounded-md px-8",
271
- icon: "h-10 w-10"
323
+ default: "h-9 px-4 py-2",
324
+ sm: "h-8 rounded-md px-3 text-xs",
325
+ lg: "h-10 rounded-md px-8",
326
+ icon: "h-9 w-9"
272
327
  }
273
328
  },
274
329
  defaultVariants: {
@@ -293,37 +348,6 @@ var Button = React40.forwardRef(
293
348
  }
294
349
  );
295
350
  Button.displayName = "Button";
296
- function CookieBanner({
297
- visible,
298
- cookiePolicyUrl,
299
- onAccept,
300
- onReject,
301
- onManage,
302
- className
303
- }) {
304
- if (!visible) return null;
305
- return /* @__PURE__ */ jsx("div", { className: cn("fixed bottom-0 left-0 right-0 z-50 sm:p-4", className), children: /* @__PURE__ */ 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: [
306
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
307
- "Utilizziamo i cookie per migliorare la tua esperienza.",
308
- " ",
309
- /* @__PURE__ */ jsx(
310
- "a",
311
- {
312
- href: cookiePolicyUrl,
313
- className: "text-foreground underline underline-offset-2 hover:no-underline",
314
- target: "_blank",
315
- rel: "noreferrer",
316
- children: "Cookie policy"
317
- }
318
- )
319
- ] }),
320
- /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 self-end sm:self-auto", children: [
321
- onManage && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onManage, className: "hover:bg-transparent hover:underline", children: "Gestisci" }),
322
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: onReject, children: "Rifiuta" }),
323
- /* @__PURE__ */ jsx(Button, { size: "sm", onClick: onAccept, children: "Accetta tutto" })
324
- ] })
325
- ] }) });
326
- }
327
351
  var AlertDialog = AlertDialogPrimitive.Root;
328
352
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
329
353
  var AlertDialogPortal = AlertDialogPrimitive.Portal;