@brightlocal/ui-components 2.6.1 → 2.8.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.
@@ -1,21 +1,21 @@
1
- import { jsxs as m, jsx as s } from "react/jsx-runtime";
2
- import * as r from "react";
3
- import { cn as i } from "@brightlocal/ui-components/lib/utils";
4
- const y = r.forwardRef(
1
+ import { jsxs as g, jsx as r } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { cn as n } from "@brightlocal/ui-components/lib/utils";
4
+ const y = i.forwardRef(
5
5
  ({
6
6
  className: t,
7
7
  dataHook: a,
8
8
  trackingEl: l,
9
9
  trackingLabel: e,
10
- left: o,
11
- right: n,
12
- children: d,
13
- ...u
14
- }, c) => /* @__PURE__ */ m(
10
+ left: s,
11
+ right: o,
12
+ children: c,
13
+ ...d
14
+ }, u) => /* @__PURE__ */ g(
15
15
  "div",
16
16
  {
17
- ref: c,
18
- className: i(
17
+ ref: u,
18
+ className: n(
19
19
  "group/split-layout bg-background grid min-h-screen w-full grid-cols-1 grid-rows-[auto_1fr] lg:has-[[data-slot=split-layout-right]]:grid-cols-2",
20
20
  t
21
21
  ),
@@ -23,21 +23,21 @@ const y = r.forwardRef(
23
23
  "data-slot": "split-layout",
24
24
  "data-tracking-el": l || "split-layout",
25
25
  "data-tracking-label": e,
26
- ...u,
26
+ ...d,
27
27
  children: [
28
- d,
29
- o && /* @__PURE__ */ s(p, { children: o }),
30
- n && /* @__PURE__ */ s(f, { children: n })
28
+ c,
29
+ s && /* @__PURE__ */ r(p, { children: s }),
30
+ o && /* @__PURE__ */ r(f, { children: o })
31
31
  ]
32
32
  }
33
33
  )
34
34
  );
35
35
  y.displayName = "SplitLayout";
36
- const g = r.forwardRef(({ className: t, children: a, ...l }, e) => /* @__PURE__ */ s(
36
+ const m = i.forwardRef(({ className: t, children: a, ...l }, e) => /* @__PURE__ */ r(
37
37
  "div",
38
38
  {
39
39
  ref: e,
40
- className: i(
40
+ className: n(
41
41
  "px-section-sm pt-section-sm col-start-1 row-start-1 flex w-full items-center justify-center lg:justify-start",
42
42
  t
43
43
  ),
@@ -46,58 +46,60 @@ const g = r.forwardRef(({ className: t, children: a, ...l }, e) => /* @__PURE__
46
46
  children: a
47
47
  }
48
48
  ));
49
- g.displayName = "SplitLayoutHeader";
50
- const p = r.forwardRef(({ className: t, children: a, ...l }, e) => /* @__PURE__ */ s(
49
+ m.displayName = "SplitLayoutHeader";
50
+ const p = i.forwardRef(({ className: t, sticky: a = !1, children: l, ...e }, s) => /* @__PURE__ */ r(
51
51
  "div",
52
52
  {
53
- ref: e,
54
- className: i(
53
+ ref: s,
54
+ className: n(
55
55
  "p-section-sm col-start-1 row-start-2 flex min-h-0 items-center justify-center overflow-auto",
56
56
  "group-has-[[data-slot=split-layout-header]]/split-layout:pt-2",
57
+ a && "lg:sticky lg:top-0 lg:h-screen lg:self-start",
57
58
  t
58
59
  ),
59
60
  "data-slot": "split-layout-left",
60
- ...l,
61
- children: a
61
+ ...e,
62
+ children: l
62
63
  }
63
64
  ));
64
65
  p.displayName = "SplitLayoutContentLeft";
65
- const f = r.forwardRef(({ className: t, flush: a = !1, children: l, ...e }, o) => /* @__PURE__ */ s(
66
+ const f = i.forwardRef(({ className: t, flush: a = !1, sticky: l = !1, children: e, ...s }, o) => /* @__PURE__ */ r(
66
67
  "div",
67
68
  {
68
69
  ref: o,
69
- className: i(
70
+ className: n(
70
71
  "bg-card hidden lg:col-start-2 lg:row-span-full lg:row-start-1",
71
72
  a ? "relative overflow-hidden lg:block" : "p-section-sm min-h-0 items-center justify-center overflow-auto lg:flex",
73
+ l && "lg:sticky lg:top-0 lg:h-screen lg:self-start",
72
74
  t
73
75
  ),
74
76
  "data-slot": "split-layout-right",
75
- ...e,
76
- children: l
77
+ ...s,
78
+ children: e
77
79
  }
78
80
  ));
79
81
  f.displayName = "SplitLayoutContentRight";
80
- const h = r.forwardRef(
82
+ const h = i.forwardRef(
81
83
  ({
82
84
  className: t,
83
85
  dataHook: a,
84
86
  src: l,
85
87
  alt: e,
86
- objectFit: o = "cover",
87
- objectPosition: n = "center",
88
- style: d,
89
- ...u
90
- }, c) => /* @__PURE__ */ s(
88
+ objectFit: s = "cover",
89
+ objectPosition: o = "center",
90
+ style: c,
91
+ ...d
92
+ }, u) => /* @__PURE__ */ r(
91
93
  "img",
92
94
  {
93
- ref: c,
95
+ ref: u,
94
96
  alt: e,
95
- className: i("absolute inset-0 h-full w-full", t),
97
+ className: n("absolute inset-0 h-full w-full", t),
96
98
  "data-hook": a,
97
99
  "data-slot": "split-layout-image",
98
100
  src: l,
99
- style: { objectFit: o, objectPosition: n, ...d },
100
- ...u
101
+ style: { objectFit: s, objectPosition: o, ...c },
102
+ ...d
101
103
  }
102
104
  )
103
105
  );
@@ -106,6 +108,6 @@ export {
106
108
  y as SplitLayout,
107
109
  p as SplitLayoutContentLeft,
108
110
  f as SplitLayoutContentRight,
109
- g as SplitLayoutHeader,
111
+ m as SplitLayoutHeader,
110
112
  h as SplitLayoutImage
111
113
  };
package/dist/table.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),y=require("react"),b=require("class-variance-authority"),r=require("@brightlocal/ui-components/lib/utils");function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const s=w(y),N=b.cva("align-middle bg-transparent text-foreground text-sm font-normal leading-normal break-words",{variants:{size:{default:"h-12 p-2",md:"h-16 p-2",lg:"h-24 p-2"},align:{left:"text-left",right:"text-right",center:"text-center"}},defaultVariants:{size:"default",align:"left"}}),j=b.cva("h-10 p-2 align-middle text-muted-foreground text-sm font-medium leading-normal hover:bg-muted break-words outline-none focus-visible:shadow-default transition-[background-color,box-shadow] duration-150 ease-in-out",{variants:{align:{left:"text-left",right:"text-right",center:"text-center"}},defaultVariants:{align:"left"}}),f=s.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:l,...n},d)=>o.jsx("div",{className:"relative w-full overflow-x-auto","data-slot":"table-container",children:o.jsx("table",{ref:d,className:r.cn("w-full caption-bottom text-sm",e),"data-hook":t,"data-slot":"table","data-tracking-el":a,"data-tracking-label":l,...n})}));f.displayName="Table";const u=s.forwardRef(({className:e,dataHook:t,...a},l)=>o.jsx("thead",{ref:l,className:r.cn(e),"data-hook":t,"data-slot":"table-header",...a}));u.displayName="TableHeader";const m=s.forwardRef(({className:e,dataHook:t,...a},l)=>o.jsx("tbody",{ref:l,className:r.cn(e),"data-hook":t,"data-slot":"table-body",...a}));m.displayName="TableBody";const g=s.forwardRef(({className:e,dataHook:t,...a},l)=>o.jsx("tfoot",{ref:l,className:r.cn("bg-muted/50",e),"data-hook":t,"data-slot":"table-footer",...a}));g.displayName="TableFooter";const p=s.forwardRef(({className:e,dataHook:t,...a},l)=>o.jsx("tr",{ref:l,className:r.cn("data-[state=selected]:bg-muted transition-colors duration-150 ease-in-out",e),"data-hook":t,"data-slot":"table-row",...a}));p.displayName="TableRow";const x=s.forwardRef(({className:e,dataHook:t,align:a,minWidth:l,style:n,scope:d="col",...i},c)=>o.jsx("th",{ref:c,className:r.cn(j({align:a}),e),"data-hook":t,"data-slot":"table-head",scope:d,style:{minWidth:l,...n},...i}));x.displayName="TableHead";const T=s.forwardRef(({className:e,dataHook:t,size:a,align:l,minWidth:n,style:d,...i},c)=>o.jsx("td",{ref:c,className:r.cn(N({size:a,align:l}),e),"data-hook":t,"data-slot":"table-cell",style:{minWidth:n,...d},...i}));T.displayName="TableCell";const h=s.forwardRef(({className:e,dataHook:t,...a},l)=>o.jsx("caption",{ref:l,className:r.cn("text-muted-foreground mt-4 text-center text-sm",e),"data-hook":t,"data-slot":"table-caption",...a}));h.displayName="TableCaption";exports.Table=f;exports.TableBody=m;exports.TableCaption=h;exports.TableCell=T;exports.TableFooter=g;exports.TableHead=x;exports.TableHeader=u;exports.TableRow=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),y=require("react"),b=require("class-variance-authority"),r=require("@brightlocal/ui-components/lib/utils");function w(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const l=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,l.get?l:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const s=w(y),N=b.cva("align-middle bg-transparent text-foreground text-sm font-normal leading-normal break-words",{variants:{size:{default:"h-12 p-2",md:"h-16 p-2",lg:"h-24 p-2"},align:{left:"text-left",right:"text-right",center:"text-center"}},defaultVariants:{size:"default",align:"left"}}),j=b.cva("h-10 p-2 align-middle text-muted-foreground text-sm font-medium leading-normal hover:bg-muted break-words outline-none focus-visible:shadow-default transition-[background-color,box-shadow] duration-150 ease-in-out",{variants:{align:{left:"text-left",right:"text-right",center:"text-center"}},defaultVariants:{align:"left"}}),f=s.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:l,...n},d)=>o.jsx("div",{className:"relative w-full overflow-x-auto","data-slot":"table-container",children:o.jsx("table",{ref:d,className:r.cn("w-full caption-bottom text-sm",a),"data-hook":t,"data-slot":"table","data-tracking-el":e,"data-tracking-label":l,...n})}));f.displayName="Table";const u=s.forwardRef(({className:a,dataHook:t,...e},l)=>o.jsx("thead",{ref:l,className:r.cn(a),"data-hook":t,"data-slot":"table-header",...e}));u.displayName="TableHeader";const m=s.forwardRef(({className:a,dataHook:t,...e},l)=>o.jsx("tbody",{ref:l,className:r.cn(a),"data-hook":t,"data-slot":"table-body",...e}));m.displayName="TableBody";const g=s.forwardRef(({className:a,dataHook:t,...e},l)=>o.jsx("tfoot",{ref:l,className:r.cn("bg-muted/50",a),"data-hook":t,"data-slot":"table-footer",...e}));g.displayName="TableFooter";const p=s.forwardRef(({className:a,dataHook:t,...e},l)=>o.jsx("tr",{ref:l,className:r.cn("data-[state=selected]:bg-muted transition-colors duration-150 ease-in-out",a),"data-hook":t,"data-slot":"table-row",...e}));p.displayName="TableRow";const T=s.forwardRef(({className:a,dataHook:t,align:e,minWidth:l,style:n,scope:d="col",...i},c)=>o.jsx("th",{ref:c,className:r.cn(j({align:e}),a),"data-hook":t,"data-slot":"table-head",scope:d,style:{minWidth:l,...n},...i}));T.displayName="TableHead";const h=s.forwardRef(({className:a,dataHook:t,size:e,align:l,minWidth:n,style:d,...i},c)=>o.jsx("td",{ref:c,className:r.cn(N({size:e,align:l}),a),"data-hook":t,"data-slot":"table-cell",style:{minWidth:n,...d},...i}));h.displayName="TableCell";const x=s.forwardRef(({className:a,dataHook:t,...e},l)=>o.jsx("caption",{ref:l,className:r.cn("caption-bottom py-4",a),"data-hook":t,"data-slot":"table-caption",...e}));x.displayName="TableCaption";exports.Table=f;exports.TableBody=m;exports.TableCaption=x;exports.TableCell=h;exports.TableFooter=g;exports.TableHead=T;exports.TableHeader=u;exports.TableRow=p;
package/dist/table.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { cva as f } from "class-variance-authority";
3
+ import { cva as m } from "class-variance-authority";
4
4
  import { cn as r } from "@brightlocal/ui-components/lib/utils";
5
- const b = f(
5
+ const c = m(
6
6
  "align-middle bg-transparent text-foreground text-sm font-normal leading-normal break-words",
7
7
  {
8
8
  variants: {
@@ -22,7 +22,7 @@ const b = f(
22
22
  align: "left"
23
23
  }
24
24
  }
25
- ), c = f(
25
+ ), f = m(
26
26
  "h-10 p-2 align-middle text-muted-foreground text-sm font-medium leading-normal hover:bg-muted break-words outline-none focus-visible:shadow-default transition-[background-color,box-shadow] duration-150 ease-in-out",
27
27
  {
28
28
  variants: {
@@ -36,7 +36,7 @@ const b = f(
36
36
  align: "left"
37
37
  }
38
38
  }
39
- ), u = d.forwardRef(
39
+ ), p = d.forwardRef(
40
40
  ({ className: a, dataHook: t, trackingEl: e, trackingLabel: o, ...s }, n) => /* @__PURE__ */ l(
41
41
  "div",
42
42
  {
@@ -57,7 +57,7 @@ const b = f(
57
57
  }
58
58
  )
59
59
  );
60
- u.displayName = "Table";
60
+ p.displayName = "Table";
61
61
  const h = d.forwardRef(
62
62
  ({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
63
63
  "thead",
@@ -71,7 +71,7 @@ const h = d.forwardRef(
71
71
  )
72
72
  );
73
73
  h.displayName = "TableHeader";
74
- const g = d.forwardRef(
74
+ const u = d.forwardRef(
75
75
  ({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
76
76
  "tbody",
77
77
  {
@@ -83,8 +83,8 @@ const g = d.forwardRef(
83
83
  }
84
84
  )
85
85
  );
86
- g.displayName = "TableBody";
87
- const p = d.forwardRef(
86
+ u.displayName = "TableBody";
87
+ const g = d.forwardRef(
88
88
  ({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
89
89
  "tfoot",
90
90
  {
@@ -96,7 +96,7 @@ const p = d.forwardRef(
96
96
  }
97
97
  )
98
98
  );
99
- p.displayName = "TableFooter";
99
+ g.displayName = "TableFooter";
100
100
  const w = d.forwardRef(
101
101
  ({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
102
102
  "tr",
@@ -113,12 +113,12 @@ const w = d.forwardRef(
113
113
  )
114
114
  );
115
115
  w.displayName = "TableRow";
116
- const x = d.forwardRef(
117
- ({ className: a, dataHook: t, align: e, minWidth: o, style: s, scope: n = "col", ...i }, m) => /* @__PURE__ */ l(
116
+ const N = d.forwardRef(
117
+ ({ className: a, dataHook: t, align: e, minWidth: o, style: s, scope: n = "col", ...i }, b) => /* @__PURE__ */ l(
118
118
  "th",
119
119
  {
120
- ref: m,
121
- className: r(c({ align: e }), a),
120
+ ref: b,
121
+ className: r(f({ align: e }), a),
122
122
  "data-hook": t,
123
123
  "data-slot": "table-head",
124
124
  scope: n,
@@ -127,13 +127,13 @@ const x = d.forwardRef(
127
127
  }
128
128
  )
129
129
  );
130
- x.displayName = "TableHead";
131
- const N = d.forwardRef(
132
- ({ className: a, dataHook: t, size: e, align: o, minWidth: s, style: n, ...i }, m) => /* @__PURE__ */ l(
130
+ N.displayName = "TableHead";
131
+ const T = d.forwardRef(
132
+ ({ className: a, dataHook: t, size: e, align: o, minWidth: s, style: n, ...i }, b) => /* @__PURE__ */ l(
133
133
  "td",
134
134
  {
135
- ref: m,
136
- className: r(b({ size: e, align: o }), a),
135
+ ref: b,
136
+ className: r(c({ size: e, align: o }), a),
137
137
  "data-hook": t,
138
138
  "data-slot": "table-cell",
139
139
  style: { minWidth: s, ...n },
@@ -141,25 +141,25 @@ const N = d.forwardRef(
141
141
  }
142
142
  )
143
143
  );
144
- N.displayName = "TableCell";
145
- const T = d.forwardRef(({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
144
+ T.displayName = "TableCell";
145
+ const x = d.forwardRef(({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
146
146
  "caption",
147
147
  {
148
148
  ref: o,
149
- className: r("text-muted-foreground mt-4 text-center text-sm", a),
149
+ className: r("caption-bottom py-4", a),
150
150
  "data-hook": t,
151
151
  "data-slot": "table-caption",
152
152
  ...e
153
153
  }
154
154
  ));
155
- T.displayName = "TableCaption";
155
+ x.displayName = "TableCaption";
156
156
  export {
157
- u as Table,
158
- g as TableBody,
159
- T as TableCaption,
160
- N as TableCell,
161
- p as TableFooter,
162
- x as TableHead,
157
+ p as Table,
158
+ u as TableBody,
159
+ x as TableCaption,
160
+ T as TableCell,
161
+ g as TableFooter,
162
+ N as TableHead,
163
163
  h as TableHeader,
164
164
  w as TableRow
165
165
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.6.1",
3
+ "version": "2.8.0",
4
4
  "description": "BrightLocal Design System UI Components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -130,8 +130,8 @@
130
130
  "vite-bundle-visualizer": "^1.2.1",
131
131
  "vite-plugin-dts": "^4.5.4",
132
132
  "vite-plugin-lib-inject-css": "^2.2.2",
133
- "@workspace/typescript-config": "0.0.0",
134
- "@workspace/eslint-config": "0.0.0"
133
+ "@workspace/eslint-config": "0.0.0",
134
+ "@workspace/typescript-config": "0.0.0"
135
135
  },
136
136
  "publishConfig": {
137
137
  "access": "public",