@alfadocs/ui-kit-debug 0.15.1 → 0.17.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 (55) hide show
  1. package/dist/_chunks/benefit-card-DXmrAyfn.js +219 -0
  2. package/dist/_chunks/benefit-card-DXmrAyfn.js.map +1 -0
  3. package/dist/_chunks/copy-field-BCHAZ8QV.js +298 -0
  4. package/dist/_chunks/copy-field-BCHAZ8QV.js.map +1 -0
  5. package/dist/_chunks/{navigation-menu-Bav1d_wA.js → navigation-menu-DdufF-_4.js} +18 -18
  6. package/dist/_chunks/{navigation-menu-Bav1d_wA.js.map → navigation-menu-DdufF-_4.js.map} +1 -1
  7. package/dist/_chunks/{pagination-OQBlnb1H.js → pagination-F1ei4khE.js} +180 -158
  8. package/dist/_chunks/pagination-F1ei4khE.js.map +1 -0
  9. package/dist/_chunks/public-header.agent-sDi9N9su.js +562 -0
  10. package/dist/_chunks/public-header.agent-sDi9N9su.js.map +1 -0
  11. package/dist/agent-catalog.json +51 -1
  12. package/dist/components/benefit-card/benefit-card.d.ts +35 -0
  13. package/dist/components/benefit-card/benefit-card.d.ts.map +1 -0
  14. package/dist/components/benefit-card/index.d.ts +3 -0
  15. package/dist/components/benefit-card/index.d.ts.map +1 -0
  16. package/dist/components/benefit-card/index.js +5 -0
  17. package/dist/components/benefit-card/index.js.map +1 -0
  18. package/dist/components/card/card.d.ts +1 -1
  19. package/dist/components/copy-field/copy-field.agent.d.ts +16 -0
  20. package/dist/components/copy-field/copy-field.agent.d.ts.map +1 -0
  21. package/dist/components/copy-field/copy-field.d.ts +50 -0
  22. package/dist/components/copy-field/copy-field.d.ts.map +1 -0
  23. package/dist/components/copy-field/index.d.ts +5 -0
  24. package/dist/components/copy-field/index.d.ts.map +1 -0
  25. package/dist/components/copy-field/index.js +6 -0
  26. package/dist/components/copy-field/index.js.map +1 -0
  27. package/dist/components/index.d.ts +2 -0
  28. package/dist/components/index.d.ts.map +1 -1
  29. package/dist/components/navigation-menu/index.js +1 -1
  30. package/dist/components/pagination/index.js +1 -1
  31. package/dist/components/pagination/pagination.d.ts.map +1 -1
  32. package/dist/components/public-header/index.d.ts +1 -1
  33. package/dist/components/public-header/index.d.ts.map +1 -1
  34. package/dist/components/public-header/index.js +1 -1
  35. package/dist/components/public-header/public-header.d.ts +36 -1
  36. package/dist/components/public-header/public-header.d.ts.map +1 -1
  37. package/dist/components/stat/stat.d.ts +1 -1
  38. package/dist/hooks/use-controllable-state.d.ts +10 -0
  39. package/dist/hooks/use-controllable-state.d.ts.map +1 -0
  40. package/dist/hooks/use-copy-to-clipboard.d.ts +45 -0
  41. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  42. package/dist/i18n/config.js +21 -0
  43. package/dist/i18n/config.js.map +1 -1
  44. package/dist/i18n/resources.d.ts +21 -0
  45. package/dist/i18n/resources.d.ts.map +1 -1
  46. package/dist/index.js +458 -453
  47. package/dist/index.js.map +1 -1
  48. package/dist/locales/de.json +7 -0
  49. package/dist/locales/en.json +7 -0
  50. package/dist/locales/it.json +7 -0
  51. package/dist/tokens.css +1 -1
  52. package/package.json +9 -1
  53. package/dist/_chunks/pagination-OQBlnb1H.js.map +0 -1
  54. package/dist/_chunks/public-header.agent-ZLBAQ30j.js +0 -242
  55. package/dist/_chunks/public-header.agent-ZLBAQ30j.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as n, useRef as I, useState as k, useCallback as z, useMemo as C, useImperativeHandle as B } from "react";
3
3
  import * as o from "@radix-ui/react-navigation-menu";
4
- import { Slot as R } from "@radix-ui/react-slot";
5
- import { c as L } from "./index-D2ZczOXr.js";
4
+ import { Slot as L } from "@radix-ui/react-slot";
5
+ import { c as R } from "./index-D2ZczOXr.js";
6
6
  import { useTranslation as T } from "react-i18next";
7
7
  import { u as A } from "./use-direction-D6rvvG9G.js";
8
8
  import { u as K } from "./registry-C9nwlNyL.js";
@@ -77,18 +77,18 @@ const S = {
77
77
  className: t,
78
78
  children: a,
79
79
  id: i,
80
- value: c,
80
+ value: m,
81
81
  defaultValue: h,
82
- onValueChange: m,
82
+ onValueChange: c,
83
83
  ...b
84
84
  }, N) => {
85
- const { t: w } = T(), u = I(null), y = A(u), v = c !== void 0, [x, M] = k(
85
+ const { t: w } = T(), u = I(null), y = A(u), v = m !== void 0, [M, x] = k(
86
86
  h ?? ""
87
- ), r = v ? c : x, l = z(
87
+ ), r = v ? m : M, l = z(
88
88
  (d) => {
89
- v || M(d), m == null || m(d);
89
+ v || x(d), c == null || c(d);
90
90
  },
91
- [v, m]
91
+ [v, c]
92
92
  ), j = C(
93
93
  () => ({
94
94
  getActiveItem: () => r || null,
@@ -139,9 +139,9 @@ const D = [
139
139
  }
140
140
  ));
141
141
  H.displayName = "NavigationMenuList";
142
- const _ = n(({ navId: e, ...t }, a) => /* @__PURE__ */ s(o.Item, { ref: a, "data-nav-id": e, ...t }));
143
- _.displayName = "NavigationMenuItem";
144
- const P = [
142
+ const P = n(({ navId: e, ...t }, a) => /* @__PURE__ */ s(o.Item, { ref: a, "data-nav-id": e, ...t }));
143
+ P.displayName = "NavigationMenuItem";
144
+ const _ = [
145
145
  "ds:group ds:inline-flex ds:items-center ds:justify-center",
146
146
  "ds:min-h-[var(--min-target-size)]",
147
147
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-sm)]",
@@ -163,7 +163,7 @@ const P = [
163
163
  o.Trigger,
164
164
  {
165
165
  ref: i,
166
- className: [P, e].filter(Boolean).join(" "),
166
+ className: [_, e].filter(Boolean).join(" "),
167
167
  ...a,
168
168
  children: [
169
169
  t,
@@ -188,7 +188,7 @@ const F = [
188
188
  "ds:data-[motion=to-start]:slide-out-to-left-52 ds:rtl:data-[motion=to-start]:slide-out-to-right-52",
189
189
  "ds:data-[motion=to-end]:slide-out-to-right-52 ds:rtl:data-[motion=to-end]:slide-out-to-left-52",
190
190
  "ds:motion-reduce:animate-none"
191
- ].join(" "), G = L(F, {
191
+ ].join(" "), G = R(F, {
192
192
  variants: {
193
193
  layout: {
194
194
  simple: "ds:min-w-[16rem]",
@@ -220,14 +220,14 @@ const g = [
220
220
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
221
221
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
222
222
  "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
223
- ].join(" "), Q = n(({ asChild: e = !1, className: t, children: a, ...i }, c) => /* @__PURE__ */ s(
223
+ ].join(" "), Q = n(({ asChild: e = !1, className: t, children: a, ...i }, m) => /* @__PURE__ */ s(
224
224
  o.Link,
225
225
  {
226
- ref: c,
226
+ ref: m,
227
227
  asChild: e,
228
228
  className: e ? void 0 : [g, t].filter(Boolean).join(" "),
229
229
  ...i,
230
- children: e ? /* @__PURE__ */ s(R, { className: [g, t].filter(Boolean).join(" "), children: a }) : a
230
+ children: e ? /* @__PURE__ */ s(L, { className: [g, t].filter(Boolean).join(" "), children: a }) : a
231
231
  }
232
232
  ));
233
233
  Q.displayName = "NavigationMenuLink";
@@ -269,11 +269,11 @@ export {
269
269
  q as N,
270
270
  J as a,
271
271
  X as b,
272
- _ as c,
272
+ P as c,
273
273
  Q as d,
274
274
  H as e,
275
275
  E as f,
276
276
  f as g,
277
277
  S as n
278
278
  };
279
- //# sourceMappingURL=navigation-menu-Bav1d_wA.js.map
279
+ //# sourceMappingURL=navigation-menu-DdufF-_4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-menu-Bav1d_wA.js","sources":["../../src/components/navigation-menu/navigation-menu.agent.ts","../../src/components/navigation-menu/navigation-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — NavigationMenu. */\n/* */\n/* NavigationMenu is the primary top-bar navigation. It exposes the */\n/* currently-active item id (when the consumer routes through the kit), */\n/* the open/closed state of its dropdown, and lets an agent open, close, */\n/* or select a top-level item by id. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the full contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { NavigationMenuHandle } from './navigation-menu';\n\nexport const navigationMenuAgent: AgentAdapter<NavigationMenuHandle> = {\n id: 'navigation-menu',\n capabilities: ['select_single', 'navigate', 'open', 'close'],\n state: {\n activeItem: {\n type: 'string | null',\n descriptionKey: 'ui.agent.navigationMenu.state.activeItem',\n description:\n 'Id of the currently-active top-level navigation item, or null when none is active.',\n read: (handle) => handle.getActiveItem() ?? null,\n },\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.navigationMenu.state.isOpen',\n description: 'Whether a dropdown / mega-menu panel is currently open.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n descriptionKey: 'ui.agent.navigationMenu.actions.selectItem',\n description: 'Activate (open) the top-level item with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n open: {\n safety: 'read',\n argsType: '{ id: string }',\n descriptionKey: 'ui.agent.navigationMenu.actions.open',\n description:\n 'Open the dropdown / mega-menu panel for the given top-level item id.',\n invoke: (handle, args: { id: string }) => {\n handle.open(args.id);\n },\n },\n close: {\n safety: 'read',\n descriptionKey: 'ui.agent.navigationMenu.actions.close',\n description: 'Close any open dropdown / mega-menu panel.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'navigation-menu',\n description: 'Marks the NavigationMenu root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific menu from the agent.',\n },\n item: {\n attr: 'data-nav-id',\n description:\n 'Stable opaque id of a top-level navigation item. Selection / open targets this attribute.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type ElementRef,\n} from 'react';\nimport * as RadixNavigationMenu from '@radix-ui/react-navigation-menu';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronDown } from 'lucide-react';\nimport { useDirection } from '../_shared/use-direction';\n// SkipLink moved to its own module — re-imported for the navigation-menu\n// barrel's backwards-compat re-export. New consumers should import it\n// directly from `@alfadocs/ui-kit`.\nimport { SkipLink } from '../skip-link';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { navigationMenuAgent } from './navigation-menu.agent';\n\n/* -------------------------------------------------------------------- */\n/* Root */\n/* -------------------------------------------------------------------- */\n\nconst rootClasses = [\n 'ds:relative ds:z-[var(--z-dropdown)]',\n 'ds:flex ds:max-w-max ds:items-center ds:justify-center',\n].join(' ');\n\nexport interface NavigationMenuProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Root\n> {\n 'aria-label'?: string;\n /**\n * Consumer-supplied instance id, surfaced as `data-component-id` so an\n * agent / UI bridge can address this instance.\n */\n id?: string;\n}\n\n/**\n * Imperative handle for agent-readiness. Exposes the active top-level\n * item id + open/closed state, and lets external drivers select / open /\n * close panels by item id.\n */\nexport interface NavigationMenuHandle {\n getActiveItem: () => string | null;\n getIsOpen: () => boolean;\n selectItem: (id: string) => void;\n open: (id: string) => void;\n close: () => void;\n}\n\ntype NavigationMenuRootElement = ElementRef<typeof RadixNavigationMenu.Root>;\n\nconst NavigationMenu = forwardRef<\n NavigationMenuRootElement,\n NavigationMenuProps\n>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n children,\n id,\n value,\n defaultValue,\n onValueChange,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const rootRef = useRef<ElementRef<typeof RadixNavigationMenu.Root>>(null);\n const dir = useDirection(rootRef);\n\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<string>(\n defaultValue ?? '',\n );\n const activeValue = isControlled ? value : internalValue;\n\n const handleValueChange = useCallback(\n (next: string) => {\n if (!isControlled) setInternalValue(next);\n onValueChange?.(next);\n },\n [isControlled, onValueChange],\n );\n\n const handle = useMemo<NavigationMenuHandle>(\n () => ({\n getActiveItem: () => (activeValue ? activeValue : null),\n getIsOpen: () => Boolean(activeValue),\n selectItem: (nextId: string) => handleValueChange(nextId),\n open: (nextId: string) => handleValueChange(nextId),\n close: () => handleValueChange(''),\n }),\n [activeValue, handleValueChange],\n );\n useImperativeHandle(\n ref,\n () => rootRef.current as NavigationMenuRootElement,\n [],\n );\n useAgentRegistration(navigationMenuAgent, handle, id);\n\n return (\n <RadixNavigationMenu.Root\n ref={rootRef}\n dir={dir}\n aria-label={ariaLabel ?? t('navigation.nav.label')}\n className={[rootClasses, className].filter(Boolean).join(' ')}\n id={id}\n data-component=\"navigation-menu\"\n data-component-id={id}\n value={activeValue}\n onValueChange={handleValueChange}\n {...rest}\n >\n {children}\n <NavigationMenuViewport />\n </RadixNavigationMenu.Root>\n );\n },\n);\nNavigationMenu.displayName = 'NavigationMenu';\n\n/* -------------------------------------------------------------------- */\n/* List + Item */\n/* -------------------------------------------------------------------- */\n\nconst listClasses = [\n 'ds:group ds:flex ds:flex-1',\n 'ds:list-none ds:items-center ds:justify-center',\n 'ds:gap-[var(--spacing-xs)]',\n 'ds:m-0 ds:ps-0',\n].join(' ');\n\nconst NavigationMenuList = forwardRef<\n ElementRef<typeof RadixNavigationMenu.List>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.List>\n>(({ className, ...rest }, ref) => (\n <RadixNavigationMenu.List\n ref={ref}\n className={[listClasses, className].filter(Boolean).join(' ')}\n {...rest}\n />\n));\nNavigationMenuList.displayName = 'NavigationMenuList';\n\nexport interface NavigationMenuItemProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Item\n> {\n /**\n * Stable opaque id of this top-level item. When provided, emitted as\n * `data-nav-id` so an agent / UI bridge can target the item. Distinct\n * from Radix's internal `value`, which controls open-state matching;\n * pass the same string to both if you want them aligned.\n */\n navId?: string;\n}\n\nconst NavigationMenuItem = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Item>,\n NavigationMenuItemProps\n>(({ navId, ...rest }, ref) => (\n <RadixNavigationMenu.Item ref={ref} data-nav-id={navId} {...rest} />\n));\nNavigationMenuItem.displayName = 'NavigationMenuItem';\n\n/* -------------------------------------------------------------------- */\n/* Trigger */\n/* -------------------------------------------------------------------- */\n\nconst triggerClasses = [\n 'ds:group ds:inline-flex ds:items-center ds:justify-center',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-[var(--font-size-sm)] ds:font-[var(--font-weight-medium)]',\n 'ds:text-[var(--foreground)]',\n 'ds:hover:bg-[var(--muted)]/20',\n 'ds:data-[state=open]:bg-[var(--muted)]/20',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n 'ds:gap-[var(--spacing-xs)]',\n].join(' ');\n\nconst chevronClasses = [\n 'ds:size-3 ds:transition-transform ds:duration-[var(--animation-duration)]',\n 'ds:group-data-[state=open]:rotate-180',\n 'ds:rtl:-scale-x-100 ds:motion-reduce:transition-none',\n].join(' ');\n\nconst NavigationMenuTrigger = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Trigger>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Trigger>\n>(({ className, children, ...rest }, ref) => (\n <RadixNavigationMenu.Trigger\n ref={ref}\n className={[triggerClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n {children}\n <ChevronDown aria-hidden=\"true\" className={chevronClasses} />\n </RadixNavigationMenu.Trigger>\n));\nNavigationMenuTrigger.displayName = 'NavigationMenuTrigger';\n\n/* -------------------------------------------------------------------- */\n/* Content */\n/* -------------------------------------------------------------------- */\n\nconst contentBase = [\n 'ds:absolute ds:start-0 ds:top-0 ds:w-full',\n 'ds:md:w-auto',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:data-[motion^=from-]:animate-in ds:data-[motion^=to-]:animate-out',\n // Logical start/end motion mapped onto physical Tailwind animation utilities.\n // The `rtl:` variants mirror the slide direction so `from-start` enters from\n // the inline-start edge in both LTR and RTL.\n 'ds:data-[motion=from-start]:slide-in-from-left-52 ds:rtl:data-[motion=from-start]:slide-in-from-right-52',\n 'ds:data-[motion=from-end]:slide-in-from-right-52 ds:rtl:data-[motion=from-end]:slide-in-from-left-52',\n 'ds:data-[motion=to-start]:slide-out-to-left-52 ds:rtl:data-[motion=to-start]:slide-out-to-right-52',\n 'ds:data-[motion=to-end]:slide-out-to-right-52 ds:rtl:data-[motion=to-end]:slide-out-to-left-52',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst contentVariants = cva(contentBase, {\n variants: {\n layout: {\n simple: 'ds:min-w-[16rem]',\n mega: 'ds:grid ds:grid-cols-[repeat(auto-fit,minmax(12rem,1fr))] ds:gap-[var(--spacing-md)] ds:min-w-[32rem]',\n },\n },\n defaultVariants: { layout: 'simple' },\n});\n\nexport interface NavigationMenuContentProps\n extends\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Content>,\n VariantProps<typeof contentVariants> {}\n\nconst NavigationMenuContent = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Content>,\n NavigationMenuContentProps\n>(({ layout, className, ...rest }, ref) => (\n <RadixNavigationMenu.Content\n ref={ref}\n className={contentVariants({ layout, className })}\n {...rest}\n />\n));\nNavigationMenuContent.displayName = 'NavigationMenuContent';\n\n/* -------------------------------------------------------------------- */\n/* Link */\n/* -------------------------------------------------------------------- */\n\nconst linkClasses = [\n 'ds:block ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:py-[var(--spacing-xs)]',\n 'ds:text-[var(--font-size-sm)] ds:font-[var(--font-weight-medium)]',\n 'ds:text-[var(--foreground)]',\n 'ds:no-underline',\n 'ds:hover:bg-[var(--muted)]/20',\n 'ds:data-[active]:underline ds:data-[active]:underline-offset-[var(--spacing-xs)]',\n 'ds:aria-[current=page]:underline ds:aria-[current=page]:underline-offset-[var(--spacing-xs)]',\n 'ds:aria-[current=page]:font-[var(--font-weight-semibold)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n].join(' ');\n\nexport interface NavigationMenuLinkProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Link\n> {\n /** Render through Radix Slot so routers can inject their own link element. */\n asChild?: boolean;\n}\n\nconst NavigationMenuLink = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Link>,\n NavigationMenuLinkProps\n>(({ asChild = false, className, children, ...rest }, ref) => (\n <RadixNavigationMenu.Link\n ref={ref}\n asChild={asChild}\n className={\n asChild ? undefined : [linkClasses, className].filter(Boolean).join(' ')\n }\n {...rest}\n >\n {asChild ? (\n <Slot className={[linkClasses, className].filter(Boolean).join(' ')}>\n {children}\n </Slot>\n ) : (\n children\n )}\n </RadixNavigationMenu.Link>\n));\nNavigationMenuLink.displayName = 'NavigationMenuLink';\n\n/* -------------------------------------------------------------------- */\n/* Indicator + Viewport */\n/* -------------------------------------------------------------------- */\n\nconst indicatorClasses = [\n 'ds:top-full ds:z-[1] ds:flex ds:h-2 ds:items-end ds:justify-center ds:overflow-hidden',\n 'ds:data-[state=visible]:animate-in ds:data-[state=hidden]:animate-out',\n 'ds:data-[state=visible]:fade-in ds:data-[state=hidden]:fade-out',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst NavigationMenuIndicator = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Indicator>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Indicator>\n>(({ className, ...rest }, ref) => (\n <RadixNavigationMenu.Indicator\n ref={ref}\n className={[indicatorClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n <span className=\"ds:relative ds:top-[60%] ds:h-2 ds:w-2 ds:rotate-45 ds:rounded-tl-sm ds:bg-[var(--border)]\" />\n </RadixNavigationMenu.Indicator>\n));\nNavigationMenuIndicator.displayName = 'NavigationMenuIndicator';\n\nconst viewportClasses = [\n 'ds:origin-top-center ds:relative ds:mt-[var(--spacing-xs)]',\n 'ds:h-[var(--radix-navigation-menu-viewport-height)]',\n 'ds:w-full ds:overflow-hidden',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)]',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out',\n 'ds:data-[state=open]:zoom-in-90 ds:data-[state=closed]:zoom-out-95',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst NavigationMenuViewport = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Viewport>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Viewport>\n>(({ className, ...rest }, ref) => (\n <div className=\"ds:absolute ds:start-0 ds:top-full ds:flex ds:justify-center\">\n <RadixNavigationMenu.Viewport\n ref={ref}\n className={[viewportClasses, className].filter(Boolean).join(' ')}\n {...rest}\n />\n </div>\n));\nNavigationMenuViewport.displayName = 'NavigationMenuViewport';\n\n/* -------------------------------------------------------------------- */\n/* Exports */\n/* -------------------------------------------------------------------- */\n\nexport {\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuTrigger,\n NavigationMenuContent,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n SkipLink,\n};\n"],"names":["navigationMenuAgent","handle","args","rootClasses","NavigationMenu","forwardRef","ariaLabel","className","children","id","value","defaultValue","onValueChange","rest","ref","t","useTranslation","rootRef","useRef","dir","useDirection","isControlled","internalValue","setInternalValue","useState","activeValue","handleValueChange","useCallback","next","useMemo","nextId","useImperativeHandle","useAgentRegistration","jsxs","RadixNavigationMenu","NavigationMenuViewport","listClasses","NavigationMenuList","jsx","NavigationMenuItem","navId","triggerClasses","chevronClasses","NavigationMenuTrigger","ChevronDown","contentBase","contentVariants","cva","NavigationMenuContent","layout","linkClasses","NavigationMenuLink","asChild","Slot","indicatorClasses","NavigationMenuIndicator","viewportClasses"],"mappings":";;;;;;;;;AAcO,MAAMA,IAA0D;AAAA,EACrE,IAAI;AAAA,EACJ,cAAc,CAAC,iBAAiB,YAAY,QAAQ,OAAO;AAAA,EAC3D,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,mBAAmB;AAAA,IAAA;AAAA,IAE9C,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,IAEF,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,gB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AAA,EAAK,WAAU,6FAAA,CAA6F;AAAA,EAAA;AAC/G,CACD;AACDiB,EAAwB,cAAc;AAEtC,MAAMC,IAAkB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,GAAG,GAEJrB,IAAyB9B,EAG7B,CAAC,EAAE,WAAAE,GAAW,GAAGM,EAAA,GAAQC,MACzB,gBAAAwB,EAAC,OAAA,EAAI,WAAU,gEACb,UAAA,gBAAAA;AAAA,EAACJ,EAAoB;AAAA,EAApB;AAAA,IACC,KAAApB;AAAA,IACA,WAAW,CAAC0C,GAAiBjD,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IAC/D,GAAGM;AAAA,EAAA;AACN,GACF,CACD;AACDsB,EAAuB,cAAc;"}
1
+ {"version":3,"file":"navigation-menu-DdufF-_4.js","sources":["../../src/components/navigation-menu/navigation-menu.agent.ts","../../src/components/navigation-menu/navigation-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — NavigationMenu. */\n/* */\n/* NavigationMenu is the primary top-bar navigation. It exposes the */\n/* currently-active item id (when the consumer routes through the kit), */\n/* the open/closed state of its dropdown, and lets an agent open, close, */\n/* or select a top-level item by id. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the full contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { NavigationMenuHandle } from './navigation-menu';\n\nexport const navigationMenuAgent: AgentAdapter<NavigationMenuHandle> = {\n id: 'navigation-menu',\n capabilities: ['select_single', 'navigate', 'open', 'close'],\n state: {\n activeItem: {\n type: 'string | null',\n descriptionKey: 'ui.agent.navigationMenu.state.activeItem',\n description:\n 'Id of the currently-active top-level navigation item, or null when none is active.',\n read: (handle) => handle.getActiveItem() ?? null,\n },\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.navigationMenu.state.isOpen',\n description: 'Whether a dropdown / mega-menu panel is currently open.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n descriptionKey: 'ui.agent.navigationMenu.actions.selectItem',\n description: 'Activate (open) the top-level item with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n open: {\n safety: 'read',\n argsType: '{ id: string }',\n descriptionKey: 'ui.agent.navigationMenu.actions.open',\n description:\n 'Open the dropdown / mega-menu panel for the given top-level item id.',\n invoke: (handle, args: { id: string }) => {\n handle.open(args.id);\n },\n },\n close: {\n safety: 'read',\n descriptionKey: 'ui.agent.navigationMenu.actions.close',\n description: 'Close any open dropdown / mega-menu panel.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'navigation-menu',\n description: 'Marks the NavigationMenu root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific menu from the agent.',\n },\n item: {\n attr: 'data-nav-id',\n description:\n 'Stable opaque id of a top-level navigation item. Selection / open targets this attribute.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type ElementRef,\n} from 'react';\nimport * as RadixNavigationMenu from '@radix-ui/react-navigation-menu';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronDown } from 'lucide-react';\nimport { useDirection } from '../_shared/use-direction';\n// SkipLink moved to its own module — re-imported for the navigation-menu\n// barrel's backwards-compat re-export. New consumers should import it\n// directly from `@alfadocs/ui-kit`.\nimport { SkipLink } from '../skip-link';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { navigationMenuAgent } from './navigation-menu.agent';\n\n/* -------------------------------------------------------------------- */\n/* Root */\n/* -------------------------------------------------------------------- */\n\nconst rootClasses = [\n 'ds:relative ds:z-[var(--z-dropdown)]',\n 'ds:flex ds:max-w-max ds:items-center ds:justify-center',\n].join(' ');\n\nexport interface NavigationMenuProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Root\n> {\n 'aria-label'?: string;\n /**\n * Consumer-supplied instance id, surfaced as `data-component-id` so an\n * agent / UI bridge can address this instance.\n */\n id?: string;\n}\n\n/**\n * Imperative handle for agent-readiness. Exposes the active top-level\n * item id + open/closed state, and lets external drivers select / open /\n * close panels by item id.\n */\nexport interface NavigationMenuHandle {\n getActiveItem: () => string | null;\n getIsOpen: () => boolean;\n selectItem: (id: string) => void;\n open: (id: string) => void;\n close: () => void;\n}\n\ntype NavigationMenuRootElement = ElementRef<typeof RadixNavigationMenu.Root>;\n\nconst NavigationMenu = forwardRef<\n NavigationMenuRootElement,\n NavigationMenuProps\n>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n children,\n id,\n value,\n defaultValue,\n onValueChange,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const rootRef = useRef<ElementRef<typeof RadixNavigationMenu.Root>>(null);\n const dir = useDirection(rootRef);\n\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<string>(\n defaultValue ?? '',\n );\n const activeValue = isControlled ? value : internalValue;\n\n const handleValueChange = useCallback(\n (next: string) => {\n if (!isControlled) setInternalValue(next);\n onValueChange?.(next);\n },\n [isControlled, onValueChange],\n );\n\n const handle = useMemo<NavigationMenuHandle>(\n () => ({\n getActiveItem: () => (activeValue ? activeValue : null),\n getIsOpen: () => Boolean(activeValue),\n selectItem: (nextId: string) => handleValueChange(nextId),\n open: (nextId: string) => handleValueChange(nextId),\n close: () => handleValueChange(''),\n }),\n [activeValue, handleValueChange],\n );\n useImperativeHandle(\n ref,\n () => rootRef.current as NavigationMenuRootElement,\n [],\n );\n useAgentRegistration(navigationMenuAgent, handle, id);\n\n return (\n <RadixNavigationMenu.Root\n ref={rootRef}\n dir={dir}\n aria-label={ariaLabel ?? t('navigation.nav.label')}\n className={[rootClasses, className].filter(Boolean).join(' ')}\n id={id}\n data-component=\"navigation-menu\"\n data-component-id={id}\n value={activeValue}\n onValueChange={handleValueChange}\n {...rest}\n >\n {children}\n <NavigationMenuViewport />\n </RadixNavigationMenu.Root>\n );\n },\n);\nNavigationMenu.displayName = 'NavigationMenu';\n\n/* -------------------------------------------------------------------- */\n/* List + Item */\n/* -------------------------------------------------------------------- */\n\nconst listClasses = [\n 'ds:group ds:flex ds:flex-1',\n 'ds:list-none ds:items-center ds:justify-center',\n 'ds:gap-[var(--spacing-xs)]',\n 'ds:m-0 ds:ps-0',\n].join(' ');\n\nconst NavigationMenuList = forwardRef<\n ElementRef<typeof RadixNavigationMenu.List>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.List>\n>(({ className, ...rest }, ref) => (\n <RadixNavigationMenu.List\n ref={ref}\n className={[listClasses, className].filter(Boolean).join(' ')}\n {...rest}\n />\n));\nNavigationMenuList.displayName = 'NavigationMenuList';\n\nexport interface NavigationMenuItemProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Item\n> {\n /**\n * Stable opaque id of this top-level item. When provided, emitted as\n * `data-nav-id` so an agent / UI bridge can target the item. Distinct\n * from Radix's internal `value`, which controls open-state matching;\n * pass the same string to both if you want them aligned.\n */\n navId?: string;\n}\n\nconst NavigationMenuItem = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Item>,\n NavigationMenuItemProps\n>(({ navId, ...rest }, ref) => (\n <RadixNavigationMenu.Item ref={ref} data-nav-id={navId} {...rest} />\n));\nNavigationMenuItem.displayName = 'NavigationMenuItem';\n\n/* -------------------------------------------------------------------- */\n/* Trigger */\n/* -------------------------------------------------------------------- */\n\nconst triggerClasses = [\n 'ds:group ds:inline-flex ds:items-center ds:justify-center',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-[var(--font-size-sm)] ds:font-[var(--font-weight-medium)]',\n 'ds:text-[var(--foreground)]',\n 'ds:hover:bg-[var(--muted)]/20',\n 'ds:data-[state=open]:bg-[var(--muted)]/20',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n 'ds:gap-[var(--spacing-xs)]',\n].join(' ');\n\nconst chevronClasses = [\n 'ds:size-3 ds:transition-transform ds:duration-[var(--animation-duration)]',\n 'ds:group-data-[state=open]:rotate-180',\n 'ds:rtl:-scale-x-100 ds:motion-reduce:transition-none',\n].join(' ');\n\nconst NavigationMenuTrigger = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Trigger>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Trigger>\n>(({ className, children, ...rest }, ref) => (\n <RadixNavigationMenu.Trigger\n ref={ref}\n className={[triggerClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n {children}\n <ChevronDown aria-hidden=\"true\" className={chevronClasses} />\n </RadixNavigationMenu.Trigger>\n));\nNavigationMenuTrigger.displayName = 'NavigationMenuTrigger';\n\n/* -------------------------------------------------------------------- */\n/* Content */\n/* -------------------------------------------------------------------- */\n\nconst contentBase = [\n 'ds:absolute ds:start-0 ds:top-0 ds:w-full',\n 'ds:md:w-auto',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:data-[motion^=from-]:animate-in ds:data-[motion^=to-]:animate-out',\n // Logical start/end motion mapped onto physical Tailwind animation utilities.\n // The `rtl:` variants mirror the slide direction so `from-start` enters from\n // the inline-start edge in both LTR and RTL.\n 'ds:data-[motion=from-start]:slide-in-from-left-52 ds:rtl:data-[motion=from-start]:slide-in-from-right-52',\n 'ds:data-[motion=from-end]:slide-in-from-right-52 ds:rtl:data-[motion=from-end]:slide-in-from-left-52',\n 'ds:data-[motion=to-start]:slide-out-to-left-52 ds:rtl:data-[motion=to-start]:slide-out-to-right-52',\n 'ds:data-[motion=to-end]:slide-out-to-right-52 ds:rtl:data-[motion=to-end]:slide-out-to-left-52',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst contentVariants = cva(contentBase, {\n variants: {\n layout: {\n simple: 'ds:min-w-[16rem]',\n mega: 'ds:grid ds:grid-cols-[repeat(auto-fit,minmax(12rem,1fr))] ds:gap-[var(--spacing-md)] ds:min-w-[32rem]',\n },\n },\n defaultVariants: { layout: 'simple' },\n});\n\nexport interface NavigationMenuContentProps\n extends\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Content>,\n VariantProps<typeof contentVariants> {}\n\nconst NavigationMenuContent = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Content>,\n NavigationMenuContentProps\n>(({ layout, className, ...rest }, ref) => (\n <RadixNavigationMenu.Content\n ref={ref}\n className={contentVariants({ layout, className })}\n {...rest}\n />\n));\nNavigationMenuContent.displayName = 'NavigationMenuContent';\n\n/* -------------------------------------------------------------------- */\n/* Link */\n/* -------------------------------------------------------------------- */\n\nconst linkClasses = [\n 'ds:block ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:py-[var(--spacing-xs)]',\n 'ds:text-[var(--font-size-sm)] ds:font-[var(--font-weight-medium)]',\n 'ds:text-[var(--foreground)]',\n 'ds:no-underline',\n 'ds:hover:bg-[var(--muted)]/20',\n 'ds:data-[active]:underline ds:data-[active]:underline-offset-[var(--spacing-xs)]',\n 'ds:aria-[current=page]:underline ds:aria-[current=page]:underline-offset-[var(--spacing-xs)]',\n 'ds:aria-[current=page]:font-[var(--font-weight-semibold)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n].join(' ');\n\nexport interface NavigationMenuLinkProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Link\n> {\n /** Render through Radix Slot so routers can inject their own link element. */\n asChild?: boolean;\n}\n\nconst NavigationMenuLink = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Link>,\n NavigationMenuLinkProps\n>(({ asChild = false, className, children, ...rest }, ref) => (\n <RadixNavigationMenu.Link\n ref={ref}\n asChild={asChild}\n className={\n asChild ? undefined : [linkClasses, className].filter(Boolean).join(' ')\n }\n {...rest}\n >\n {asChild ? (\n <Slot className={[linkClasses, className].filter(Boolean).join(' ')}>\n {children}\n </Slot>\n ) : (\n children\n )}\n </RadixNavigationMenu.Link>\n));\nNavigationMenuLink.displayName = 'NavigationMenuLink';\n\n/* -------------------------------------------------------------------- */\n/* Indicator + Viewport */\n/* -------------------------------------------------------------------- */\n\nconst indicatorClasses = [\n 'ds:top-full ds:z-[1] ds:flex ds:h-2 ds:items-end ds:justify-center ds:overflow-hidden',\n 'ds:data-[state=visible]:animate-in ds:data-[state=hidden]:animate-out',\n 'ds:data-[state=visible]:fade-in ds:data-[state=hidden]:fade-out',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst NavigationMenuIndicator = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Indicator>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Indicator>\n>(({ className, ...rest }, ref) => (\n <RadixNavigationMenu.Indicator\n ref={ref}\n className={[indicatorClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n <span className=\"ds:relative ds:top-[60%] ds:h-2 ds:w-2 ds:rotate-45 ds:rounded-tl-sm ds:bg-[var(--border)]\" />\n </RadixNavigationMenu.Indicator>\n));\nNavigationMenuIndicator.displayName = 'NavigationMenuIndicator';\n\nconst viewportClasses = [\n 'ds:origin-top-center ds:relative ds:mt-[var(--spacing-xs)]',\n 'ds:h-[var(--radix-navigation-menu-viewport-height)]',\n 'ds:w-full ds:overflow-hidden',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)]',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out',\n 'ds:data-[state=open]:zoom-in-90 ds:data-[state=closed]:zoom-out-95',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst NavigationMenuViewport = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Viewport>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Viewport>\n>(({ className, ...rest }, ref) => (\n <div className=\"ds:absolute ds:start-0 ds:top-full ds:flex ds:justify-center\">\n <RadixNavigationMenu.Viewport\n ref={ref}\n className={[viewportClasses, className].filter(Boolean).join(' ')}\n {...rest}\n />\n </div>\n));\nNavigationMenuViewport.displayName = 'NavigationMenuViewport';\n\n/* -------------------------------------------------------------------- */\n/* Exports */\n/* -------------------------------------------------------------------- */\n\nexport {\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuTrigger,\n NavigationMenuContent,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n SkipLink,\n};\n"],"names":["navigationMenuAgent","handle","args","rootClasses","NavigationMenu","forwardRef","ariaLabel","className","children","id","value","defaultValue","onValueChange","rest","ref","t","useTranslation","rootRef","useRef","dir","useDirection","isControlled","internalValue","setInternalValue","useState","activeValue","handleValueChange","useCallback","next","useMemo","nextId","useImperativeHandle","useAgentRegistration","jsxs","RadixNavigationMenu","NavigationMenuViewport","listClasses","NavigationMenuList","jsx","NavigationMenuItem","navId","triggerClasses","chevronClasses","NavigationMenuTrigger","ChevronDown","contentBase","contentVariants","cva","NavigationMenuContent","layout","linkClasses","NavigationMenuLink","asChild","Slot","indicatorClasses","NavigationMenuIndicator","viewportClasses"],"mappings":";;;;;;;;;AAcO,MAAMA,IAA0D;AAAA,EACrE,IAAI;AAAA,EACJ,cAAc,CAAC,iBAAiB,YAAY,QAAQ,OAAO;AAAA,EAC3D,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,mBAAmB;AAAA,IAAA;AAAA,IAE9C,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,IAEF,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,QAAQ,CAACD,GAAQC,MAAyB;AACxC,QAAAD,EAAO,KAAKC,EAAK,EAAE;AAAA,MACrB;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACD,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;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