@brightlocal/ui-components 2.9.1 → 2.9.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "Machine-readable registry of all components in the BrightLocal Design System",
5
5
  "components": [
6
6
  {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),g=require("react"),d=require("@brightlocal/ui-components/lib/utils"),h=require("./header.cjs"),w=require("./scroll-area.cjs");function G(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const c=G(g),i=c.forwardRef(({className:e,maxWidth:a="var(--ds-breakpoint-xl)",dataHook:t,trackingEl:o,trackingLabel:l,children:n,...r},m)=>{const x=typeof a=="number"?`${a}px`:a;return s.jsx(w.ScrollArea,{className:d.cn("h-dvh w-full",e),dataHook:`${t}-scroll`,scrollOrientation:"both",children:s.jsx("div",{ref:m,className:"p-section-sm flex min-h-dvh w-full flex-col","data-hook":t,"data-slot":"global-layout","data-tracking-el":o,"data-tracking-label":l,...r,children:s.jsx("div",{className:"mx-auto flex w-full flex-1","data-slot":"global-container",style:{maxWidth:x},children:n})})})});i.displayName="GlobalLayout";const L="224px",u=c.forwardRef(({className:e,width:a=L,dataHook:t,children:o,...l},n)=>{const r=typeof a=="number"?`${a}px`:a;return s.jsx("aside",{ref:n,className:d.cn("sticky hidden shrink-0 self-start outline-none lg:block",e),"data-hook":t,"data-slot":"sidebar-container",style:{width:r,top:"var(--ds-section-padding-y-sm)"},...l,children:o})});u.displayName="GlobalLayoutSidebar";const b=c.forwardRef(({className:e,maxWidth:a="var(--ds-breakpoint-lg)",dataHook:t,children:o,...l},n)=>{const r=typeof a=="number"?`${a}px`:a;return s.jsx("div",{ref:n,className:d.cn("px-section-xs flex min-w-0 flex-1 flex-col gap-6",e),"data-hook":t,"data-slot":"content-wrapper",style:{"--content-max-width":r},...l,children:o})});b.displayName="GlobalLayoutContent";const y=c.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx(h.Header,{ref:r,className:d.cn("w-full justify-between",e),"data-slot":"content-header",dataHook:a,trackingEl:t,trackingLabel:o,...n,children:l}));y.displayName="GlobalLayoutContentHeader";const f=c.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx("div",{ref:r,className:d.cn("mx-auto flex w-full flex-1 flex-col gap-6",e),"data-hook":a,"data-slot":"content-body","data-tracking-el":t,"data-tracking-label":o,style:{maxWidth:"var(--content-max-width)"},...n,children:l}));f.displayName="GlobalLayoutContentBody";const p=c.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx("div",{ref:r,"aria-label":"Mobile navigation",className:d.cn("flex w-full items-center justify-start gap-2.5 py-2 lg:hidden",e),"data-hook":a,"data-slot":"mobile-header","data-tracking-el":t,"data-tracking-label":o,role:"toolbar",...n,children:l}));p.displayName="GlobalLayoutMobileHeader";exports.GlobalLayout=i;exports.GlobalLayoutContent=b;exports.GlobalLayoutContentBody=f;exports.GlobalLayoutContentHeader=y;exports.GlobalLayoutMobileHeader=p;exports.GlobalLayoutSidebar=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),g=require("react"),d=require("@brightlocal/ui-components/lib/utils"),h=require("./header.cjs"),k=require("./scroll-area.cjs");function w(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const c=w(g),i=c.forwardRef(({className:e,maxWidth:a="var(--ds-breakpoint-xl)",dataHook:t,trackingEl:o,trackingLabel:l,children:n,...r},x)=>{const p=typeof a=="number"?`${a}px`:a;return s.jsx(k.ScrollArea,{className:d.cn("h-dvh w-full",e),dataHook:`${t}-scroll`,scrollOrientation:"both",children:s.jsx("div",{ref:x,className:"p-section-sm flex min-h-dvh w-full flex-col","data-hook":t,"data-slot":"global-layout","data-tracking-el":o,"data-tracking-label":l,...r,children:s.jsx("div",{className:"mx-auto flex w-full flex-1","data-slot":"global-container",style:{maxWidth:p},children:n})})})});i.displayName="GlobalLayout";const G="224px",u=c.forwardRef(({className:e,width:a=G,dataHook:t,children:o,...l},n)=>{const r=typeof a=="number"?`${a}px`:a;return s.jsx("aside",{ref:n,className:d.cn("sticky hidden shrink-0 self-start outline-none lg:block",e),"data-hook":t,"data-slot":"sidebar-container",style:{width:r,top:"var(--ds-section-padding-y-sm)"},...l,children:o})});u.displayName="GlobalLayoutSidebar";const b=c.forwardRef(({className:e,maxWidth:a="var(--ds-breakpoint-lg)",dataHook:t,children:o,...l},n)=>{const r=typeof a=="number"?`${a}px`:a;return s.jsx("div",{ref:n,className:d.cn("px-section-xs flex min-w-0 flex-1 flex-col",e),"data-hook":t,"data-slot":"content-wrapper",style:{"--content-max-width":r},...l,children:o})});b.displayName="GlobalLayoutContent";const y=c.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx(h.Header,{ref:r,className:d.cn("mx-auto w-full justify-between",e),"data-slot":"content-header",dataHook:a,style:{maxWidth:"var(--ds-breakpoint-lg)"},trackingEl:t,trackingLabel:o,...n,children:l}));y.displayName="GlobalLayoutContentHeader";const f=c.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx("div",{ref:r,className:d.cn("mx-auto mt-6 flex w-full flex-1 flex-col gap-6",e),"data-hook":a,"data-slot":"content-body","data-tracking-el":t,"data-tracking-label":o,style:{maxWidth:"var(--content-max-width)"},...n,children:l}));f.displayName="GlobalLayoutContentBody";const m=c.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx("div",{ref:r,"aria-label":"Mobile navigation",className:d.cn("flex w-full items-center justify-start gap-2.5 py-2 lg:hidden",e),"data-hook":a,"data-slot":"mobile-header","data-tracking-el":t,"data-tracking-label":o,role:"toolbar",...n,children:l}));m.displayName="GlobalLayoutMobileHeader";exports.GlobalLayout=i;exports.GlobalLayoutContent=b;exports.GlobalLayoutContentBody=f;exports.GlobalLayoutContentHeader=y;exports.GlobalLayoutMobileHeader=m;exports.GlobalLayoutSidebar=u;
@@ -1 +1 @@
1
- {"version":3,"file":"global-layout.d.ts","sourceRoot":"","sources":["../../src/components/global-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC7D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,uGA0CjB,CAAC;AAMF,UAAU,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;IACtE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,QAAA,MAAM,mBAAmB,2GAwBvB,CAAC;AAIH,UAAU,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACpE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CA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B,kHA0B5B,CAAC;AAIF,UAAU,6BAA8B,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACzE;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,wBAAwB,mHA2B7B,CAAC;AAIF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,GACzB,CAAC;AAEF,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,6BAA6B,GAC9B,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
3
  import { cn as i } from "@brightlocal/ui-components/lib/utils";
4
- import { Header as b } from "./header.js";
5
- import { ScrollArea as m } from "./scroll-area.js";
4
+ import { Header as m } from "./header.js";
5
+ import { ScrollArea as b } from "./scroll-area.js";
6
6
  const y = d.forwardRef(
7
7
  ({
8
8
  className: o,
@@ -15,7 +15,7 @@ const y = d.forwardRef(
15
15
  }, c) => {
16
16
  const f = typeof a == "number" ? `${a}px` : a;
17
17
  return /* @__PURE__ */ s(
18
- m,
18
+ b,
19
19
  {
20
20
  className: i("h-dvh w-full", o),
21
21
  dataHook: `${t}-scroll`,
@@ -81,10 +81,7 @@ const x = d.forwardRef(
81
81
  "div",
82
82
  {
83
83
  ref: r,
84
- className: i(
85
- "px-section-xs flex min-w-0 flex-1 flex-col gap-6",
86
- o
87
- ),
84
+ className: i("px-section-xs flex min-w-0 flex-1 flex-col", o),
88
85
  "data-hook": t,
89
86
  "data-slot": "content-wrapper",
90
87
  style: { "--content-max-width": n },
@@ -97,12 +94,13 @@ const x = d.forwardRef(
97
94
  x.displayName = "GlobalLayoutContent";
98
95
  const h = d.forwardRef(
99
96
  ({ className: o, dataHook: a, trackingEl: t, trackingLabel: e, children: l, ...r }, n) => /* @__PURE__ */ s(
100
- b,
97
+ m,
101
98
  {
102
99
  ref: n,
103
- className: i("w-full justify-between", o),
100
+ className: i("mx-auto w-full justify-between", o),
104
101
  "data-slot": "content-header",
105
102
  dataHook: a,
103
+ style: { maxWidth: "var(--ds-breakpoint-lg)" },
106
104
  trackingEl: t,
107
105
  trackingLabel: e,
108
106
  ...r,
@@ -111,12 +109,15 @@ const h = d.forwardRef(
111
109
  )
112
110
  );
113
111
  h.displayName = "GlobalLayoutContentHeader";
114
- const w = d.forwardRef(
112
+ const k = d.forwardRef(
115
113
  ({ className: o, dataHook: a, trackingEl: t, trackingLabel: e, children: l, ...r }, n) => /* @__PURE__ */ s(
116
114
  "div",
117
115
  {
118
116
  ref: n,
119
- className: i("mx-auto flex w-full flex-1 flex-col gap-6", o),
117
+ className: i(
118
+ "mx-auto mt-6 flex w-full flex-1 flex-col gap-6",
119
+ o
120
+ ),
120
121
  "data-hook": a,
121
122
  "data-slot": "content-body",
122
123
  "data-tracking-el": t,
@@ -127,8 +128,8 @@ const w = d.forwardRef(
127
128
  }
128
129
  )
129
130
  );
130
- w.displayName = "GlobalLayoutContentBody";
131
- const g = d.forwardRef(
131
+ k.displayName = "GlobalLayoutContentBody";
132
+ const w = d.forwardRef(
132
133
  ({ className: o, dataHook: a, trackingEl: t, trackingLabel: e, children: l, ...r }, n) => /* @__PURE__ */ s(
133
134
  "div",
134
135
  {
@@ -148,12 +149,12 @@ const g = d.forwardRef(
148
149
  }
149
150
  )
150
151
  );
151
- g.displayName = "GlobalLayoutMobileHeader";
152
+ w.displayName = "GlobalLayoutMobileHeader";
152
153
  export {
153
154
  y as GlobalLayout,
154
155
  x as GlobalLayoutContent,
155
- w as GlobalLayoutContentBody,
156
+ k as GlobalLayoutContentBody,
156
157
  h as GlobalLayoutContentHeader,
157
- g as GlobalLayoutMobileHeader,
158
+ w as GlobalLayoutMobileHeader,
158
159
  p as GlobalLayoutSidebar
159
160
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "BrightLocal Design System UI Components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -143,10 +143,7 @@ const GlobalLayoutContent = React.forwardRef<
143
143
  return (
144
144
  <div
145
145
  ref={ref}
146
- className={cn(
147
- "px-section-xs flex min-w-0 flex-1 flex-col gap-6",
148
- className
149
- )}
146
+ className={cn("px-section-xs flex min-w-0 flex-1 flex-col", className)}
150
147
  data-hook={dataHook}
151
148
  data-slot="content-wrapper"
152
149
  style={
@@ -188,9 +185,10 @@ const GlobalLayoutContentHeader = React.forwardRef<
188
185
  return (
189
186
  <Header
190
187
  ref={ref}
191
- className={cn("w-full justify-between", className)}
188
+ className={cn("mx-auto w-full justify-between", className)}
192
189
  data-slot="content-header"
193
190
  dataHook={dataHook}
191
+ style={{ maxWidth: "var(--ds-breakpoint-lg)" }}
194
192
  trackingEl={trackingEl}
195
193
  trackingLabel={trackingLabel}
196
194
  {...props}
@@ -229,7 +227,10 @@ const GlobalLayoutContentBody = React.forwardRef<
229
227
  return (
230
228
  <div
231
229
  ref={ref}
232
- className={cn("mx-auto flex w-full flex-1 flex-col gap-6", className)}
230
+ className={cn(
231
+ "mx-auto mt-6 flex w-full flex-1 flex-col gap-6",
232
+ className
233
+ )}
233
234
  data-hook={dataHook}
234
235
  data-slot="content-body"
235
236
  data-tracking-el={trackingEl}