@brightlocal/ui-components 2.20.0 → 2.21.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 (45) hide show
  1. package/AI_USAGE.md +2 -0
  2. package/README.md +26 -13
  3. package/component-meta.json +20 -10
  4. package/dist/blocks/data-table.cjs +1 -1
  5. package/dist/blocks/data-table.d.ts.map +1 -1
  6. package/dist/blocks/data-table.js +14 -16
  7. package/dist/blocks/sidebar.cjs +1 -1
  8. package/dist/blocks/sidebar.d.ts +2 -2
  9. package/dist/blocks/sidebar.js +18 -18
  10. package/dist/breadcrumb.cjs +1 -1
  11. package/dist/breadcrumb.d.ts +1 -1
  12. package/dist/breadcrumb.d.ts.map +1 -1
  13. package/dist/breadcrumb.js +9 -6
  14. package/dist/button.cjs +1 -1
  15. package/dist/button.d.ts.map +1 -1
  16. package/dist/button.js +12 -12
  17. package/dist/logo.cjs +1 -1
  18. package/dist/logo.d.ts +1 -1
  19. package/dist/logo.js +2 -2
  20. package/dist/navigation-menu.cjs +1 -1
  21. package/dist/navigation-menu.d.ts +19 -0
  22. package/dist/navigation-menu.d.ts.map +1 -1
  23. package/dist/navigation-menu.js +134 -96
  24. package/dist/pagination.cjs +1 -1
  25. package/dist/pagination.d.ts +12 -8
  26. package/dist/pagination.d.ts.map +1 -1
  27. package/dist/pagination.js +117 -113
  28. package/dist/progress.cjs +1 -1
  29. package/dist/progress.d.ts +28 -2
  30. package/dist/progress.d.ts.map +1 -1
  31. package/dist/progress.js +90 -49
  32. package/dist/skeleton.cjs +1 -1
  33. package/dist/skeleton.js +1 -1
  34. package/dist/sonner.d.ts +1 -1
  35. package/package.json +7 -3
  36. package/src/blocks/data-table.tsx +0 -2
  37. package/src/blocks/sidebar.tsx +5 -5
  38. package/src/components/breadcrumb.tsx +6 -3
  39. package/src/components/button.tsx +7 -1
  40. package/src/components/logo.tsx +3 -3
  41. package/src/components/navigation-menu.tsx +134 -32
  42. package/src/components/pagination.tsx +47 -67
  43. package/src/components/progress.tsx +118 -14
  44. package/src/components/skeleton.tsx +1 -1
  45. package/src/components/sonner.tsx +1 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, jsxs as u, Fragment as M } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import { createPortal as q } from "react-dom";
4
- import { Slot as y } from "@radix-ui/react-slot";
4
+ import { Slot as S } from "@radix-ui/react-slot";
5
5
  import { cva as O } from "class-variance-authority";
6
6
  import { ChevronRight as E, Ellipsis as X, Minus as V, Plus as _, ChevronsUpDown as Y, ChevronDown as z, Menu as Z, PanelLeft as J } from "@brightlocal/icons";
7
7
  import { cn as l } from "@brightlocal/ui-components/lib/utils";
@@ -18,7 +18,7 @@ import { Skeleton as B } from "../skeleton.js";
18
18
  import { Tooltip as xe, TooltipTrigger as ve, TooltipContent as we, TooltipProvider as Ne } from "../tooltip.js";
19
19
  import { useIsBelowBreakpoint as ke } from "../hooks/use-breakpoint.js";
20
20
  const w = "focus-visible:[box-shadow:0_0_0_1px_color-mix(in_srgb,var(--color-sidebar-ring)_50%,transparent),0_0_0_3px_rgba(0,0,0,0.1)]";
21
- var Se = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(Se || {}), ye = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(ye || {}), Ce = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(Ce || {}), Re = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(Re || {}), Me = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(Me || {}), Ie = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(Ie || {}), De = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(De || {}), Ee = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(Ee || {}), Ae = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(Ae || {}), Oe = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(Oe || {});
21
+ var ye = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(ye || {}), Se = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(Se || {}), Ce = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(Ce || {}), Re = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(Re || {}), Me = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(Me || {}), Ie = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(Ie || {}), De = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(De || {}), Ee = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(Ee || {}), Ae = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(Ae || {}), Oe = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(Oe || {});
22
22
  const _e = "sidebar:state", ze = 3600 * 24 * 7, Pe = "224px", Te = "336px", Le = "48px", Be = "b", F = i.createContext(null);
23
23
  function k() {
24
24
  const e = i.useContext(F);
@@ -39,12 +39,12 @@ const He = i.forwardRef(
39
39
  children: m,
40
40
  ...h
41
41
  }, f) => {
42
- const p = ke("lg"), [c, x] = i.useState(!1), [g, I] = i.useState(null), [D, K] = i.useState(o), S = s ?? D, C = i.useCallback(
42
+ const p = ke("lg"), [c, x] = i.useState(!1), [g, I] = i.useState(null), [D, K] = i.useState(o), y = s ?? D, C = i.useCallback(
43
43
  (v) => {
44
- const N = typeof v == "function" ? v(S) : v;
44
+ const N = typeof v == "function" ? v(y) : v;
45
45
  n ? n(N) : K(N), document.cookie = `${_e}=${N}; path=/; max-age=${ze}`;
46
46
  },
47
- [n, S]
47
+ [n, y]
48
48
  ), R = i.useCallback(() => p ? x((v) => !v) : C((v) => !v), [p, C, x]);
49
49
  i.useEffect(() => {
50
50
  const v = (N) => {
@@ -52,10 +52,10 @@ const He = i.forwardRef(
52
52
  };
53
53
  return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
54
54
  }, [R]);
55
- const L = S ? "expanded" : "collapsed", W = i.useMemo(
55
+ const L = y ? "expanded" : "collapsed", W = i.useMemo(
56
56
  () => ({
57
57
  state: L,
58
- open: S,
58
+ open: y,
59
59
  setOpen: C,
60
60
  isMobile: p,
61
61
  openMobile: c,
@@ -66,7 +66,7 @@ const He = i.forwardRef(
66
66
  }),
67
67
  [
68
68
  L,
69
- S,
69
+ y,
70
70
  C,
71
71
  p,
72
72
  c,
@@ -183,14 +183,14 @@ const $ = i.forwardRef(
183
183
  children: s,
184
184
  ...n
185
185
  }, d) => {
186
- const { toggleSidebar: b } = k(), m = o ?? "Toggle Sidebar";
186
+ const { toggleSidebar: b } = k(), m = o ?? "Toggle sidebar";
187
187
  return /* @__PURE__ */ u(
188
188
  H,
189
189
  {
190
190
  ref: d,
191
191
  iconOnly: !0,
192
192
  "aria-label": m,
193
- className: l("h-7 w-7", e),
193
+ className: l("relative h-7 w-7", e),
194
194
  "data-slot": "sidebar-trigger",
195
195
  dataHook: r,
196
196
  size: "sm",
@@ -210,7 +210,7 @@ const $ = i.forwardRef(
210
210
  $.displayName = "SidebarTrigger";
211
211
  const $e = i.forwardRef(
212
212
  ({ className: e, toggleAriaLabel: t, ...r }, o) => {
213
- const { toggleSidebar: s } = k(), n = t ?? "Toggle Sidebar";
213
+ const { toggleSidebar: s } = k(), n = t ?? "Toggle sidebar";
214
214
  return /* @__PURE__ */ a(
215
215
  "button",
216
216
  {
@@ -415,7 +415,7 @@ const Ve = O(
415
415
  children: m,
416
416
  ...h
417
417
  }, f) => {
418
- const p = r ? y : "div", c = () => {
418
+ const p = r ? S : "div", c = () => {
419
419
  s === "collapsible" && d ? d() : s === "action" && b && b();
420
420
  }, x = (g) => {
421
421
  (g.key === "Enter" || g.key === " ") && (g.preventDefault(), c());
@@ -453,7 +453,7 @@ const Ve = O(
453
453
  );
454
454
  Ye.displayName = "SidebarGroupLabel";
455
455
  const Ze = i.forwardRef(({ className: e, asChild: t = !1, ...r }, o) => /* @__PURE__ */ a(
456
- t ? y : "button",
456
+ t ? S : "button",
457
457
  {
458
458
  ref: o,
459
459
  className: l(
@@ -583,7 +583,7 @@ const aa = O(
583
583
  dataHook: d,
584
584
  ...b
585
585
  }, m) => {
586
- const h = e ? y : "button", { isMobile: f, state: p } = k(), c = /* @__PURE__ */ a(
586
+ const h = e ? S : "button", { isMobile: f, state: p } = k(), c = /* @__PURE__ */ a(
587
587
  h,
588
588
  {
589
589
  ref: m,
@@ -621,7 +621,7 @@ const aa = O(
621
621
  );
622
622
  T.displayName = "SidebarMenuButton";
623
623
  const ta = i.forwardRef(({ className: e, asChild: t = !1, showOnHover: r = !1, ...o }, s) => /* @__PURE__ */ a(
624
- t ? y : "button",
624
+ t ? S : "button",
625
625
  {
626
626
  ref: s,
627
627
  className: l(
@@ -740,7 +740,7 @@ const ia = i.forwardRef(
740
740
  dataHook: s,
741
741
  ...n
742
742
  }, d) => /* @__PURE__ */ a(
743
- e ? y : "a",
743
+ e ? S : "a",
744
744
  {
745
745
  ref: d,
746
746
  className: l(
@@ -1119,9 +1119,9 @@ export {
1119
1119
  He as SidebarProvider,
1120
1120
  $e as SidebarRail,
1121
1121
  We as SidebarSeparator,
1122
- Se as SidebarSide,
1122
+ ye as SidebarSide,
1123
1123
  fa as SidebarSwitcher,
1124
1124
  $ as SidebarTrigger,
1125
- ye as SidebarVariant,
1125
+ Se as SidebarVariant,
1126
1126
  k as useSidebar
1127
1127
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),B=require("react"),x=require("@radix-ui/react-slot"),d=require("@brightlocal/icons"),o=require("@brightlocal/ui-components/lib/utils");function j(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const c=j(B),i=c.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:r,ariaLabel:t,...n},g)=>s.jsx("nav",{ref:g,"aria-label":t??"breadcrumb","data-hook":e,"data-slot":"breadcrumb","data-tracking-el":a,"data-tracking-label":r,...n}));i.displayName="Breadcrumb";const l=c.forwardRef(({className:e,...a},r)=>s.jsx("ol",{ref:r,className:o.cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),"data-slot":"breadcrumb-list",...a}));l.displayName="BreadcrumbList";const u=c.forwardRef(({className:e,...a},r)=>s.jsx("li",{ref:r,className:o.cn("inline-flex items-center gap-1.5",e),"data-slot":"breadcrumb-item",...a}));u.displayName="BreadcrumbItem";const m=c.forwardRef(({asChild:e,className:a,...r},t)=>{const n=e?x.Slot:"a";return s.jsx(n,{ref:t,className:o.cn("hover:text-foreground focus-visible:shadow-default rounded-sm transition-colors outline-none",a),"data-slot":"breadcrumb-link",...r})});m.displayName="BreadcrumbLink";const b=c.forwardRef(({className:e,...a},r)=>s.jsx("span",{ref:r,"aria-current":"page","aria-disabled":"true",className:o.cn("text-foreground font-normal",e),"data-slot":"breadcrumb-page",role:"link",...a}));b.displayName="BreadcrumbPage";const f=c.forwardRef(({children:e,className:a,...r},t)=>s.jsx("li",{ref:t,"aria-hidden":"true",className:a,"data-slot":"breadcrumb-separator",role:"presentation",...r,children:e??s.jsx(d.ChevronRight,{size:14})}));f.displayName="BreadcrumbSeparator";const p=c.forwardRef(({className:e,srLabel:a="More",...r},t)=>s.jsxs("span",{ref:t,"aria-hidden":"true",className:o.cn("flex size-9 items-center justify-center",e),"data-slot":"breadcrumb-ellipsis",role:"presentation",...r,children:[s.jsx(d.MoreHorizontal,{}),s.jsx("span",{className:"sr-only",children:a})]}));p.displayName="BreadcrumbEllipsis";exports.Breadcrumb=i;exports.BreadcrumbEllipsis=p;exports.BreadcrumbItem=u;exports.BreadcrumbLink=m;exports.BreadcrumbList=l;exports.BreadcrumbPage=b;exports.BreadcrumbSeparator=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),g=require("react"),x=require("@radix-ui/react-slot"),d=require("@brightlocal/icons"),o=require("@brightlocal/ui-components/lib/utils");function j(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const c=j(g),i=c.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:r,ariaLabel:t,...n},B)=>s.jsx("nav",{ref:B,"aria-label":t??"Breadcrumb","data-hook":e,"data-slot":"breadcrumb","data-tracking-el":a,"data-tracking-label":r,...n}));i.displayName="Breadcrumb";const l=c.forwardRef(({className:e,...a},r)=>s.jsx("ol",{ref:r,className:o.cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),"data-slot":"breadcrumb-list",...a}));l.displayName="BreadcrumbList";const u=c.forwardRef(({className:e,...a},r)=>s.jsx("li",{ref:r,className:o.cn("inline-flex items-center gap-1.5",e),"data-slot":"breadcrumb-item",...a}));u.displayName="BreadcrumbItem";const m=c.forwardRef(({asChild:e,className:a,...r},t)=>{const n=e?x.Slot:"a";return s.jsx(n,{ref:t,className:o.cn("hover:text-foreground focus-visible:shadow-default rounded-sm transition-colors outline-none",a),"data-slot":"breadcrumb-link",...r})});m.displayName="BreadcrumbLink";const b=c.forwardRef(({className:e,...a},r)=>s.jsx("span",{ref:r,"aria-current":"page","aria-disabled":"true",className:o.cn("text-foreground font-normal",e),"data-slot":"breadcrumb-page",role:"link",...a}));b.displayName="BreadcrumbPage";const f=c.forwardRef(({children:e,className:a,...r},t)=>s.jsx("li",{ref:t,"aria-hidden":"true",className:a,"data-slot":"breadcrumb-separator",role:"presentation",...r,children:e??s.jsx(d.ChevronRight,{size:14})}));f.displayName="BreadcrumbSeparator";const p=c.forwardRef(({className:e,srLabel:a="More",...r},t)=>s.jsxs("span",{ref:t,"aria-hidden":"true",className:o.cn("relative flex size-9 items-center justify-center",e),"data-slot":"breadcrumb-ellipsis",role:"presentation",...r,children:[s.jsx(d.MoreHorizontal,{}),s.jsx("span",{className:"sr-only",children:a})]}));p.displayName="BreadcrumbEllipsis";exports.Breadcrumb=i;exports.BreadcrumbEllipsis=p;exports.BreadcrumbItem=u;exports.BreadcrumbLink=m;exports.BreadcrumbList=l;exports.BreadcrumbPage=b;exports.BreadcrumbSeparator=f;
@@ -17,7 +17,7 @@ interface BreadcrumbProps extends React.ComponentProps<"nav"> {
17
17
  trackingLabel?: string;
18
18
  /**
19
19
  * Accessible label for the breadcrumb navigation.
20
- * @default "breadcrumb"
20
+ * @default "Breadcrumb"
21
21
  */
22
22
  ariaLabel?: string;
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumb.tsx"],"names":[],"mappings":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2
2
  import * as s from "react";
3
3
  import { Slot as n } from "@radix-ui/react-slot";
4
4
  import { MoreHorizontal as c, ChevronRight as u } from "@brightlocal/icons";
5
5
  import { cn as d } from "@brightlocal/ui-components/lib/utils";
6
6
  const b = s.forwardRef(
7
- ({ dataHook: r, trackingEl: a, trackingLabel: e, ariaLabel: o, ...i }, m) => /* @__PURE__ */ t(
7
+ ({ dataHook: r, trackingEl: a, trackingLabel: e, ariaLabel: o, ...i }, l) => /* @__PURE__ */ t(
8
8
  "nav",
9
9
  {
10
- ref: m,
11
- "aria-label": o ?? "breadcrumb",
10
+ ref: l,
11
+ "aria-label": o ?? "Breadcrumb",
12
12
  "data-hook": r,
13
13
  "data-slot": "breadcrumb",
14
14
  "data-tracking-el": a,
@@ -82,12 +82,15 @@ const N = s.forwardRef(({ children: r, className: a, ...e }, o) => /* @__PURE__
82
82
  }
83
83
  ));
84
84
  N.displayName = "BreadcrumbSeparator";
85
- const x = s.forwardRef(({ className: r, srLabel: a = "More", ...e }, o) => /* @__PURE__ */ l(
85
+ const x = s.forwardRef(({ className: r, srLabel: a = "More", ...e }, o) => /* @__PURE__ */ m(
86
86
  "span",
87
87
  {
88
88
  ref: o,
89
89
  "aria-hidden": "true",
90
- className: d("flex size-9 items-center justify-center", r),
90
+ className: d(
91
+ "relative flex size-9 items-center justify-center",
92
+ r
93
+ ),
91
94
  "data-slot": "breadcrumb-ellipsis",
92
95
  role: "presentation",
93
96
  ...e,
package/dist/button.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),O=require("react"),_=require("@radix-ui/react-slot"),z=require("class-variance-authority"),q=require("@brightlocal/icons"),x=require("@brightlocal/ui-components/lib/utils");function B(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=B(O),P=16,b=z.cva(["rounded-full","inline-flex","font-semibold","items-center","justify-center","gap-2","whitespace-nowrap","transition-[color,background-color,border-color,box-shadow,opacity]","duration-150","ease-in-out","cursor-pointer","disabled:pointer-events-none","disabled:cursor-not-allowed","disabled:opacity-50","aria-disabled:opacity-50","[&_svg]:pointer-events-none","[&_svg]:shrink-0","shrink-0","outline-none","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive"],{variants:{variant:{primary:["bg-primary","dark:bg-green-400","text-primary-foreground","dark:text-[var(--ds-colors-primary-foreground-light)]","hover:bg-primary/90","focus-visible:shadow-default"],secondary:["bg-secondary","text-secondary-foreground","hover:bg-secondary/80","focus-visible:shadow-default"],warning:["bg-warning-background","hover:bg-warning-background/80","text-warning-foreground","focus-visible:shadow-default"],destructive:["bg-destructive","dark:bg-red-400/90","hover:bg-destructive/80","dark:hover:bg-red-400/90","text-destructive-foreground","dark:text-red-950","focus-visible:shadow-destructive"],outline:["border","border-border","border-solid","bg-background","hover:bg-accent","hover:text-accent-foreground","dark:bg-input/30","dark:border-input","dark:hover:bg-input/80","dark:hover:border-input","focus-visible:shadow-default","focus-visible:border-ring"],ghost:["bg-transparent","text-foreground","hover:bg-accent","data-[state=open]:bg-accent","focus-visible:shadow-default"]},size:{default:"px-4 py-2 h-9 text-sm",sm:"py-2 px-3 h-8 text-xs",lg:"py-2 px-8 h-10 text-sm [&_svg:not([class*='size-'])]:size-5"},state:{default:"",loading:"pointer-events-none",disabled:"pointer-events-none opacity-50"},fullWidth:{false:"",true:"w-full"}},defaultVariants:{variant:"primary",size:"default",state:"default",fullWidth:!1}}),k=c.forwardRef(({className:e,variant:t="primary",size:r="default",fullWidth:o=!1,asChild:l=!1,dataHook:f,trackingEl:g,trackingLabel:v,iconOnly:w=!1,loading:n=!1,ariaLabel:j,disabled:p=!1,children:a,...u},y)=>{const h=l?_.Slot:"button",m=p||n;let i=w;!i&&c.Children.count(a)===1&&c.isValidElement(a)&&(i=a.props?.children==null);const S=n&&!l;let s="default";n?s="loading":p&&(s="disabled");const N=j??(n?`Loading: ${a||"Please wait"}`:void 0);return l?d.jsx(h,{ref:y,className:x.cn(b({variant:t,size:r,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,...u,children:a}):d.jsxs(h,{ref:y,"aria-busy":n?"true":void 0,"aria-disabled":m?"true":void 0,"aria-label":N,className:x.cn(b({variant:t,size:r,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,disabled:m,type:u.type??"button",...u,children:[S&&d.jsx("div",{className:"pointer-events-none flex items-center justify-center","data-slot":"button-loading-icon",children:d.jsx(q.Loader2,{className:"animate-spin",size:P})}),a]})});k.displayName="Button";exports.Button=k;exports.ButtonVariants=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),O=require("react"),_=require("@radix-ui/react-slot"),z=require("class-variance-authority"),q=require("@brightlocal/icons"),x=require("@brightlocal/ui-components/lib/utils");function B(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const c=B(O),P=16,b=z.cva(["rounded-full","inline-flex","font-semibold","items-center","justify-center","gap-2","whitespace-nowrap","transition-[color,background-color,border-color,box-shadow,opacity]","duration-150","ease-in-out","cursor-pointer","disabled:pointer-events-none","disabled:cursor-not-allowed","disabled:opacity-50","aria-disabled:opacity-50","[&_svg]:pointer-events-none","[&_svg]:shrink-0","shrink-0","outline-none","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive"],{variants:{variant:{primary:["bg-primary","dark:bg-green-400","text-primary-foreground","dark:text-[var(--ds-colors-primary-foreground-light)]","hover:bg-primary/90","focus-visible:shadow-default"],secondary:["bg-secondary","text-secondary-foreground","hover:bg-secondary/80","focus-visible:shadow-default"],warning:["bg-warning-background","hover:bg-warning-background/80","text-warning-foreground","focus-visible:shadow-default"],destructive:["bg-destructive","dark:bg-red-400/90","hover:bg-destructive/80","dark:hover:bg-red-400/90","text-destructive-foreground","dark:text-red-950","focus-visible:shadow-destructive"],outline:["border","border-border","border-solid","bg-background","hover:bg-accent","hover:text-accent-foreground","dark:bg-input/30","dark:border-input","dark:hover:bg-input/80","dark:hover:border-input","focus-visible:shadow-default","focus-visible:border-ring"],ghost:["bg-transparent","text-foreground","hover:bg-accent","data-[state=open]:bg-accent","focus-visible:shadow-default"]},size:{default:"px-4 py-2 h-9 text-sm",sm:"py-2 px-3 h-8 text-xs",lg:"py-2 px-8 h-10 text-sm [&_svg:not([class*='size-'])]:size-5"},state:{default:"",loading:"pointer-events-none",disabled:"pointer-events-none opacity-50"},fullWidth:{false:"",true:"w-full"}},defaultVariants:{variant:"primary",size:"default",state:"default",fullWidth:!1}}),k=c.forwardRef(({className:e,variant:t="primary",size:a="default",fullWidth:o=!1,asChild:l=!1,dataHook:f,trackingEl:g,trackingLabel:v,iconOnly:w=!1,loading:n=!1,ariaLabel:j,disabled:p=!1,children:r,...u},y)=>{const h=l?_.Slot:"button",m=p||n;let i=w;!i&&c.Children.count(r)===1&&c.isValidElement(r)&&(i=r.props?.children==null);const S=n&&!l;let s="default";n?s="loading":p&&(s="disabled");const N=j??(n?typeof r=="string"||typeof r=="number"?`Loading: ${r}`:"Loading":void 0);return l?d.jsx(h,{ref:y,className:x.cn(b({variant:t,size:a,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,...u,children:r}):d.jsxs(h,{ref:y,"aria-busy":n?"true":void 0,"aria-disabled":m?"true":void 0,"aria-label":N,className:x.cn(b({variant:t,size:a,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,disabled:m,type:u.type??"button",...u,children:[S&&d.jsx("div",{className:"pointer-events-none flex items-center justify-center","data-slot":"button-loading-icon",children:d.jsx(q.Loader2,{className:"animate-spin",size:P})}),r]})});k.displayName="Button";exports.Button=k;exports.ButtonVariants=b;
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;GAEG;AACH,KAAK,kBAAkB,GAAG;IACxB;;;OAGG;IACH,OAAO,CAAC,EACJ,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC;AAEvE,QAAA,MAAM,cAAc;;;;;8EAqGnB,CAAC;AAEF;;GAEG;AACH,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AAEtE,KAAK,WAAW,GAAG,iBAAiB,GAClC,kBAAkB,GAAG;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MA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AAIF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AAElC,YAAY,EAAE,WAAW,EAAE,CAAC"}
package/dist/button.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx as s, jsxs as S } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { Slot as _ } from "@radix-ui/react-slot";
4
- import { cva as j } from "class-variance-authority";
5
- import { Loader2 as B } from "@brightlocal/icons";
6
- import { cn as y } from "@brightlocal/ui-components/lib/utils";
7
- const I = 16, x = j(
3
+ import { Slot as I } from "@radix-ui/react-slot";
4
+ import { cva as _ } from "class-variance-authority";
5
+ import { Loader2 as j } from "@brightlocal/icons";
6
+ import { cn as h } from "@brightlocal/ui-components/lib/utils";
7
+ const B = 16, x = _(
8
8
  [
9
9
  "rounded-full",
10
10
  "inline-flex",
@@ -122,18 +122,18 @@ const I = 16, x = j(
122
122
  children: e,
123
123
  ...n
124
124
  }, v) => {
125
- const m = i ? _ : "button", h = p || t;
125
+ const m = i ? I : "button", y = p || t;
126
126
  let a = k;
127
127
  !a && d.Children.count(e) === 1 && d.isValidElement(e) && (a = e.props?.children == null);
128
128
  const N = t && !i;
129
129
  let o = "default";
130
130
  t ? o = "loading" : p && (o = "disabled");
131
- const z = w ?? (t ? `Loading: ${e || "Please wait"}` : void 0);
131
+ const z = w ?? (t ? typeof e == "string" || typeof e == "number" ? `Loading: ${e}` : "Loading" : void 0);
132
132
  return i ? /* @__PURE__ */ s(
133
133
  m,
134
134
  {
135
135
  ref: v,
136
- className: y(
136
+ className: h(
137
137
  x({
138
138
  variant: r,
139
139
  size: u,
@@ -155,9 +155,9 @@ const I = 16, x = j(
155
155
  {
156
156
  ref: v,
157
157
  "aria-busy": t ? "true" : void 0,
158
- "aria-disabled": h ? "true" : void 0,
158
+ "aria-disabled": y ? "true" : void 0,
159
159
  "aria-label": z,
160
- className: y(
160
+ className: h(
161
161
  x({
162
162
  variant: r,
163
163
  size: u,
@@ -171,7 +171,7 @@ const I = 16, x = j(
171
171
  "data-slot": "button",
172
172
  "data-tracking-el": f || `button-${r}`,
173
173
  "data-tracking-label": g,
174
- disabled: h,
174
+ disabled: y,
175
175
  type: n.type ?? "button",
176
176
  ...n,
177
177
  children: [
@@ -180,7 +180,7 @@ const I = 16, x = j(
180
180
  {
181
181
  className: "pointer-events-none flex items-center justify-center",
182
182
  "data-slot": "button-loading-icon",
183
- children: /* @__PURE__ */ s(B, { className: "animate-spin", size: I })
183
+ children: /* @__PURE__ */ s(j, { className: "animate-spin", size: B })
184
184
  }
185
185
  ),
186
186
  e
package/dist/logo.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),n=require("class-variance-authority"),H=require("@brightlocal/ui-components/lib/utils"),s=n.cva("inline-flex text-brand-primary-foreground",{variants:{variant:{logotype:"h-6",mark:"w-6 h-6"}},defaultVariants:{variant:"logotype"}});function l({className:t,variant:o="logotype",dataHook:r,ariaLabel:e,trackingEl:i,trackingLabel:a,...V}){return C.jsxs("div",{className:H.cn(s({variant:o}),t),"data-hook":r,"data-slot":"logo","data-tracking-el":i,"data-tracking-label":a,"data-variant":o,...V,children:[o==="logotype"&&C.jsx("svg",{"aria-label":e??"BrightLocal Logo",fill:"none",height:"24",role:"img",viewBox:"0 0 128 24",width:"128",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{clipRule:"evenodd",d:"M45.283 4.22403C46.4897 4.22403 47.4227 3.29104 47.4227 2.1397C47.4227 0.988358 46.4907 0 45.283 0C44.186 0 43.1986 0.987313 43.1986 2.1397C43.1986 3.29209 44.1316 4.22403 45.283 4.22403ZM43.5821 6.19866V17.8824H47.0382V6.19866H43.5821ZM25.3163 7.62478C26.1939 6.52776 27.4006 5.97925 28.8821 5.97925C30.5276 5.97925 31.844 6.58209 32.8867 7.84418C33.9294 9.0509 34.4225 10.477 34.4225 12.0682C34.4225 13.6594 33.874 15.0855 32.8313 16.2922C31.7343 17.499 30.4179 18.1572 28.7724 18.1572C27.2366 18.1572 26.0298 17.6087 25.2066 16.5116H25.1512V17.9378H21.8048V0.357313H25.2055V7.62478H25.3163ZM26.0842 14.2069C26.6327 14.7554 27.3463 15.0302 28.1685 15.0302C28.9907 15.0302 29.7043 14.7554 30.2528 14.2069C30.8013 13.6584 31.0761 12.8904 31.0761 12.0128C31.0761 11.1352 30.8013 10.4216 30.1985 9.87314C29.65 9.32463 28.9364 9.04985 28.1142 9.04985C27.2919 9.04985 26.6327 9.32463 26.0842 9.87314C25.5357 10.4216 25.2619 11.1352 25.2619 12.0128C25.2066 12.8904 25.5357 13.604 26.0842 14.2069ZM42.6501 9.54508C42.6313 9.5409 42.6136 9.53776 42.5958 9.53463V6.19866C42.4307 6.08896 42.2113 6.08896 41.9376 6.08896C40.4018 6.08896 39.1397 6.91224 38.6466 8.00926V6.19866H35.2458V17.8824H38.6466V12.9458C38.6466 10.8615 39.6339 9.4897 41.8279 9.4897C42.0839 9.4897 42.3398 9.4897 42.5958 9.53463V9.54508H42.6501ZM51.0418 18.8143C51.7 20.1307 52.7427 20.789 54.1688 20.789C55.924 20.789 57.1307 19.856 57.1307 18.0464V16.2912H57.0754C56.2521 17.3328 55.1551 17.827 53.7289 17.827C52.0834 17.827 50.7116 17.2785 49.67 16.1261C48.6273 15.0291 48.0788 13.603 48.0788 11.9575C48.0788 10.4216 48.573 8.99552 49.6146 7.84313C50.6573 6.63642 51.9737 6.03254 53.6192 6.03254C55.1007 6.03254 56.2521 6.58105 57.1851 7.62373H57.2404V6.19761H60.5869V17.9357C60.5869 19.7463 59.984 21.1724 58.8316 22.214C57.6803 23.2567 56.1434 23.7499 54.2785 23.7499C51.3709 23.7499 49.3963 22.6528 48.3546 20.4034L51.0428 18.8122V18.8143H51.0418ZM54.3328 9.0509C52.7416 9.0509 51.4806 10.2576 51.4806 11.9031C51.4806 13.6584 52.6873 14.8107 54.3328 14.8107C55.9784 14.8107 57.1851 13.6594 57.1851 11.9031C57.1851 10.2576 55.9784 9.0509 54.3328 9.0509ZM69.3076 11.41V17.9378H72.654V10.6421C72.654 9.32567 72.2706 8.22866 71.557 7.35105C70.8434 6.41806 69.8018 5.97925 68.3757 5.97925C67.9369 5.97925 67.3884 6.08896 66.7301 6.30836C66.1273 6.52776 65.6331 6.96657 65.1943 7.57045V0.357313H61.7936V17.8824H65.1943V11.3546C65.1943 10.0925 65.9079 9.10522 67.2786 9.10522C68.6494 9.10522 69.3086 10.0925 69.3086 11.409L69.3076 11.41ZM81.5952 17.827C81.1021 17.991 80.5536 18.0464 80.004 18.0464C76.9324 18.0464 75.3422 16.4009 75.3422 13.6584V9.1606H73.2579V6.19866H75.3976V2.52313H78.7983V6.19866H81.706V9.1606H78.7983V13.2196C78.7983 14.536 79.5119 15.0845 80.8284 15.0845C81.1031 15.0845 81.3769 15.0845 81.5963 14.9748V17.827H81.5952ZM82.8009 17.8824H86.257V0.357313H82.8009V17.8824ZM89.1092 7.73448C90.3713 6.52776 91.9061 5.97925 93.6613 5.97925C95.4166 5.97925 96.9524 6.58314 98.1591 7.73448C99.3658 8.88582 100.024 10.313 100.024 12.0682C100.024 13.8234 99.4212 15.3049 98.1591 16.4563C96.8981 17.6076 95.4166 18.2115 93.607 18.2115C91.7975 18.2115 90.316 17.663 89.0539 16.4563C87.8472 15.3039 87.1889 13.8778 87.1889 12.1225C87.2433 10.3673 87.8472 8.88582 89.1082 7.73448H89.1092ZM91.5781 14.2069C92.1266 14.7554 92.8401 15.0302 93.6624 15.0302C95.3079 15.0302 96.5146 13.7681 96.5146 12.0128C96.5146 11.1352 96.2399 10.4216 95.6913 9.87314C95.1428 9.32463 94.4303 8.99552 93.607 8.99552C92.7837 8.99552 92.1266 9.2703 91.577 9.87314C91.0285 10.4216 90.7537 11.1352 90.7537 12.0128C90.6994 12.8904 91.0285 13.604 91.577 14.2069H91.5781ZM100.519 12.1225C100.519 13.8778 101.068 15.3039 102.274 16.4563C103.481 17.6076 104.962 18.1572 106.772 18.2115C109.405 18.2115 111.545 16.9494 112.422 14.5913L109.405 13.3293C108.912 14.536 108.033 15.0845 106.827 15.0845C105.181 15.0845 104.03 13.8778 104.03 12.1225C104.03 10.3673 105.236 9.1606 106.827 9.1606C107.979 9.1606 108.857 9.76448 109.35 10.9158L112.366 9.65373C111.598 7.35 109.458 6.03358 106.827 6.03358C105.126 6.03358 103.591 6.58209 102.383 7.78881C101.122 8.9412 100.518 10.3673 100.518 12.1225H100.519ZM113.957 17.1688C113.189 16.5106 112.805 15.6873 112.805 14.6457V14.5903C112.805 13.2185 113.463 12.1769 114.561 11.6827C115.658 11.1885 116.755 10.9691 118.016 10.9691H119.169C119.772 10.9691 120.101 10.6943 120.101 10.0915C120.101 9.26821 119.443 8.66537 118.237 8.66537C117.03 8.66537 116.207 9.21388 115.658 10.2566L113.025 8.72075C114.013 6.85582 115.822 5.92284 118.401 5.92284C121.472 5.92284 123.501 7.56836 123.501 10.64V17.8803H120.32V16.4542H120.266C119.498 17.5512 118.291 18.1551 116.755 18.1551C115.658 18.0997 114.725 17.826 113.957 17.1678V17.1688ZM120.101 13.3846V13.1099H118.017C117.03 13.1099 116.262 13.5487 116.262 14.4263C116.262 15.1942 116.865 15.633 117.743 15.633C119.224 15.633 120.101 14.6457 120.101 13.3836V13.3846ZM124.544 17.8824H128V0.357313H124.544V17.8824ZM4.85535 6.85582C5.51356 6.85582 6.04953 7.39179 6.04953 8.05C6.04953 8.70821 5.51356 9.24418 4.85535 9.24418C4.19714 9.24418 3.66118 8.70821 3.66118 8.05C3.66118 7.39179 4.19714 6.85582 4.85535 6.85582ZM4.85535 5.80269C3.61311 5.80269 2.60699 6.80881 2.60699 8.05105C2.60699 9.29328 3.61311 10.2994 4.85535 10.2994C6.09759 10.2994 7.10371 9.29328 7.10371 8.05105C7.10371 6.80881 6.09759 5.80269 4.85535 5.80269ZM14.7943 3.65358C12.5982 2.62761 10.1064 3.37776 8.78685 5.21134C7.87267 3.94403 6.40476 3.1897 4.85431 3.1897C4.18565 3.1897 3.50446 3.32866 2.84729 3.62433C0.781771 4.55627 -0.378975 6.88299 0.112069 9.09582C0.324159 10.0528 0.798487 10.8563 1.4264 11.4831L8.20804 18.2763C8.52983 18.5981 9.05222 18.5981 9.37506 18.2763L16.1567 11.4831C16.8609 10.781 17.3707 9.85537 17.5368 8.74164C17.8471 6.65 16.7115 4.54687 14.7964 3.65254L14.7943 3.65358ZM2.17237 10.734C1.77326 10.336 1.47446 9.87 1.28431 9.34866C0.937444 8.39582 0.982368 7.36358 1.41073 6.44314C1.83908 5.52373 2.60073 4.82687 3.55461 4.47896C3.97461 4.32642 4.41237 4.2491 4.85431 4.2491C6.27521 4.2491 7.60729 5.07761 8.24774 6.35955L8.26759 6.39925L8.25192 6.44105C8.01894 7.08881 7.93222 7.77 7.99282 8.46582L8.76177 17.3349L2.17132 10.734H2.17237ZM14.4454 8.05C14.4454 9.00075 13.6754 9.77075 12.7246 9.77075C11.7739 9.77075 11.0039 9.00075 11.0039 8.05C11.0039 7.09926 11.7739 6.32926 12.7246 6.32926C13.6754 6.32926 14.4454 7.09926 14.4454 8.05Z",fill:"currentColor",fillRule:"evenodd"})}),o==="mark"&&C.jsxs("svg",{"aria-label":e??"BrightLocal Logo",fill:"none",height:"21",role:"img",viewBox:"0 0 24 21",width:"24",xmlns:"http://www.w3.org/2000/svg",children:[C.jsx("path",{d:"M6.62559 5.00277C7.52378 5.00277 8.25516 5.73415 8.25516 6.63234C8.25516 7.53053 7.52378 8.26191 6.62559 8.26191C5.7274 8.26191 4.99602 7.53053 4.99602 6.63234C4.99602 5.73415 5.7274 5.00277 6.62559 5.00277ZM6.62559 3.56424C4.93044 3.56424 3.5575 4.93719 3.5575 6.63234C3.5575 8.32749 4.93044 9.70043 6.62559 9.70043C8.32074 9.70043 9.69369 8.32749 9.69369 6.63234C9.69369 4.93719 8.32074 3.56424 6.62559 3.56424Z",fill:"currentColor"}),C.jsx("path",{clipRule:"evenodd",d:"M20.1882 0.633009C17.1914 -0.767024 13.7911 0.256626 11.9905 2.75872C10.743 1.02935 8.73989 0 6.62416 0C5.71172 0 4.78216 0.189618 3.8854 0.593089C1.0668 1.86481 -0.517148 5.03983 0.152929 8.05946C0.442345 9.36539 1.08961 10.4618 1.94645 11.3172L11.2006 20.587C11.6398 21.0262 12.3526 21.0262 12.7931 20.587L22.0473 11.3172C23.0083 10.3591 23.704 9.09594 23.9307 7.57615C24.3541 4.7219 22.8044 1.85198 20.1911 0.631583L20.1882 0.633009ZM2.96583 10.2949C2.42121 9.75176 2.01346 9.1159 1.75399 8.40448C1.28065 7.10424 1.34196 5.69565 1.92649 4.43962C2.51103 3.185 3.55036 2.23407 4.85202 1.75931C5.42515 1.55116 6.02252 1.44566 6.62559 1.44566C8.56453 1.44566 10.3823 2.57623 11.2562 4.32556L11.2833 4.37974L11.262 4.43677C10.944 5.3207 10.8257 6.25025 10.9084 7.19976L11.9577 19.3025L2.9644 10.2949H2.96583ZM19.712 6.63091C19.712 7.92829 18.6613 8.97903 17.3639 8.97903C16.0665 8.97903 15.0158 7.92829 15.0158 6.63091C15.0158 5.33353 16.0665 4.28279 17.3639 4.28279C18.6613 4.28279 19.712 5.33353 19.712 6.63091Z",fill:"currentColor",fillRule:"evenodd"})]})]})}l.displayName="Logo";exports.Logo=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),n=require("class-variance-authority"),H=require("@brightlocal/ui-components/lib/utils"),s=n.cva("inline-flex text-brand-primary-foreground",{variants:{variant:{logotype:"h-6",mark:"w-6 h-6"}},defaultVariants:{variant:"logotype"}});function e({className:t,variant:l="logotype",dataHook:r,ariaLabel:o,trackingEl:i,trackingLabel:a,...V}){return C.jsxs("div",{className:H.cn(s({variant:l}),t),"data-hook":r,"data-slot":"logo","data-tracking-el":i,"data-tracking-label":a,"data-variant":l,...V,children:[l==="logotype"&&C.jsx("svg",{"aria-label":o??"BrightLocal logo",fill:"none",height:"24",role:"img",viewBox:"0 0 128 24",width:"128",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{clipRule:"evenodd",d:"M45.283 4.22403C46.4897 4.22403 47.4227 3.29104 47.4227 2.1397C47.4227 0.988358 46.4907 0 45.283 0C44.186 0 43.1986 0.987313 43.1986 2.1397C43.1986 3.29209 44.1316 4.22403 45.283 4.22403ZM43.5821 6.19866V17.8824H47.0382V6.19866H43.5821ZM25.3163 7.62478C26.1939 6.52776 27.4006 5.97925 28.8821 5.97925C30.5276 5.97925 31.844 6.58209 32.8867 7.84418C33.9294 9.0509 34.4225 10.477 34.4225 12.0682C34.4225 13.6594 33.874 15.0855 32.8313 16.2922C31.7343 17.499 30.4179 18.1572 28.7724 18.1572C27.2366 18.1572 26.0298 17.6087 25.2066 16.5116H25.1512V17.9378H21.8048V0.357313H25.2055V7.62478H25.3163ZM26.0842 14.2069C26.6327 14.7554 27.3463 15.0302 28.1685 15.0302C28.9907 15.0302 29.7043 14.7554 30.2528 14.2069C30.8013 13.6584 31.0761 12.8904 31.0761 12.0128C31.0761 11.1352 30.8013 10.4216 30.1985 9.87314C29.65 9.32463 28.9364 9.04985 28.1142 9.04985C27.2919 9.04985 26.6327 9.32463 26.0842 9.87314C25.5357 10.4216 25.2619 11.1352 25.2619 12.0128C25.2066 12.8904 25.5357 13.604 26.0842 14.2069ZM42.6501 9.54508C42.6313 9.5409 42.6136 9.53776 42.5958 9.53463V6.19866C42.4307 6.08896 42.2113 6.08896 41.9376 6.08896C40.4018 6.08896 39.1397 6.91224 38.6466 8.00926V6.19866H35.2458V17.8824H38.6466V12.9458C38.6466 10.8615 39.6339 9.4897 41.8279 9.4897C42.0839 9.4897 42.3398 9.4897 42.5958 9.53463V9.54508H42.6501ZM51.0418 18.8143C51.7 20.1307 52.7427 20.789 54.1688 20.789C55.924 20.789 57.1307 19.856 57.1307 18.0464V16.2912H57.0754C56.2521 17.3328 55.1551 17.827 53.7289 17.827C52.0834 17.827 50.7116 17.2785 49.67 16.1261C48.6273 15.0291 48.0788 13.603 48.0788 11.9575C48.0788 10.4216 48.573 8.99552 49.6146 7.84313C50.6573 6.63642 51.9737 6.03254 53.6192 6.03254C55.1007 6.03254 56.2521 6.58105 57.1851 7.62373H57.2404V6.19761H60.5869V17.9357C60.5869 19.7463 59.984 21.1724 58.8316 22.214C57.6803 23.2567 56.1434 23.7499 54.2785 23.7499C51.3709 23.7499 49.3963 22.6528 48.3546 20.4034L51.0428 18.8122V18.8143H51.0418ZM54.3328 9.0509C52.7416 9.0509 51.4806 10.2576 51.4806 11.9031C51.4806 13.6584 52.6873 14.8107 54.3328 14.8107C55.9784 14.8107 57.1851 13.6594 57.1851 11.9031C57.1851 10.2576 55.9784 9.0509 54.3328 9.0509ZM69.3076 11.41V17.9378H72.654V10.6421C72.654 9.32567 72.2706 8.22866 71.557 7.35105C70.8434 6.41806 69.8018 5.97925 68.3757 5.97925C67.9369 5.97925 67.3884 6.08896 66.7301 6.30836C66.1273 6.52776 65.6331 6.96657 65.1943 7.57045V0.357313H61.7936V17.8824H65.1943V11.3546C65.1943 10.0925 65.9079 9.10522 67.2786 9.10522C68.6494 9.10522 69.3086 10.0925 69.3086 11.409L69.3076 11.41ZM81.5952 17.827C81.1021 17.991 80.5536 18.0464 80.004 18.0464C76.9324 18.0464 75.3422 16.4009 75.3422 13.6584V9.1606H73.2579V6.19866H75.3976V2.52313H78.7983V6.19866H81.706V9.1606H78.7983V13.2196C78.7983 14.536 79.5119 15.0845 80.8284 15.0845C81.1031 15.0845 81.3769 15.0845 81.5963 14.9748V17.827H81.5952ZM82.8009 17.8824H86.257V0.357313H82.8009V17.8824ZM89.1092 7.73448C90.3713 6.52776 91.9061 5.97925 93.6613 5.97925C95.4166 5.97925 96.9524 6.58314 98.1591 7.73448C99.3658 8.88582 100.024 10.313 100.024 12.0682C100.024 13.8234 99.4212 15.3049 98.1591 16.4563C96.8981 17.6076 95.4166 18.2115 93.607 18.2115C91.7975 18.2115 90.316 17.663 89.0539 16.4563C87.8472 15.3039 87.1889 13.8778 87.1889 12.1225C87.2433 10.3673 87.8472 8.88582 89.1082 7.73448H89.1092ZM91.5781 14.2069C92.1266 14.7554 92.8401 15.0302 93.6624 15.0302C95.3079 15.0302 96.5146 13.7681 96.5146 12.0128C96.5146 11.1352 96.2399 10.4216 95.6913 9.87314C95.1428 9.32463 94.4303 8.99552 93.607 8.99552C92.7837 8.99552 92.1266 9.2703 91.577 9.87314C91.0285 10.4216 90.7537 11.1352 90.7537 12.0128C90.6994 12.8904 91.0285 13.604 91.577 14.2069H91.5781ZM100.519 12.1225C100.519 13.8778 101.068 15.3039 102.274 16.4563C103.481 17.6076 104.962 18.1572 106.772 18.2115C109.405 18.2115 111.545 16.9494 112.422 14.5913L109.405 13.3293C108.912 14.536 108.033 15.0845 106.827 15.0845C105.181 15.0845 104.03 13.8778 104.03 12.1225C104.03 10.3673 105.236 9.1606 106.827 9.1606C107.979 9.1606 108.857 9.76448 109.35 10.9158L112.366 9.65373C111.598 7.35 109.458 6.03358 106.827 6.03358C105.126 6.03358 103.591 6.58209 102.383 7.78881C101.122 8.9412 100.518 10.3673 100.518 12.1225H100.519ZM113.957 17.1688C113.189 16.5106 112.805 15.6873 112.805 14.6457V14.5903C112.805 13.2185 113.463 12.1769 114.561 11.6827C115.658 11.1885 116.755 10.9691 118.016 10.9691H119.169C119.772 10.9691 120.101 10.6943 120.101 10.0915C120.101 9.26821 119.443 8.66537 118.237 8.66537C117.03 8.66537 116.207 9.21388 115.658 10.2566L113.025 8.72075C114.013 6.85582 115.822 5.92284 118.401 5.92284C121.472 5.92284 123.501 7.56836 123.501 10.64V17.8803H120.32V16.4542H120.266C119.498 17.5512 118.291 18.1551 116.755 18.1551C115.658 18.0997 114.725 17.826 113.957 17.1678V17.1688ZM120.101 13.3846V13.1099H118.017C117.03 13.1099 116.262 13.5487 116.262 14.4263C116.262 15.1942 116.865 15.633 117.743 15.633C119.224 15.633 120.101 14.6457 120.101 13.3836V13.3846ZM124.544 17.8824H128V0.357313H124.544V17.8824ZM4.85535 6.85582C5.51356 6.85582 6.04953 7.39179 6.04953 8.05C6.04953 8.70821 5.51356 9.24418 4.85535 9.24418C4.19714 9.24418 3.66118 8.70821 3.66118 8.05C3.66118 7.39179 4.19714 6.85582 4.85535 6.85582ZM4.85535 5.80269C3.61311 5.80269 2.60699 6.80881 2.60699 8.05105C2.60699 9.29328 3.61311 10.2994 4.85535 10.2994C6.09759 10.2994 7.10371 9.29328 7.10371 8.05105C7.10371 6.80881 6.09759 5.80269 4.85535 5.80269ZM14.7943 3.65358C12.5982 2.62761 10.1064 3.37776 8.78685 5.21134C7.87267 3.94403 6.40476 3.1897 4.85431 3.1897C4.18565 3.1897 3.50446 3.32866 2.84729 3.62433C0.781771 4.55627 -0.378975 6.88299 0.112069 9.09582C0.324159 10.0528 0.798487 10.8563 1.4264 11.4831L8.20804 18.2763C8.52983 18.5981 9.05222 18.5981 9.37506 18.2763L16.1567 11.4831C16.8609 10.781 17.3707 9.85537 17.5368 8.74164C17.8471 6.65 16.7115 4.54687 14.7964 3.65254L14.7943 3.65358ZM2.17237 10.734C1.77326 10.336 1.47446 9.87 1.28431 9.34866C0.937444 8.39582 0.982368 7.36358 1.41073 6.44314C1.83908 5.52373 2.60073 4.82687 3.55461 4.47896C3.97461 4.32642 4.41237 4.2491 4.85431 4.2491C6.27521 4.2491 7.60729 5.07761 8.24774 6.35955L8.26759 6.39925L8.25192 6.44105C8.01894 7.08881 7.93222 7.77 7.99282 8.46582L8.76177 17.3349L2.17132 10.734H2.17237ZM14.4454 8.05C14.4454 9.00075 13.6754 9.77075 12.7246 9.77075C11.7739 9.77075 11.0039 9.00075 11.0039 8.05C11.0039 7.09926 11.7739 6.32926 12.7246 6.32926C13.6754 6.32926 14.4454 7.09926 14.4454 8.05Z",fill:"currentColor",fillRule:"evenodd"})}),l==="mark"&&C.jsxs("svg",{"aria-label":o??"BrightLocal logo",fill:"none",height:"21",role:"img",viewBox:"0 0 24 21",width:"24",xmlns:"http://www.w3.org/2000/svg",children:[C.jsx("path",{d:"M6.62559 5.00277C7.52378 5.00277 8.25516 5.73415 8.25516 6.63234C8.25516 7.53053 7.52378 8.26191 6.62559 8.26191C5.7274 8.26191 4.99602 7.53053 4.99602 6.63234C4.99602 5.73415 5.7274 5.00277 6.62559 5.00277ZM6.62559 3.56424C4.93044 3.56424 3.5575 4.93719 3.5575 6.63234C3.5575 8.32749 4.93044 9.70043 6.62559 9.70043C8.32074 9.70043 9.69369 8.32749 9.69369 6.63234C9.69369 4.93719 8.32074 3.56424 6.62559 3.56424Z",fill:"currentColor"}),C.jsx("path",{clipRule:"evenodd",d:"M20.1882 0.633009C17.1914 -0.767024 13.7911 0.256626 11.9905 2.75872C10.743 1.02935 8.73989 0 6.62416 0C5.71172 0 4.78216 0.189618 3.8854 0.593089C1.0668 1.86481 -0.517148 5.03983 0.152929 8.05946C0.442345 9.36539 1.08961 10.4618 1.94645 11.3172L11.2006 20.587C11.6398 21.0262 12.3526 21.0262 12.7931 20.587L22.0473 11.3172C23.0083 10.3591 23.704 9.09594 23.9307 7.57615C24.3541 4.7219 22.8044 1.85198 20.1911 0.631583L20.1882 0.633009ZM2.96583 10.2949C2.42121 9.75176 2.01346 9.1159 1.75399 8.40448C1.28065 7.10424 1.34196 5.69565 1.92649 4.43962C2.51103 3.185 3.55036 2.23407 4.85202 1.75931C5.42515 1.55116 6.02252 1.44566 6.62559 1.44566C8.56453 1.44566 10.3823 2.57623 11.2562 4.32556L11.2833 4.37974L11.262 4.43677C10.944 5.3207 10.8257 6.25025 10.9084 7.19976L11.9577 19.3025L2.9644 10.2949H2.96583ZM19.712 6.63091C19.712 7.92829 18.6613 8.97903 17.3639 8.97903C16.0665 8.97903 15.0158 7.92829 15.0158 6.63091C15.0158 5.33353 16.0665 4.28279 17.3639 4.28279C18.6613 4.28279 19.712 5.33353 19.712 6.63091Z",fill:"currentColor",fillRule:"evenodd"})]})]})}e.displayName="Logo";exports.Logo=e;
package/dist/logo.d.ts CHANGED
@@ -15,7 +15,7 @@ interface LogoProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children
15
15
  dataHook: string;
16
16
  /**
17
17
  * Accessible label for the logo image.
18
- * @default "BrightLocal Logo"
18
+ * @default "BrightLocal logo"
19
19
  */
20
20
  ariaLabel?: string;
21
21
  /**
package/dist/logo.js CHANGED
@@ -35,7 +35,7 @@ function M({
35
35
  C === "logotype" && /* @__PURE__ */ o(
36
36
  "svg",
37
37
  {
38
- "aria-label": l ?? "BrightLocal Logo",
38
+ "aria-label": l ?? "BrightLocal logo",
39
39
  fill: "none",
40
40
  height: "24",
41
41
  role: "img",
@@ -56,7 +56,7 @@ function M({
56
56
  C === "mark" && /* @__PURE__ */ e(
57
57
  "svg",
58
58
  {
59
- "aria-label": l ?? "BrightLocal Logo",
59
+ "aria-label": l ?? "BrightLocal logo",
60
60
  fill: "none",
61
61
  height: "21",
62
62
  role: "img",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),b=require("react"),x=require("@radix-ui/react-navigation-menu"),w=require("@brightlocal/icons"),i=require("@brightlocal/ui-components/lib/utils");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const o=c(b),r=c(x),u=o.forwardRef(({className:e,children:t,dataHook:a,...s},N)=>n.jsxs(r.Root,{ref:N,className:i.cn("relative z-10 flex max-w-max flex-1 items-center justify-center",e),"data-hook":a,"data-slot":"navigation-menu",...s,children:[t,n.jsx(d,{})]}));u.displayName="NavigationMenu";const l=o.forwardRef(({className:e,...t},a)=>n.jsx(r.List,{ref:a,className:i.cn("group flex flex-1 list-none items-center justify-center gap-1",e),"data-slot":"navigation-menu-list",...t}));l.displayName="NavigationMenuList";const g=o.forwardRef((e,t)=>n.jsx(r.Item,{ref:t,"data-slot":"navigation-menu-item",...e}));g.displayName="NavigationMenuItem";const m=o.forwardRef(({className:e,children:t,...a},s)=>n.jsxs(r.Trigger,{ref:s,className:i.cn(["group inline-flex h-9 w-max items-center justify-center gap-1","rounded-md px-4 py-2","text-sm font-medium","text-foreground","transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground","focus-visible:bg-accent focus-visible:ring-ring focus-visible:shadow-[0_0_0_4px_rgba(163,163,163,0.1)] focus-visible:ring-1 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","data-[state=open]:bg-accent/50"],e),"data-slot":"navigation-menu-trigger",...a,children:[t,n.jsx(w.ChevronDown,{"aria-hidden":"true",className:"relative top-[1px] ml-1 transition duration-300 group-data-[state=open]:rotate-180",size:12})]}));m.displayName="NavigationMenuTrigger";const f=o.forwardRef(({className:e,...t},a)=>n.jsx(r.Content,{ref:a,className:i.cn(["data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out top-0 left-0 w-full","data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out","data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52","data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52","md:absolute md:w-auto"],e),"data-slot":"navigation-menu-content",role:"group",...t}));f.displayName="NavigationMenuContent";const v=o.forwardRef(({className:e,...t},a)=>n.jsx(r.Link,{ref:a,className:i.cn(["block rounded-md p-3 leading-none no-underline select-none","transition-colors outline-none","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground","focus-visible:bg-accent focus-visible:ring-ring focus-visible:shadow-[0_0_0_4px_rgba(163,163,163,0.1)] focus-visible:ring-1 focus-visible:outline-none"],e),"data-slot":"navigation-menu-link",...t}));v.displayName="NavigationMenuLink";const d=o.forwardRef(({className:e,...t},a)=>n.jsx("div",{className:i.cn("absolute top-full left-0 z-50 flex justify-center"),children:n.jsx(r.Viewport,{ref:a,className:i.cn(["origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)]","bg-popover text-popover-foreground w-full overflow-hidden rounded-md border shadow-sm","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90","md:w-[var(--radix-navigation-menu-viewport-width)]"],e),"data-slot":"navigation-menu-viewport",...t})}));d.displayName="NavigationMenuViewport";const p=o.forwardRef(({className:e,...t},a)=>n.jsx(r.Indicator,{ref:a,className:i.cn(["top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out","data-[state=hidden]:fade-out data-[state=visible]:fade-in"],e),"data-slot":"navigation-menu-indicator",...t,children:n.jsx("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})}));p.displayName="NavigationMenuIndicator";exports.NavigationMenu=u;exports.NavigationMenuContent=f;exports.NavigationMenuIndicator=p;exports.NavigationMenuItem=g;exports.NavigationMenuLink=v;exports.NavigationMenuList=l;exports.NavigationMenuTrigger=m;exports.NavigationMenuViewport=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),_=require("react"),I=require("@radix-ui/react-navigation-menu"),T=require("@brightlocal/icons"),r=require("@brightlocal/ui-components/lib/utils");function p(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const u=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,u.get?u:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const i=p(_),s=p(I),b=i.forwardRef(({className:t,children:e,dataHook:a,delayDuration:u=50,...l},c)=>o.jsxs(s.Root,{ref:c,className:r.cn("relative z-10 flex max-w-max flex-1 items-center justify-center",t),"data-hook":a,"data-slot":"navigation-menu",delayDuration:u,...l,children:[e,o.jsx(f,{})]}));b.displayName="NavigationMenu";const N=i.forwardRef(({className:t,...e},a)=>o.jsx(s.List,{ref:a,className:r.cn("group flex flex-1 list-none items-center justify-center gap-1",t),"data-slot":"navigation-menu-list",...e}));N.displayName="NavigationMenuList";const x=i.forwardRef((t,e)=>o.jsx(s.Item,{ref:e,"data-slot":"navigation-menu-item",...t}));x.displayName="NavigationMenuItem";const k=500,w=i.forwardRef(({className:t,children:e,onClick:a,onPointerDown:u,...l},c)=>{const g=i.useRef(""),m=i.useRef(-1/0),v=i.useRef(null),j=i.useCallback(n=>{if(typeof c=="function"?c(n):c&&(c.current=n),v.current?.disconnect(),n){const d=new MutationObserver(()=>{n.getAttribute("data-state")==="open"&&(m.current=performance.now())});d.observe(n,{attributes:!0,attributeFilter:["data-state"]}),v.current=d}},[c]);return o.jsxs(s.Trigger,{ref:j,className:r.cn(["group inline-flex h-9 w-max items-center justify-center gap-1","rounded-md px-4 py-2","text-sm font-medium","text-foreground","transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground","focus-visible:bg-accent focus-visible:ring-ring focus-visible:shadow-[0_0_0_4px_rgba(163,163,163,0.1)] focus-visible:ring-1 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","data-[state=open]:bg-accent/50"],t),"data-slot":"navigation-menu-trigger",onClick:n=>{const d=n.currentTarget.getAttribute("data-state")==="open",R=n.timeStamp-m.current<k;g.current==="mouse"&&n.detail>0&&d&&R&&n.preventDefault(),a?.(n)},onPointerDown:n=>{g.current=n.pointerType,u?.(n)},...l,children:[e,o.jsx(T.ChevronDown,{"aria-hidden":"true",className:"relative top-[1px] ml-1 transition duration-300 group-data-[state=open]:rotate-180",size:12})]})});w.displayName="NavigationMenuTrigger";const h=i.forwardRef(({className:t,...e},a)=>o.jsx(s.Content,{ref:a,className:r.cn(["data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out top-0 left-0 w-full","data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out","data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52","data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52","duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]","md:absolute md:w-auto"],t),"data-slot":"navigation-menu-content",role:"group",...e}));h.displayName="NavigationMenuContent";const M=i.forwardRef(({className:t,...e},a)=>o.jsx(s.Link,{ref:a,className:r.cn(["block rounded-md p-3 leading-none no-underline select-none","transition-colors outline-none","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground","focus-visible:bg-accent focus-visible:ring-ring focus-visible:shadow-[0_0_0_4px_rgba(163,163,163,0.1)] focus-visible:ring-1 focus-visible:outline-none"],t),"data-slot":"navigation-menu-link",...e}));M.displayName="NavigationMenuLink";const f=i.forwardRef(({className:t,...e},a)=>o.jsx("div",{className:r.cn("absolute top-full left-0 z-50 flex justify-center"),children:o.jsx(s.Viewport,{ref:a,className:r.cn(["origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)]","bg-popover text-popover-foreground w-full overflow-hidden rounded-md border shadow-sm","transition-[width,height] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-150","md:w-[var(--radix-navigation-menu-viewport-width)]"],t),"data-slot":"navigation-menu-viewport",...e})}));f.displayName="NavigationMenuViewport";const y=i.forwardRef(({className:t,...e},a)=>o.jsx(s.Indicator,{ref:a,className:r.cn(["top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out","data-[state=hidden]:fade-out data-[state=visible]:fade-in"],t),"data-slot":"navigation-menu-indicator",...e,children:o.jsx("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})}));y.displayName="NavigationMenuIndicator";exports.NavigationMenu=b;exports.NavigationMenuContent=h;exports.NavigationMenuIndicator=y;exports.NavigationMenuItem=x;exports.NavigationMenuLink=M;exports.NavigationMenuList=N;exports.NavigationMenuTrigger=w;exports.NavigationMenuViewport=f;
@@ -7,6 +7,12 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
7
7
  interface NavigationMenuProps extends React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root> {
8
8
  dataHook: string;
9
9
  className?: string;
10
+ /**
11
+ * Delay in ms before a hovered trigger opens its menu. Overrides Radix's
12
+ * laggy 200ms default with Base UI's snappier value.
13
+ * @default 50
14
+ */
15
+ delayDuration?: number;
10
16
  }
11
17
  declare const NavigationMenu: React.ForwardRefExoticComponent<NavigationMenuProps & React.RefAttributes<HTMLElement>>;
12
18
  /**
@@ -25,6 +31,19 @@ type NavigationMenuTriggerProps = React.ComponentPropsWithoutRef<typeof Navigati
25
31
  /**
26
32
  * Trigger button that opens a dropdown menu
27
33
  * Includes chevron icon that rotates when open
34
+ *
35
+ * Radix opens the menu on hover and then *toggles it closed* on the next click.
36
+ * Mouse users routinely click a trigger they have just hovered open, which
37
+ * closes it immediately (see radix-ui/primitives#1630).
38
+ *
39
+ * We port Base UI's "patient click" behaviour: an instinctive mouse click made
40
+ * within {@link PATIENT_CLICK_THRESHOLD_MS} of the menu opening keeps it open
41
+ * (calling `preventDefault()` makes Radix's internal `composeEventHandlers`
42
+ * skip its toggle). The window is measured from the `data-state` open
43
+ * transition — not the pointer enter — so it stays correct no matter how large
44
+ * `delayDuration` is. A deliberate click after that window still toggles the
45
+ * menu shut, and touch taps and keyboard activation are left untouched so they
46
+ * can toggle it too.
28
47
  */
29
48
  declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
30
49
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../src/components/navigation-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK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