@olwiba/ui 0.0.43 → 0.0.45

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.
@@ -0,0 +1,37 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ import { useMDXComponent } from '@content-collections/mdx/react';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/lib/utils.ts
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ var components = {
11
+ h1: ({ className, ...props }) => /* @__PURE__ */ jsx("h1", { className: cn("mt-8 scroll-m-20 text-3xl font-bold tracking-tight text-foreground first:mt-0", className), ...props }),
12
+ h2: ({ className, ...props }) => /* @__PURE__ */ jsx("h2", { className: cn("mt-10 scroll-m-20 text-2xl font-semibold tracking-tight text-foreground first:mt-0", className), ...props }),
13
+ h3: ({ className, ...props }) => /* @__PURE__ */ jsx("h3", { className: cn("mt-8 scroll-m-20 text-xl font-semibold tracking-tight text-foreground", className), ...props }),
14
+ h4: ({ className, ...props }) => /* @__PURE__ */ jsx("h4", { className: cn("mt-6 scroll-m-20 text-lg font-semibold tracking-tight text-foreground", className), ...props }),
15
+ p: ({ className, ...props }) => /* @__PURE__ */ jsx("p", { className: cn("leading-7 text-muted-foreground [&:not(:first-child)]:mt-6", className), ...props }),
16
+ ul: ({ className, ...props }) => /* @__PURE__ */ jsx("ul", { className: cn("my-6 ml-6 list-disc text-muted-foreground", className), ...props }),
17
+ ol: ({ className, ...props }) => /* @__PURE__ */ jsx("ol", { className: cn("my-6 ml-6 list-decimal text-muted-foreground", className), ...props }),
18
+ li: ({ className, ...props }) => /* @__PURE__ */ jsx("li", { className: cn("mt-2", className), ...props }),
19
+ blockquote: ({ className, ...props }) => /* @__PURE__ */ jsx("blockquote", { className: cn("mt-6 rounded-r-lg border-l-4 border-primary bg-muted py-4 pl-6 pr-4 italic text-muted-foreground", className), ...props }),
20
+ hr: (props) => /* @__PURE__ */ jsx("hr", { className: "my-8 border-border", ...props }),
21
+ img: ({ className, alt, ...props }) => /* @__PURE__ */ jsx("img", { className: cn("rounded-lg border shadow-sm", className), alt, ...props }),
22
+ pre: ({ className, ...props }) => /* @__PURE__ */ jsx("pre", { className: cn("mt-6 mb-4 overflow-x-auto rounded-lg bg-muted p-4 text-sm", className), ...props }),
23
+ code: ({ className, ...props }) => /* @__PURE__ */ jsx("code", { className: cn("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm text-foreground", className), ...props }),
24
+ table: ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: "my-6 w-full overflow-y-auto rounded-lg border border-border", children: /* @__PURE__ */ jsx("table", { className: cn("w-full", className), ...props }) }),
25
+ tr: ({ className, ...props }) => /* @__PURE__ */ jsx("tr", { className: cn("m-0 border-t border-border p-0 even:bg-muted", className), ...props }),
26
+ th: ({ className, ...props }) => /* @__PURE__ */ jsx("th", { className: cn("border border-border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right", className), ...props }),
27
+ td: ({ className, ...props }) => /* @__PURE__ */ jsx("td", { className: cn("border border-border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right", className), ...props }),
28
+ a: ({ className, ...props }) => /* @__PURE__ */ jsx("a", { className: cn("font-medium text-primary underline underline-offset-4 hover:text-primary/80", className), ...props })
29
+ };
30
+ function MdxContent({ code }) {
31
+ const MDXComponent = useMDXComponent(code);
32
+ return /* @__PURE__ */ jsx(MDXComponent, { components });
33
+ }
34
+
35
+ export { MdxContent, cn };
36
+ //# sourceMappingURL=chunk-AMWLSHD6.js.map
37
+ //# sourceMappingURL=chunk-AMWLSHD6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/blog/MdxContent.tsx"],"names":[],"mappings":";;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC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AAW,EAAA,CAAG,QAAA,EAAU,SAAS,CAAA,EAAI,GAAG,OAAO,CAAA,EACxD,CAAA;AAAA,EAEF,EAAA,EAAI,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,qBACzB,GAAA,CAAC,IAAA,EAAA,EAAG,WAAW,EAAA,CAAG,8CAAA,EAAgD,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAAA,EAE3F,EAAA,EAAI,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,qBACzB,GAAA,CAAC,IAAA,EAAA,EAAG,WAAW,EAAA,CAAG,8GAAA,EAAgH,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAAA,EAE3J,EAAA,EAAI,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,qBACzB,GAAA,CAAC,IAAA,EAAA,EAAG,WAAW,EAAA,CAAG,oGAAA,EAAsG,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAAA,EAEjJ,CAAA,EAAG,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,qBACxB,GAAA,CAAC,GAAA,EAAA,EAAE,WAAW,EAAA,CAAG,6EAAA,EAA+E,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAE3H,CAAA;AAMO,SAAS,UAAA,CAAW,EAAE,IAAA,EAAK,EAAoB;AACpD,EAAA,MAAM,YAAA,GAAe,gBAAgB,IAAI,CAAA;AACzC,EAAA,uBAAO,GAAA,CAAC,gBAAa,UAAA,EAAwB,CAAA;AAC/C","file":"chunk-AMWLSHD6.js","sourcesContent":["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 { useMDXComponent } from '@content-collections/mdx/react';\nimport { cn } from '../lib/utils';\n\nconst components = {\n h1: ({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (\n <h1 className={cn('mt-8 scroll-m-20 text-3xl font-bold tracking-tight text-foreground first:mt-0', className)} {...props} />\n ),\n h2: ({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (\n <h2 className={cn('mt-10 scroll-m-20 text-2xl font-semibold tracking-tight text-foreground first:mt-0', className)} {...props} />\n ),\n h3: ({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (\n <h3 className={cn('mt-8 scroll-m-20 text-xl font-semibold tracking-tight text-foreground', className)} {...props} />\n ),\n h4: ({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (\n <h4 className={cn('mt-6 scroll-m-20 text-lg font-semibold tracking-tight text-foreground', className)} {...props} />\n ),\n p: ({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p className={cn('leading-7 text-muted-foreground [&:not(:first-child)]:mt-6', className)} {...props} />\n ),\n ul: ({ className, ...props }: React.HTMLAttributes<HTMLUListElement>) => (\n <ul className={cn('my-6 ml-6 list-disc text-muted-foreground', className)} {...props} />\n ),\n ol: ({ className, ...props }: React.HTMLAttributes<HTMLOListElement>) => (\n <ol className={cn('my-6 ml-6 list-decimal text-muted-foreground', className)} {...props} />\n ),\n li: ({ className, ...props }: React.HTMLAttributes<HTMLLIElement>) => (\n <li className={cn('mt-2', className)} {...props} />\n ),\n blockquote: ({ className, ...props }: React.HTMLAttributes<HTMLQuoteElement>) => (\n <blockquote className={cn('mt-6 rounded-r-lg border-l-4 border-primary bg-muted py-4 pl-6 pr-4 italic text-muted-foreground', className)} {...props} />\n ),\n hr: (props: React.HTMLAttributes<HTMLHRElement>) => (\n <hr className=\"my-8 border-border\" {...props} />\n ),\n img: ({ className, alt, ...props }: React.ImgHTMLAttributes<HTMLImageElement>) => (\n <img className={cn('rounded-lg border shadow-sm', className)} alt={alt} {...props} />\n ),\n pre: ({ className, ...props }: React.HTMLAttributes<HTMLPreElement>) => (\n <pre className={cn('mt-6 mb-4 overflow-x-auto rounded-lg bg-muted p-4 text-sm', className)} {...props} />\n ),\n code: ({ className, ...props }: React.HTMLAttributes<HTMLElement>) => (\n <code className={cn('relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm text-foreground', className)} {...props} />\n ),\n table: ({ className, ...props }: React.HTMLAttributes<HTMLTableElement>) => (\n <div className=\"my-6 w-full overflow-y-auto rounded-lg border border-border\">\n <table className={cn('w-full', className)} {...props} />\n </div>\n ),\n tr: ({ className, ...props }: React.HTMLAttributes<HTMLTableRowElement>) => (\n <tr className={cn('m-0 border-t border-border p-0 even:bg-muted', className)} {...props} />\n ),\n th: ({ className, ...props }: React.HTMLAttributes<HTMLTableCellElement>) => (\n <th className={cn('border border-border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right', className)} {...props} />\n ),\n td: ({ className, ...props }: React.HTMLAttributes<HTMLTableCellElement>) => (\n <td className={cn('border border-border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right', className)} {...props} />\n ),\n a: ({ className, ...props }: React.AnchorHTMLAttributes<HTMLAnchorElement>) => (\n <a className={cn('font-medium text-primary underline underline-offset-4 hover:text-primary/80', className)} {...props} />\n ),\n};\n\nexport interface MdxContentProps {\n code: string;\n}\n\nexport function MdxContent({ code }: MdxContentProps) {\n const MDXComponent = useMDXComponent(code);\n return <MDXComponent components={components} />;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import React__default, { ReactNode } from 'react';
5
5
  import { ButtonProps as ButtonProps$1, CardProps as CardProps$1, BadgeProps as BadgeProps$1, InputProps as InputProps$1, TextareaProps as TextareaProps$1, CheckboxProps as CheckboxProps$1, SwitchProps as SwitchProps$1 } from '@olwiba/cn';
6
6
  export { CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@olwiba/cn';
7
7
  import { LucideIcon } from 'lucide-react';
8
+ export { MdxContent, MdxContentProps } from './mdx/index.js';
8
9
 
9
10
  declare function cn(...inputs: ClassValue[]): string;
10
11
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { cn } from './chunk-SUKTBILF.js';
2
- export { cn } from './chunk-SUKTBILF.js';
1
+ import { cn } from './chunk-AMWLSHD6.js';
2
+ export { MdxContent, cn } from './chunk-AMWLSHD6.js';
3
3
  import * as React25 from 'react';
4
4
  import { useState, useEffect } from 'react';
5
5
  import { Button as Button$1, Card as Card$1, Input as Input$1, Textarea as Textarea$1, Checkbox as Checkbox$1, Switch as Switch$1, useIsMobile, UIVariantProvider, Badge as Badge$1, cn as cn$1, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Avatar, AvatarImage, AvatarFallback, Separator, Accordion, AccordionItem, AccordionTrigger, AccordionContent, Label, Sheet, SheetTrigger, SheetContent, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandSeparator, CommandGroup, CommandItem, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, ContextMenu as ContextMenu$1, ContextMenuTrigger, ContextMenuContent, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, Spinner, SidebarProvider, SidebarInset, CardHeader, CardTitle, CardDescription, CardContent, ContextMenuSeparator, ContextMenuLabel, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, ContextMenuItem, ContextMenuShortcut, Sidebar, SidebarHeader, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarFooter, SidebarTrigger, useSidebar, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuGroup, DropdownMenuItem } from '@olwiba/cn';
@@ -1607,18 +1607,18 @@ function Footer({
1607
1607
  }) {
1608
1608
  const brandHref = brand.href ?? "/";
1609
1609
  const copyrightText = legal ?? `\xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} ${brand.name}. All rights reserved.`;
1610
- return /* @__PURE__ */ jsx("footer", { className: "overflow-hidden rounded-2xl border bg-foreground text-background", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-7xl px-6 py-20 sm:py-24 lg:px-8", children: [
1610
+ return /* @__PURE__ */ jsx("footer", { className: "overflow-hidden rounded-2xl border bg-muted text-foreground", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-7xl px-6 py-20 sm:py-24 lg:px-8", children: [
1611
1611
  /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: renderLink({
1612
1612
  href: brandHref,
1613
1613
  className: "flex items-center gap-2",
1614
1614
  children: /* @__PURE__ */ jsxs(Fragment, { children: [
1615
- brand.logo && /* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 items-center justify-center rounded-lg bg-background/10 text-background", children: brand.logo }),
1616
- /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-background", children: brand.name })
1615
+ brand.logo && /* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 items-center justify-center rounded-lg bg-foreground/10 text-foreground", children: brand.logo }),
1616
+ /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-foreground", children: brand.name })
1617
1617
  ] })
1618
1618
  }) }),
1619
1619
  navLinks && navLinks.length > 0 && /* @__PURE__ */ jsx("nav", { className: "mt-10 flex flex-wrap justify-center gap-x-12 gap-y-3", "aria-label": "Footer", children: navLinks.map(({ label, href }) => /* @__PURE__ */ jsx("div", { children: renderLink({
1620
1620
  href,
1621
- className: "text-sm/6 text-background/70 transition-colors hover:text-background",
1621
+ className: "text-sm/6 text-muted-foreground transition-colors hover:text-foreground",
1622
1622
  children: label
1623
1623
  }) }, label)) }),
1624
1624
  socialLinks && socialLinks.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-10 flex justify-center gap-x-10", children: socialLinks.map(({ label, href, icon }) => /* @__PURE__ */ jsx(
@@ -1626,12 +1626,12 @@ function Footer({
1626
1626
  {
1627
1627
  href,
1628
1628
  "aria-label": label,
1629
- className: "text-background/70 transition-colors hover:text-background",
1629
+ className: "text-muted-foreground transition-colors hover:text-foreground",
1630
1630
  children: icon
1631
1631
  },
1632
1632
  label
1633
1633
  )) }),
1634
- /* @__PURE__ */ jsx("p", { className: "mt-10 text-center text-sm/6 text-background/50", children: copyrightText })
1634
+ /* @__PURE__ */ jsx("p", { className: "mt-10 text-center text-sm/6 text-muted-foreground/70", children: copyrightText })
1635
1635
  ] }) });
1636
1636
  }
1637
1637
  var speedDuration = {