@naeil/ui 0.11.0 → 0.13.0

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 (82) hide show
  1. package/CHANGELOG.md +38 -2
  2. package/DESIGN.md +13 -3
  3. package/README.md +13 -11
  4. package/THIRD_PARTY_NOTICES.md +4 -2
  5. package/dist/{chunk-KWEWR46R.js → chunk-5BXZPDHZ.js} +68 -8
  6. package/dist/{chunk-U3IZCFM4.js → chunk-A2DCQVTP.js} +1 -1
  7. package/dist/{chunk-KPE4KKYM.js → chunk-Y5LW3ADW.js} +24 -15
  8. package/dist/components/index.d.ts +3 -3
  9. package/dist/components/index.js +4 -4
  10. package/dist/components/naeil-footer.d.ts +2 -2
  11. package/dist/components/naeil-footer.js +1 -1
  12. package/dist/components/naeil-header.d.ts +23 -8
  13. package/dist/components/naeil-header.js +7 -5
  14. package/dist/components/ui/index.d.ts +22 -5
  15. package/dist/components/ui/index.js +181 -34
  16. package/dist/lib/ui-release.d.ts +1 -1
  17. package/dist/lib/ui-release.js +1 -1
  18. package/dist/lib/utils.js +1 -7
  19. package/dist/naeil-locale/checker.js +1 -1
  20. package/dist/naeil-locale/chrome.d.ts +25 -8
  21. package/dist/naeil-locale/chrome.js +91 -22
  22. package/dist/naeil-locale/{chunk-4U64K4J3.js → chunk-24IL53QO.js} +1 -1
  23. package/dist/naeil-locale/{chunk-U65OQHZY.js → chunk-WT6QXR7O.js} +14 -8
  24. package/dist/naeil-locale/client.js +45 -15
  25. package/dist/naeil-locale/index.js +1 -1
  26. package/dist/naeil-locale/messages.js +2 -2
  27. package/dist/naeil-locale/server.js +6 -6
  28. package/dist/{navigation-D8N1tMTu.d.ts → navigation-CXZapKac.d.ts} +3 -1
  29. package/dist/{site-footer-s113FZgC.d.ts → site-footer-C4jgkGDU.d.ts} +1 -1
  30. package/dist/source/components/naeil-header-core.d.ts +23 -8
  31. package/dist/source/components/naeil-header-core.js +66 -6
  32. package/dist/source/components/naeil-header.d.ts +6 -4
  33. package/dist/source/components/naeil-header.js +4 -2
  34. package/dist/source/components/typography.d.ts +1 -1
  35. package/dist/source/components/typography.js +1 -1
  36. package/dist/source/components/ui/button.js +7 -7
  37. package/dist/source/components/ui/card.js +1 -1
  38. package/dist/source/components/ui/dialog.d.ts +4 -2
  39. package/dist/source/components/ui/dialog.js +10 -6
  40. package/dist/source/components/ui/index.d.ts +1 -0
  41. package/dist/source/components/ui/index.js +22 -0
  42. package/dist/source/components/ui/navigation.d.ts +3 -1
  43. package/dist/source/components/ui/navigation.js +17 -8
  44. package/dist/source/components/ui/sheet.d.ts +20 -0
  45. package/dist/source/components/ui/sheet.js +176 -0
  46. package/dist/source/components/ui/sonner.js +2 -2
  47. package/dist/source/lib/ui-release.d.ts +1 -1
  48. package/dist/source/lib/ui-release.js +1 -1
  49. package/docs/components/README.md +4 -1
  50. package/docs/components/application-layout.md +27 -28
  51. package/docs/components/avatar.md +1 -1
  52. package/docs/components/badge.md +5 -1
  53. package/docs/components/button.md +9 -1
  54. package/docs/components/card.md +5 -1
  55. package/docs/components/checkbox.md +1 -1
  56. package/docs/components/common.md +22 -1
  57. package/docs/components/dialog.md +14 -4
  58. package/docs/components/dropdown-menu.md +1 -1
  59. package/docs/components/input.md +1 -1
  60. package/docs/components/naeil-footer.md +4 -2
  61. package/docs/components/naeil-header.md +41 -12
  62. package/docs/components/naeil-locale.md +36 -0
  63. package/docs/components/navigation.md +10 -4
  64. package/docs/components/select.md +1 -1
  65. package/docs/components/sheet.md +50 -0
  66. package/docs/components/sonner.md +7 -1
  67. package/docs/components/switch.md +1 -1
  68. package/docs/components/tabs.md +1 -1
  69. package/docs/components/textarea.md +1 -1
  70. package/docs/design/public-ui-support.md +3 -1
  71. package/docs/design/v2-migration.md +13 -7
  72. package/docs/package-release.md +24 -8
  73. package/package.json +11 -10
  74. package/src/styles/components.css +40 -2
  75. package/src/styles/globals.css +6 -2
  76. package/src/styles/theme.css +6 -0
  77. package/licenses/Nunito-Sans-OFL.txt +0 -93
  78. package/licenses/React-MIT.txt +0 -21
  79. package/licenses/Storybook-MIT.txt +0 -21
  80. package/licenses/popper-MIT.txt +0 -25
  81. package/licenses/store2-MIT.txt +0 -22
  82. package/licenses/toggle-selection-MIT.txt +0 -21
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- import { b as NavigationLinkComponent, a as NavigationProps, c as NavigationItem, d as NavigationLinkProps, N as NavigationLink } from '../navigation-D8N1tMTu.js';
2
+ import { ReactNode, JSX } from 'react';
3
+ import { b as NavigationLinkComponent, a as NavigationProps, c as NavigationItem, d as NavigationLinkProps, N as NavigationLink } from '../navigation-CXZapKac.js';
4
4
  import { N as NaeilHeaderLocale } from '../naeil-header-data-BvISJ4RV.js';
5
5
 
6
6
  type NaeilHeaderAccount = {
@@ -22,14 +22,16 @@ interface NaeilHeaderAccountControlProps {
22
22
  }
23
23
 
24
24
  interface NaeilHeaderProps extends Omit<NavigationProps, "brand" | "items" | "toolbar" | "mobileToolbar" | "labels"> {
25
+ service?: undefined;
25
26
  locale: NaeilHeaderLocale;
26
27
  /** Resolve canonical unlocalized paths. Defaults to the official localized site. */
27
28
  resolveHref?: (path: string) => string;
28
29
  brandHref?: string;
30
+ /** @deprecated Owned services must use service; retained for compatibility. */
29
31
  brandSlot?: ReactNode;
30
- /** Ignored when brandSlot replaces the complete brand content. */
32
+ /** @deprecated Owned services must use service; retained for compatibility. Ignored with brandSlot. */
31
33
  brandSuffix?: string;
32
- /** After the brand link, outside it; rendered once at every width. */
34
+ /** @deprecated Owned services must use service with no indicator; retained for compatibility. */
33
35
  statusSlot?: ReactNode;
34
36
  /** Product menu data, after catalog/blog and before flat subNav links. */
35
37
  appNavigation?: NavigationItem[];
@@ -50,21 +52,34 @@ interface NaeilHeaderProps extends Omit<NavigationProps, "brand" | "items" | "to
50
52
  };
51
53
  showProjects?: boolean;
52
54
  showBlog?: boolean;
55
+ /** @deprecated Owned services must use service and appNavigation; retained for compatibility. */
53
56
  subNav?: Array<{
54
57
  label: string;
55
58
  href: string;
56
59
  }>;
57
60
  currentProjectKey?: string;
58
61
  currentProjectHref?: string;
59
- /** Compatibility escape hatch replacing the default theme/locale/auth toolbar. */
62
+ /** @deprecated Owned services must use service and authSlot; retained for compatibility. */
60
63
  toolbarSlot?: ReactNode;
61
- /** Compatibility escape hatch for the legacy native external brand link. */
64
+ /** @deprecated Owned services must use service and Link; retained for compatibility. */
62
65
  brandLinkComponent?: NavigationLinkComponent;
63
66
  }
67
+ /** Canonical owned-service identifiers; their spelling is the visible brand suffix. */
68
+ declare const naeilServices: readonly ["abstorm", "home", "estimate", "jev"];
69
+ type NaeilService = typeof naeilServices[number];
70
+ declare const serviceCompatibilityProps: readonly ["brandSuffix", "statusSlot", "brandSlot", "toolbarSlot", "subNav", "brandLinkComponent", "projects", "projectsExternal", "showProjects", "showBlog", "translations", "className", "containerClassName", "style", "brandLinkProps", "mobileFooter", "omitEmptyNavigation"];
71
+ type ServiceCompatibilityProp = typeof serviceCompatibilityProps[number];
72
+ /** Strict owned-service props; the legacy interface remains independently extensible. */
73
+ type NaeilServiceHeaderProps = Omit<NaeilHeaderProps, ServiceCompatibilityProp | "service"> & {
74
+ service: NaeilService;
75
+ } & {
76
+ [Prop in ServiceCompatibilityProp]?: never;
77
+ };
64
78
 
65
79
  declare function NaeilHeaderAccountControl(props: NaeilHeaderAccountControlProps): react_jsx_runtime.JSX.Element;
66
80
 
67
- declare function NaeilHeader(props: NaeilHeaderProps): react_jsx_runtime.JSX.Element;
81
+ declare function NaeilHeader(props: NaeilServiceHeaderProps): JSX.Element;
82
+ declare function NaeilHeader(props: NaeilHeaderProps): JSX.Element;
68
83
  declare function NaeilHeaderThemeControl(props: {
69
84
  locale: NaeilHeaderLocale;
70
85
  }): react_jsx_runtime.JSX.Element;
@@ -73,4 +88,4 @@ declare function NaeilHeaderLocaleControl(props: {
73
88
  onLocaleChange: (locale: NaeilHeaderLocale) => void;
74
89
  }): react_jsx_runtime.JSX.Element;
75
90
 
76
- export { NaeilHeader, type NaeilHeaderAccount, NaeilHeaderAccountControl, type NaeilHeaderAccountControlProps, NaeilHeaderLocale, NaeilHeaderLocaleControl, type NaeilHeaderProps, NaeilHeaderThemeControl };
91
+ export { NaeilHeader, type NaeilHeaderAccount, NaeilHeaderAccountControl, type NaeilHeaderAccountControlProps, NaeilHeaderLocale, NaeilHeaderLocaleControl, type NaeilHeaderProps, NaeilHeaderThemeControl, type NaeilService, type NaeilServiceHeaderProps, naeilServices };
@@ -4,14 +4,16 @@ import {
4
4
  NaeilHeader,
5
5
  NaeilHeaderAccountControl,
6
6
  NaeilHeaderLocaleControl,
7
- NaeilHeaderThemeControl
8
- } from "../chunk-KWEWR46R.js";
9
- import "../chunk-U3IZCFM4.js";
10
- import "../chunk-KPE4KKYM.js";
7
+ NaeilHeaderThemeControl,
8
+ naeilServices
9
+ } from "../chunk-5BXZPDHZ.js";
10
+ import "../chunk-A2DCQVTP.js";
11
+ import "../chunk-Y5LW3ADW.js";
11
12
  import "../chunk-JBTDRVZ7.js";
12
13
  export {
13
14
  NaeilHeader,
14
15
  NaeilHeaderAccountControl,
15
16
  NaeilHeaderLocaleControl,
16
- NaeilHeaderThemeControl
17
+ NaeilHeaderThemeControl,
18
+ naeilServices
17
19
  };
@@ -4,8 +4,8 @@ import { Avatar as Avatar$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1,
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantProps } from 'class-variance-authority';
6
6
  import { ToasterProps } from 'sonner';
7
- export { e as Navigation, f as NavigationGroup, c as NavigationItem, N as NavigationLink, b as NavigationLinkComponent, d as NavigationLinkProps, a as NavigationProps } from '../../navigation-D8N1tMTu.js';
8
- export { a as SiteFooter, S as SiteFooterProps } from '../../site-footer-s113FZgC.js';
7
+ export { e as Navigation, f as NavigationGroup, c as NavigationItem, N as NavigationLink, b as NavigationLinkComponent, d as NavigationLinkProps, a as NavigationProps } from '../../navigation-CXZapKac.js';
8
+ export { a as SiteFooter, S as SiteFooterProps } from '../../site-footer-C4jgkGDU.js';
9
9
 
10
10
  declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof Avatar$1.Root> & {
11
11
  size?: "default" | "sm" | "lg";
@@ -45,16 +45,33 @@ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof Dialog$
45
45
  declare function DialogPortal({ ...props }: React.ComponentProps<typeof Dialog$1.Portal>): react_jsx_runtime.JSX.Element;
46
46
  declare function DialogClose({ ...props }: React.ComponentProps<typeof Dialog$1.Close>): react_jsx_runtime.JSX.Element;
47
47
  declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof Dialog$1.Overlay>): react_jsx_runtime.JSX.Element;
48
- declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof Dialog$1.Content> & {
48
+ declare function DialogContent({ className, children, showCloseButton, closeLabel, ...props }: React.ComponentProps<typeof Dialog$1.Content> & {
49
49
  showCloseButton?: boolean;
50
+ closeLabel?: string;
50
51
  }): react_jsx_runtime.JSX.Element;
51
52
  declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
52
- declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
53
+ declare function DialogFooter({ className, showCloseButton, closeLabel, children, ...props }: React.ComponentProps<"div"> & {
53
54
  showCloseButton?: boolean;
55
+ closeLabel?: string;
54
56
  }): react_jsx_runtime.JSX.Element;
55
57
  declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof Dialog$1.Title>): react_jsx_runtime.JSX.Element;
56
58
  declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof Dialog$1.Description>): react_jsx_runtime.JSX.Element;
57
59
 
60
+ declare function Sheet({ ...props }: React.ComponentProps<typeof Dialog$1.Root>): react_jsx_runtime.JSX.Element;
61
+ declare function SheetTrigger({ ...props }: React.ComponentProps<typeof Dialog$1.Trigger>): react_jsx_runtime.JSX.Element;
62
+ declare function SheetPortal({ ...props }: React.ComponentProps<typeof Dialog$1.Portal>): react_jsx_runtime.JSX.Element;
63
+ declare function SheetClose({ ...props }: React.ComponentProps<typeof Dialog$1.Close>): react_jsx_runtime.JSX.Element;
64
+ declare function SheetOverlay({ className, ...props }: React.ComponentProps<typeof Dialog$1.Overlay>): react_jsx_runtime.JSX.Element;
65
+ declare function SheetContent({ className, children, side, showCloseButton, closeLabel, ...props }: React.ComponentProps<typeof Dialog$1.Content> & {
66
+ side?: "right" | "left" | "top" | "bottom";
67
+ showCloseButton?: boolean;
68
+ closeLabel?: string;
69
+ }): react_jsx_runtime.JSX.Element;
70
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
71
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
72
+ declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof Dialog$1.Title>): react_jsx_runtime.JSX.Element;
73
+ declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof Dialog$1.Description>): react_jsx_runtime.JSX.Element;
74
+
58
75
  declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime.JSX.Element;
59
76
  declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Portal>): react_jsx_runtime.JSX.Element;
60
77
  declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Trigger>): react_jsx_runtime.JSX.Element;
@@ -104,4 +121,4 @@ declare function TabsContent({ className, ...props }: React.ComponentProps<typeo
104
121
 
105
122
  declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
106
123
 
107
- export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardElevated, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, badgeVariants, buttonVariants };
124
+ export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardElevated, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, badgeVariants, buttonVariants };
@@ -33,7 +33,7 @@ import {
33
33
  SelectValue,
34
34
  badgeVariants,
35
35
  buttonVariants
36
- } from "../../chunk-KPE4KKYM.js";
36
+ } from "../../chunk-Y5LW3ADW.js";
37
37
  import {
38
38
  __objRest,
39
39
  __spreadProps,
@@ -189,7 +189,7 @@ function CardTitle(_a) {
189
189
  "div",
190
190
  __spreadValues({
191
191
  "data-slot": "card-title",
192
- className: cn("leading-none font-semibold", className)
192
+ className: cn("text-base font-semibold", className)
193
193
  }, props)
194
194
  );
195
195
  }
@@ -278,11 +278,13 @@ function DialogContent(_a) {
278
278
  var _b = _a, {
279
279
  className,
280
280
  children,
281
- showCloseButton = true
281
+ showCloseButton = true,
282
+ closeLabel = "Close"
282
283
  } = _b, props = __objRest(_b, [
283
284
  "className",
284
285
  "children",
285
- "showCloseButton"
286
+ "showCloseButton",
287
+ "closeLabel"
286
288
  ]);
287
289
  return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
288
290
  /* @__PURE__ */ jsx3(DialogOverlay, {}),
@@ -291,7 +293,7 @@ function DialogContent(_a) {
291
293
  __spreadProps(__spreadValues({
292
294
  "data-slot": "dialog-content",
293
295
  className: cn(
294
- "bg-popover ui-popup fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border border-border-strong p-6 sm:max-w-lg",
296
+ "bg-popover ui-popup fixed top-[50%] left-[50%] z-50 grid w-full max-h-[min(calc(100%-2rem),calc(100dvh-2rem))] overflow-y-auto max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border border-border-strong p-6 sm:max-w-lg",
295
297
  className
296
298
  )
297
299
  }, props), {
@@ -304,7 +306,7 @@ function DialogContent(_a) {
304
306
  className: "ui-focus absolute top-2 right-2 flex size-10 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground transition-colors ui-focus disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
305
307
  children: [
306
308
  /* @__PURE__ */ jsx3(XIcon, {}),
307
- /* @__PURE__ */ jsx3("span", { className: "sr-only", children: "Close" })
309
+ /* @__PURE__ */ jsx3("span", { className: "sr-only", children: closeLabel })
308
310
  ]
309
311
  }
310
312
  )
@@ -327,10 +329,12 @@ function DialogFooter(_a) {
327
329
  var _b = _a, {
328
330
  className,
329
331
  showCloseButton = false,
332
+ closeLabel = "Close",
330
333
  children
331
334
  } = _b, props = __objRest(_b, [
332
335
  "className",
333
336
  "showCloseButton",
337
+ "closeLabel",
334
338
  "children"
335
339
  ]);
336
340
  return /* @__PURE__ */ jsxs(
@@ -344,7 +348,7 @@ function DialogFooter(_a) {
344
348
  }, props), {
345
349
  children: [
346
350
  children,
347
- showCloseButton && /* @__PURE__ */ jsx3(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx3(Button, { variant: "outline", children: "Close" }) })
351
+ showCloseButton && /* @__PURE__ */ jsx3(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx3(Button, { variant: "outline", children: closeLabel }) })
348
352
  ]
349
353
  })
350
354
  );
@@ -359,7 +363,7 @@ function DialogTitle(_a) {
359
363
  DialogPrimitive.Title,
360
364
  __spreadValues({
361
365
  "data-slot": "dialog-title",
362
- className: cn("text-xl leading-normal font-semibold", className)
366
+ className: cn("text-xl font-semibold", className)
363
367
  }, props)
364
368
  );
365
369
  }
@@ -378,11 +382,144 @@ function DialogDescription(_a) {
378
382
  );
379
383
  }
380
384
 
385
+ // src/components/ui/sheet.tsx
386
+ import { XIcon as XIcon2 } from "lucide-react";
387
+ import { Dialog as DialogPrimitive2 } from "radix-ui";
388
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
389
+ function Sheet(_a) {
390
+ var props = __objRest(_a, []);
391
+ return /* @__PURE__ */ jsx4(DialogPrimitive2.Root, __spreadValues({ "data-slot": "sheet" }, props));
392
+ }
393
+ function SheetTrigger(_a) {
394
+ var props = __objRest(_a, []);
395
+ return /* @__PURE__ */ jsx4(DialogPrimitive2.Trigger, __spreadValues({ "data-slot": "sheet-trigger" }, props));
396
+ }
397
+ function SheetPortal(_a) {
398
+ var props = __objRest(_a, []);
399
+ return /* @__PURE__ */ jsx4(DialogPrimitive2.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
400
+ }
401
+ function SheetClose(_a) {
402
+ var props = __objRest(_a, []);
403
+ return /* @__PURE__ */ jsx4(DialogPrimitive2.Close, __spreadValues({ "data-slot": "sheet-close" }, props));
404
+ }
405
+ function SheetOverlay(_a) {
406
+ var _b = _a, {
407
+ className
408
+ } = _b, props = __objRest(_b, [
409
+ "className"
410
+ ]);
411
+ return /* @__PURE__ */ jsx4(
412
+ DialogPrimitive2.Overlay,
413
+ __spreadValues({
414
+ "data-slot": "sheet-overlay",
415
+ className: cn("ui-popup fixed inset-0 z-50 bg-black/60 ", className)
416
+ }, props)
417
+ );
418
+ }
419
+ function SheetContent(_a) {
420
+ var _b = _a, {
421
+ className,
422
+ children,
423
+ side = "right",
424
+ showCloseButton = true,
425
+ closeLabel = "Close"
426
+ } = _b, props = __objRest(_b, [
427
+ "className",
428
+ "children",
429
+ "side",
430
+ "showCloseButton",
431
+ "closeLabel"
432
+ ]);
433
+ return /* @__PURE__ */ jsxs2(SheetPortal, { "data-slot": "sheet-portal", children: [
434
+ /* @__PURE__ */ jsx4(SheetOverlay, {}),
435
+ /* @__PURE__ */ jsxs2(
436
+ DialogPrimitive2.Content,
437
+ __spreadProps(__spreadValues({
438
+ "data-slot": "sheet-content",
439
+ "data-side": side,
440
+ className: cn(
441
+ "bg-popover ui-popup fixed z-50 flex flex-col gap-4 overflow-y-auto border-border-strong p-[var(--ui-panel-padding)]",
442
+ {
443
+ right: "inset-y-0 right-0 w-[min(100%,var(--ui-width-short-form))] rounded-l-xl border-l",
444
+ left: "inset-y-0 left-0 w-[min(100%,var(--ui-width-short-form))] rounded-r-xl border-r",
445
+ top: "inset-x-0 top-0 max-h-[100dvh] w-full rounded-b-xl border-b",
446
+ bottom: "inset-x-0 bottom-0 max-h-[100dvh] w-full rounded-t-xl border-t"
447
+ }[side],
448
+ className
449
+ )
450
+ }, props), {
451
+ children: [
452
+ children,
453
+ showCloseButton && /* @__PURE__ */ jsxs2(
454
+ DialogPrimitive2.Close,
455
+ {
456
+ "data-slot": "sheet-close",
457
+ className: "ui-focus absolute top-2 right-2 flex size-10 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground transition-colors disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
458
+ children: [
459
+ /* @__PURE__ */ jsx4(XIcon2, {}),
460
+ /* @__PURE__ */ jsx4("span", { className: "sr-only", children: closeLabel })
461
+ ]
462
+ }
463
+ )
464
+ ]
465
+ })
466
+ )
467
+ ] });
468
+ }
469
+ function SheetHeader(_a) {
470
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
471
+ return /* @__PURE__ */ jsx4(
472
+ "div",
473
+ __spreadValues({
474
+ "data-slot": "sheet-header",
475
+ className: cn("flex flex-col gap-2 pr-8 text-left", className)
476
+ }, props)
477
+ );
478
+ }
479
+ function SheetFooter(_a) {
480
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
481
+ return /* @__PURE__ */ jsx4(
482
+ "div",
483
+ __spreadValues({
484
+ "data-slot": "sheet-footer",
485
+ className: cn("mt-auto flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)
486
+ }, props)
487
+ );
488
+ }
489
+ function SheetTitle(_a) {
490
+ var _b = _a, {
491
+ className
492
+ } = _b, props = __objRest(_b, [
493
+ "className"
494
+ ]);
495
+ return /* @__PURE__ */ jsx4(
496
+ DialogPrimitive2.Title,
497
+ __spreadValues({
498
+ "data-slot": "sheet-title",
499
+ className: cn("text-xl leading-normal font-semibold", className)
500
+ }, props)
501
+ );
502
+ }
503
+ function SheetDescription(_a) {
504
+ var _b = _a, {
505
+ className
506
+ } = _b, props = __objRest(_b, [
507
+ "className"
508
+ ]);
509
+ return /* @__PURE__ */ jsx4(
510
+ DialogPrimitive2.Description,
511
+ __spreadValues({
512
+ "data-slot": "sheet-description",
513
+ className: cn("text-muted-foreground text-sm", className)
514
+ }, props)
515
+ );
516
+ }
517
+
381
518
  // src/components/ui/input.tsx
382
- import { jsx as jsx4 } from "react/jsx-runtime";
519
+ import { jsx as jsx5 } from "react/jsx-runtime";
383
520
  function Input(_a) {
384
521
  var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
385
- return /* @__PURE__ */ jsx4(
522
+ return /* @__PURE__ */ jsx5(
386
523
  "input",
387
524
  __spreadValues({
388
525
  type,
@@ -407,23 +544,23 @@ import {
407
544
  } from "lucide-react";
408
545
  import { useTheme } from "next-themes";
409
546
  import { Toaster as Sonner } from "sonner";
410
- import { jsx as jsx5 } from "react/jsx-runtime";
547
+ import { jsx as jsx6 } from "react/jsx-runtime";
411
548
  var Toaster = (_a) => {
412
549
  var props = __objRest(_a, []);
413
- const { theme = "system" } = useTheme();
414
- return /* @__PURE__ */ jsx5(
550
+ const { theme = "system", forcedTheme } = useTheme();
551
+ return /* @__PURE__ */ jsx6(
415
552
  Sonner,
416
553
  __spreadValues({
417
- theme,
554
+ theme: forcedTheme != null ? forcedTheme : theme,
418
555
  className: "toaster group font-sans",
419
556
  position: "bottom-right",
420
557
  duration: 4e3,
421
558
  icons: {
422
- success: /* @__PURE__ */ jsx5(CircleCheckIcon, { className: "size-4" }),
423
- info: /* @__PURE__ */ jsx5(InfoIcon, { className: "size-4" }),
424
- warning: /* @__PURE__ */ jsx5(TriangleAlertIcon, { className: "size-4" }),
425
- error: /* @__PURE__ */ jsx5(OctagonXIcon, { className: "size-4" }),
426
- loading: /* @__PURE__ */ jsx5(Loader2Icon, { className: "size-4 animate-spin" })
559
+ success: /* @__PURE__ */ jsx6(CircleCheckIcon, { className: "size-4" }),
560
+ info: /* @__PURE__ */ jsx6(InfoIcon, { className: "size-4" }),
561
+ warning: /* @__PURE__ */ jsx6(TriangleAlertIcon, { className: "size-4" }),
562
+ error: /* @__PURE__ */ jsx6(OctagonXIcon, { className: "size-4" }),
563
+ loading: /* @__PURE__ */ jsx6(Loader2Icon, { className: "size-4 animate-spin" })
427
564
  },
428
565
  style: {
429
566
  "--normal-bg": "var(--popover)",
@@ -449,20 +586,20 @@ var Toaster = (_a) => {
449
586
 
450
587
  // src/components/ui/switch.tsx
451
588
  import { Switch as Primitive } from "radix-ui";
452
- import { jsx as jsx6 } from "react/jsx-runtime";
589
+ import { jsx as jsx7 } from "react/jsx-runtime";
453
590
  function Switch(_a) {
454
591
  var _b = _a, {
455
592
  className
456
593
  } = _b, props = __objRest(_b, [
457
594
  "className"
458
595
  ]);
459
- return /* @__PURE__ */ jsx6(
596
+ return /* @__PURE__ */ jsx7(
460
597
  Primitive.Root,
461
598
  __spreadProps(__spreadValues({
462
599
  "data-slot": "switch",
463
600
  className: cn("ui-choice ui-focus", className)
464
601
  }, props), {
465
- children: /* @__PURE__ */ jsx6(Primitive.Thumb, { "data-slot": "switch-thumb" })
602
+ children: /* @__PURE__ */ jsx7(Primitive.Thumb, { "data-slot": "switch-thumb" })
466
603
  })
467
604
  );
468
605
  }
@@ -470,22 +607,22 @@ function Switch(_a) {
470
607
  // src/components/ui/checkbox.tsx
471
608
  import { Checkbox as Primitive2 } from "radix-ui";
472
609
  import { CheckIcon, MinusIcon } from "lucide-react";
473
- import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
610
+ import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
474
611
  function Checkbox(_a) {
475
612
  var _b = _a, {
476
613
  className
477
614
  } = _b, props = __objRest(_b, [
478
615
  "className"
479
616
  ]);
480
- return /* @__PURE__ */ jsx7(
617
+ return /* @__PURE__ */ jsx8(
481
618
  Primitive2.Root,
482
619
  __spreadProps(__spreadValues({
483
620
  "data-slot": "checkbox",
484
621
  className: cn("ui-choice ui-focus group/checkbox", className)
485
622
  }, props), {
486
- children: /* @__PURE__ */ jsxs2(Primitive2.Indicator, { className: "flex items-center justify-center", children: [
487
- /* @__PURE__ */ jsx7(CheckIcon, { className: "size-3.5 group-data-[state=indeterminate]/checkbox:hidden" }),
488
- /* @__PURE__ */ jsx7(MinusIcon, { className: "hidden size-3.5 group-data-[state=indeterminate]/checkbox:block" })
623
+ children: /* @__PURE__ */ jsxs3(Primitive2.Indicator, { className: "flex items-center justify-center", children: [
624
+ /* @__PURE__ */ jsx8(CheckIcon, { className: "size-3.5 group-data-[state=indeterminate]/checkbox:hidden" }),
625
+ /* @__PURE__ */ jsx8(MinusIcon, { className: "hidden size-3.5 group-data-[state=indeterminate]/checkbox:block" })
489
626
  ] })
490
627
  })
491
628
  );
@@ -493,32 +630,32 @@ function Checkbox(_a) {
493
630
 
494
631
  // src/components/ui/tabs.tsx
495
632
  import { Tabs as TabsPrimitive } from "radix-ui";
496
- import { jsx as jsx8 } from "react/jsx-runtime";
633
+ import { jsx as jsx9 } from "react/jsx-runtime";
497
634
  function Tabs(_a) {
498
635
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
499
- return /* @__PURE__ */ jsx8(TabsPrimitive.Root, __spreadValues({ "data-slot": "tabs", className: cn("ui-tabs min-w-0", className) }, props));
636
+ return /* @__PURE__ */ jsx9(TabsPrimitive.Root, __spreadValues({ "data-slot": "tabs", className: cn("ui-tabs min-w-0", className) }, props));
500
637
  }
501
638
  function TabsList(_a) {
502
639
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
503
- return /* @__PURE__ */ jsx8(TabsPrimitive.List, __spreadValues({ "data-slot": "tabs-list", className: cn("ui-tabs-list", className) }, props));
640
+ return /* @__PURE__ */ jsx9(TabsPrimitive.List, __spreadValues({ "data-slot": "tabs-list", className: cn("ui-tabs-list", className) }, props));
504
641
  }
505
642
  function TabsTrigger(_a) {
506
643
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
507
- return /* @__PURE__ */ jsx8(TabsPrimitive.Trigger, __spreadValues({ "data-slot": "tabs-trigger", className: cn(
644
+ return /* @__PURE__ */ jsx9(TabsPrimitive.Trigger, __spreadValues({ "data-slot": "tabs-trigger", className: cn(
508
645
  "ui-tabs-trigger ui-control ui-focus h-auto min-h-(--ui-control-height) w-max max-w-full shrink-0 whitespace-normal break-words rounded-md border-b-2 px-3 text-base leading-normal font-medium disabled:cursor-not-allowed disabled:opacity-50",
509
646
  className
510
647
  ) }, props));
511
648
  }
512
649
  function TabsContent(_a) {
513
650
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
514
- return /* @__PURE__ */ jsx8(TabsPrimitive.Content, __spreadValues({ "data-slot": "tabs-content", className: cn("ui-focus min-w-0 break-words", className) }, props));
651
+ return /* @__PURE__ */ jsx9(TabsPrimitive.Content, __spreadValues({ "data-slot": "tabs-content", className: cn("ui-focus min-w-0 break-words", className) }, props));
515
652
  }
516
653
 
517
654
  // src/components/ui/textarea.tsx
518
- import { jsx as jsx9 } from "react/jsx-runtime";
655
+ import { jsx as jsx10 } from "react/jsx-runtime";
519
656
  function Textarea(_a) {
520
657
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
521
- return /* @__PURE__ */ jsx9(
658
+ return /* @__PURE__ */ jsx10(
522
659
  "textarea",
523
660
  __spreadValues({
524
661
  "data-slot": "textarea",
@@ -584,6 +721,16 @@ export {
584
721
  SelectSeparator,
585
722
  SelectTrigger,
586
723
  SelectValue,
724
+ Sheet,
725
+ SheetClose,
726
+ SheetContent,
727
+ SheetDescription,
728
+ SheetFooter,
729
+ SheetHeader,
730
+ SheetOverlay,
731
+ SheetPortal,
732
+ SheetTitle,
733
+ SheetTrigger,
587
734
  SiteFooter,
588
735
  Switch,
589
736
  Tabs,
@@ -1 +1 @@
1
- export declare const uiRelease: Readonly<{version: "0.11.0"; contractVersion: "1"}>;
1
+ export declare const uiRelease: Readonly<{version: "0.13.0"; contractVersion: "1"}>;
@@ -1 +1 @@
1
- export const uiRelease = Object.freeze({"version":"0.11.0","contractVersion":"1"});
1
+ export const uiRelease = Object.freeze({"version":"0.13.0","contractVersion":"1"});
package/dist/lib/utils.js CHANGED
@@ -1,7 +1 @@
1
- "use client";
2
- import {
3
- cn
4
- } from "../chunk-JBTDRVZ7.js";
5
- export {
6
- cn
7
- };
1
+ export { cn } from "../source/lib/utils.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  naeilLocales
3
- } from "./chunk-U65OQHZY.js";
3
+ } from "./chunk-WT6QXR7O.js";
4
4
  import "./chunk-N3ETBM74.js";
5
5
 
6
6
  // src/naeil-locale/checker.ts
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { ReactNode } from 'react';
3
+ import { ReactNode, JSX } from 'react';
4
4
 
5
5
  type NavigationLinkProps = React.ComponentPropsWithoutRef<"a"> & {
6
6
  href: string;
@@ -26,6 +26,8 @@ interface NavigationGroup {
26
26
  }
27
27
  type NavigationItem = NavigationLink | NavigationGroup;
28
28
  interface NavigationProps extends Omit<React.ComponentPropsWithoutRef<"header">, "children" | "onSelect"> {
29
+ /** Omit empty landmarks and dismiss toolbar-only sheets on desktop crossing. */
30
+ omitEmptyNavigation?: boolean;
29
31
  brand: React.ReactNode;
30
32
  items: NavigationItem[];
31
33
  /** Translated landmark/dialog/close labels are supplied by the application. */
@@ -71,14 +73,16 @@ interface NaeilHeaderAccountControlProps {
71
73
  declare function NaeilHeaderAccountControl({ locale, account, Link }: NaeilHeaderAccountControlProps): react_jsx_runtime.JSX.Element;
72
74
 
73
75
  interface NaeilHeaderProps extends Omit<NavigationProps, "brand" | "items" | "toolbar" | "mobileToolbar" | "labels"> {
76
+ service?: undefined;
74
77
  locale: NaeilHeaderLocale;
75
78
  /** Resolve canonical unlocalized paths. Defaults to the official localized site. */
76
79
  resolveHref?: (path: string) => string;
77
80
  brandHref?: string;
81
+ /** @deprecated Owned services must use service; retained for compatibility. */
78
82
  brandSlot?: ReactNode;
79
- /** Ignored when brandSlot replaces the complete brand content. */
83
+ /** @deprecated Owned services must use service; retained for compatibility. Ignored with brandSlot. */
80
84
  brandSuffix?: string;
81
- /** After the brand link, outside it; rendered once at every width. */
85
+ /** @deprecated Owned services must use service with no indicator; retained for compatibility. */
82
86
  statusSlot?: ReactNode;
83
87
  /** Product menu data, after catalog/blog and before flat subNav links. */
84
88
  appNavigation?: NavigationItem[];
@@ -99,17 +103,32 @@ interface NaeilHeaderProps extends Omit<NavigationProps, "brand" | "items" | "to
99
103
  };
100
104
  showProjects?: boolean;
101
105
  showBlog?: boolean;
106
+ /** @deprecated Owned services must use service and appNavigation; retained for compatibility. */
102
107
  subNav?: Array<{
103
108
  label: string;
104
109
  href: string;
105
110
  }>;
106
111
  currentProjectKey?: string;
107
112
  currentProjectHref?: string;
108
- /** Compatibility escape hatch replacing the default theme/locale/auth toolbar. */
113
+ /** @deprecated Owned services must use service and authSlot; retained for compatibility. */
109
114
  toolbarSlot?: ReactNode;
110
- /** Compatibility escape hatch for the legacy native external brand link. */
115
+ /** @deprecated Owned services must use service and Link; retained for compatibility. */
111
116
  brandLinkComponent?: NavigationLinkComponent;
112
117
  }
118
+ /** Canonical owned-service identifiers; their spelling is the visible brand suffix. */
119
+ declare const naeilServices: readonly ["abstorm", "home", "estimate", "jev"];
120
+ type NaeilService = typeof naeilServices[number];
121
+ declare const serviceCompatibilityProps: readonly ["brandSuffix", "statusSlot", "brandSlot", "toolbarSlot", "subNav", "brandLinkComponent", "projects", "projectsExternal", "showProjects", "showBlog", "translations", "className", "containerClassName", "style", "brandLinkProps", "mobileFooter", "omitEmptyNavigation"];
122
+ type ServiceCompatibilityProp = typeof serviceCompatibilityProps[number];
123
+ /** Strict owned-service props; the legacy interface remains independently extensible. */
124
+ type NaeilServiceHeaderProps = Omit<NaeilHeaderProps, ServiceCompatibilityProp | "service"> & {
125
+ service: NaeilService;
126
+ } & {
127
+ [Prop in ServiceCompatibilityProp]?: never;
128
+ };
129
+ /** Opt into the owned-service contract without changing the legacy composition. */
130
+ declare function NaeilHeader(props: NaeilServiceHeaderProps): JSX.Element;
131
+ declare function NaeilHeader(props: NaeilHeaderProps): JSX.Element;
113
132
  /** The actual header theme control; reads only the consumer's theme provider. */
114
133
  declare function NaeilHeaderThemeControl({ locale }: {
115
134
  locale: NaeilHeaderLocale;
@@ -119,8 +138,6 @@ declare function NaeilHeaderLocaleControl({ locale, onLocaleChange }: {
119
138
  locale: NaeilHeaderLocale;
120
139
  onLocaleChange: (locale: NaeilHeaderLocale) => void;
121
140
  }): react_jsx_runtime.JSX.Element;
122
- /** One complete, opt-in branded composition shared by naeil.dev and applications. */
123
- declare function NaeilHeader({ locale, resolveHref, brandHref, brandSlot, brandSuffix, statusSlot, appNavigation, brandLinkProps, brandLinkComponent, onLocaleChange, authSlot, toolbarSlot, projects, projectsExternal, translations, showProjects, showBlog, subNav, currentProjectKey, currentProjectHref, labels, Link, currentHref, onNavigate, className, containerClassName, ...props }: NaeilHeaderProps): react_jsx_runtime.JSX.Element;
124
141
 
125
142
  interface SiteFooterProps extends React.ComponentPropsWithoutRef<"footer"> {
126
143
  brand?: React.ReactNode;
@@ -147,4 +164,4 @@ interface NaeilFooterProps extends Omit<SiteFooterProps, "brand" | "description"
147
164
  /** Canonical content in full/compact density. Product legal/status copy belongs in meta. */
148
165
  declare function NaeilFooter({ locale, resolveHref, variant, Link, onNavigate, ...props }: NaeilFooterProps): react_jsx_runtime.JSX.Element;
149
166
 
150
- export { NaeilFooter, type NaeilFooterLocale, type NaeilFooterProps, NaeilHeader, type NaeilHeaderAccount, NaeilHeaderAccountControl, type NaeilHeaderAccountControlProps, type NaeilHeaderLocale, NaeilHeaderLocaleControl, type NaeilHeaderProps, NaeilHeaderThemeControl };
167
+ export { NaeilFooter, type NaeilFooterLocale, type NaeilFooterProps, NaeilHeader, type NaeilHeaderAccount, NaeilHeaderAccountControl, type NaeilHeaderAccountControlProps, type NaeilHeaderLocale, NaeilHeaderLocaleControl, type NaeilHeaderProps, NaeilHeaderThemeControl, type NaeilService, type NaeilServiceHeaderProps, naeilServices };