@brightlocal/ui-components 0.4.0 → 0.4.1

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 (87) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/blocks/data-table.cjs +1 -1
  4. package/dist/blocks/data-table.js +30 -30
  5. package/dist/blocks/sidebar.cjs +1 -1
  6. package/dist/blocks/sidebar.d.ts.map +1 -1
  7. package/dist/blocks/sidebar.js +4 -3
  8. package/dist/breadcrumb.cjs +1 -1
  9. package/dist/breadcrumb.js +10 -10
  10. package/dist/calendar.cjs +1 -1
  11. package/dist/calendar.d.ts.map +1 -1
  12. package/dist/calendar.js +6 -3
  13. package/dist/card.cjs +1 -1
  14. package/dist/card.d.ts +5 -0
  15. package/dist/card.d.ts.map +1 -1
  16. package/dist/card.js +49 -36
  17. package/dist/centred-layout.cjs +1 -1
  18. package/dist/centred-layout.d.ts +3 -8
  19. package/dist/centred-layout.d.ts.map +1 -1
  20. package/dist/centred-layout.js +33 -48
  21. package/dist/checkbox.cjs +1 -1
  22. package/dist/checkbox.js +7 -7
  23. package/dist/combobox.cjs +1 -1
  24. package/dist/combobox.d.ts +6 -1
  25. package/dist/combobox.d.ts.map +1 -1
  26. package/dist/combobox.js +116 -103
  27. package/dist/command.cjs +1 -1
  28. package/dist/command.js +3 -3
  29. package/dist/context-menu.cjs +1 -1
  30. package/dist/context-menu.js +3 -3
  31. package/dist/dropdown-menu.cjs +1 -1
  32. package/dist/dropdown-menu.js +10 -10
  33. package/dist/field.cjs +1 -1
  34. package/dist/field.d.ts.map +1 -1
  35. package/dist/field.js +12 -19
  36. package/dist/header.d.ts.map +1 -1
  37. package/dist/header.js +4 -1
  38. package/dist/input-password.cjs +1 -1
  39. package/dist/input-password.js +63 -63
  40. package/dist/link.cjs +1 -1
  41. package/dist/link.js +2 -2
  42. package/dist/logo.cjs +1 -1
  43. package/dist/logo.d.ts.map +1 -1
  44. package/dist/logo.js +17 -16
  45. package/dist/menubar.cjs +1 -1
  46. package/dist/menubar.js +3 -3
  47. package/dist/navigation-menu.cjs +1 -1
  48. package/dist/navigation-menu.d.ts.map +1 -1
  49. package/dist/navigation-menu.js +2 -1
  50. package/dist/pagination.cjs +1 -1
  51. package/dist/pagination.js +16 -16
  52. package/dist/rating.cjs +1 -1
  53. package/dist/rating.js +8 -8
  54. package/dist/resizable.cjs +1 -1
  55. package/dist/resizable.d.ts +1 -1
  56. package/dist/resizable.js +1 -1
  57. package/dist/select.cjs +1 -1
  58. package/dist/select.js +20 -20
  59. package/dist/sheet.d.ts +1 -1
  60. package/dist/sonner.cjs +1 -1
  61. package/dist/sonner.d.ts.map +1 -1
  62. package/dist/sonner.js +9 -8
  63. package/package.json +1 -1
  64. package/src/blocks/data-table.tsx +5 -5
  65. package/src/blocks/sidebar.tsx +3 -2
  66. package/src/components/accordion.tsx +1 -1
  67. package/src/components/breadcrumb.tsx +1 -1
  68. package/src/components/calendar.tsx +6 -3
  69. package/src/components/card.tsx +24 -1
  70. package/src/components/centred-layout.tsx +6 -29
  71. package/src/components/checkbox.tsx +1 -1
  72. package/src/components/combobox.tsx +21 -5
  73. package/src/components/command.tsx +3 -3
  74. package/src/components/context-menu.tsx +3 -3
  75. package/src/components/dropdown-menu.tsx +4 -4
  76. package/src/components/field.tsx +9 -14
  77. package/src/components/header.tsx +4 -1
  78. package/src/components/input-password.tsx +4 -4
  79. package/src/components/link.tsx +1 -1
  80. package/src/components/logo.tsx +10 -9
  81. package/src/components/menubar.tsx +3 -3
  82. package/src/components/navigation-menu.tsx +2 -1
  83. package/src/components/pagination.tsx +3 -3
  84. package/src/components/rating.tsx +2 -2
  85. package/src/components/resizable.tsx +1 -1
  86. package/src/components/select.tsx +4 -4
  87. package/src/components/sonner.tsx +6 -5
package/dist/select.js CHANGED
@@ -11,11 +11,11 @@ function y(e) {
11
11
  return /* @__PURE__ */ t(a.Group, { "data-slot": "select-group", ...e });
12
12
  }
13
13
  y.displayName = "SelectGroup";
14
- function N(e) {
14
+ function w(e) {
15
15
  return /* @__PURE__ */ t(a.Value, { "data-slot": "select-value", ...e });
16
16
  }
17
- N.displayName = "SelectValue";
18
- const w = x([
17
+ w.displayName = "SelectValue";
18
+ const N = x([
19
19
  // Base layout
20
20
  "relative flex w-full h-9 items-center justify-between gap-2",
21
21
  "px-3 py-2",
@@ -44,25 +44,25 @@ const w = x([
44
44
  function z({
45
45
  className: e,
46
46
  children: r,
47
- placeholder: n,
47
+ placeholder: l,
48
48
  dataHook: s,
49
49
  error: i,
50
- ...l
50
+ ...n
51
51
  }) {
52
- const c = i || l["aria-invalid"] === !0 || l["aria-invalid"] === "true", f = l["aria-required"] === !0 || l["aria-required"] === "true", g = l["aria-label"] || n || "Select an option", b = c ? "border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive" : "";
52
+ const c = i || n["aria-invalid"] === !0 || n["aria-invalid"] === "true", f = n["aria-required"] === !0 || n["aria-required"] === "true", g = n["aria-label"] || l || "Select an option", b = c ? "border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive" : "";
53
53
  return /* @__PURE__ */ d(
54
54
  a.Trigger,
55
55
  {
56
- ...l,
56
+ ...n,
57
57
  "aria-invalid": c ? "true" : void 0,
58
58
  "aria-label": g,
59
59
  "aria-required": f ? "true" : void 0,
60
- className: o(w(), b, e),
60
+ className: o(N(), b, e),
61
61
  "data-hook": s,
62
62
  "data-slot": "select-trigger",
63
63
  children: [
64
64
  r,
65
- /* @__PURE__ */ t(a.Icon, { asChild: !0, children: /* @__PURE__ */ t(u, { className: "text-muted-foreground size-4" }) })
65
+ /* @__PURE__ */ t(a.Icon, { asChild: !0, children: /* @__PURE__ */ t(u, { className: "text-muted-foreground", size: 16 }) })
66
66
  ]
67
67
  }
68
68
  );
@@ -71,7 +71,7 @@ z.displayName = "SelectTrigger";
71
71
  function k({
72
72
  className: e,
73
73
  children: r,
74
- position: n = "popper",
74
+ position: l = "popper",
75
75
  ...s
76
76
  }) {
77
77
  const i = o(
@@ -91,7 +91,7 @@ function k({
91
91
  "data-[side=left]:slide-in-from-right-2",
92
92
  "data-[side=right]:slide-in-from-left-2",
93
93
  "data-[side=top]:slide-in-from-bottom-2"
94
- ), l = n === "popper" && o(
94
+ ), n = l === "popper" && o(
95
95
  "data-[side=bottom]:translate-y-1",
96
96
  "data-[side=left]:-translate-x-1",
97
97
  "data-[side=right]:translate-x-1",
@@ -100,9 +100,9 @@ function k({
100
100
  return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ d(
101
101
  a.Content,
102
102
  {
103
- className: o(i, l, e),
103
+ className: o(i, n, e),
104
104
  "data-slot": "select-content",
105
- position: n,
105
+ position: l,
106
106
  ...s,
107
107
  children: [
108
108
  /* @__PURE__ */ t(m, {}),
@@ -111,7 +111,7 @@ function k({
111
111
  {
112
112
  className: o(
113
113
  "p-1",
114
- n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
114
+ l === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
115
115
  ),
116
116
  children: r
117
117
  }
@@ -142,7 +142,7 @@ I.displayName = "SelectLabel";
142
142
  function _({
143
143
  className: e,
144
144
  children: r,
145
- ...n
145
+ ...l
146
146
  }) {
147
147
  const s = o(
148
148
  // Base layout
@@ -166,9 +166,9 @@ function _({
166
166
  {
167
167
  className: o(s, e),
168
168
  "data-slot": "select-item",
169
- ...n,
169
+ ...l,
170
170
  children: [
171
- /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(a.ItemIndicator, { children: /* @__PURE__ */ t(v, { className: "size-4" }) }) }),
171
+ /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(a.ItemIndicator, { children: /* @__PURE__ */ t(v, { size: 16 }) }) }),
172
172
  /* @__PURE__ */ t(a.ItemText, { children: r })
173
173
  ]
174
174
  }
@@ -202,7 +202,7 @@ function m({
202
202
  ),
203
203
  "data-slot": "select-scroll-up-button",
204
204
  ...r,
205
- children: /* @__PURE__ */ t(h, { className: "size-4" })
205
+ children: /* @__PURE__ */ t(h, { size: 16 })
206
206
  }
207
207
  );
208
208
  }
@@ -220,7 +220,7 @@ function p({
220
220
  ),
221
221
  "data-slot": "select-scroll-down-button",
222
222
  ...r,
223
- children: /* @__PURE__ */ t(u, { className: "size-4" })
223
+ children: /* @__PURE__ */ t(u, { size: 16 })
224
224
  }
225
225
  );
226
226
  }
@@ -235,5 +235,5 @@ export {
235
235
  m as SelectScrollUpButton,
236
236
  C as SelectSeparator,
237
237
  z as SelectTrigger,
238
- N as SelectValue
238
+ w as SelectValue
239
239
  };
package/dist/sheet.d.ts CHANGED
@@ -10,7 +10,7 @@ import * as SheetPrimitive from "@radix-ui/react-dialog";
10
10
  */
11
11
  export type SheetSide = "top" | "right" | "bottom" | "left";
12
12
  declare const sheetContentVariants: (props?: ({
13
- side?: "left" | "right" | "top" | "bottom" | null | undefined;
13
+ side?: "left" | "right" | "bottom" | "top" | null | undefined;
14
14
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
15
15
  /**
16
16
  * Sheet root component that provides context for the sheet dialog.
package/dist/sonner.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("@brightlocal/icons"),u=require("class-variance-authority"),m=require("sonner"),x=require("@brightlocal/ui-components/button"),a=require("@brightlocal/ui-components/lib/utils"),b=u.cva(["flex","items-center","justify-between","w-full","md:w-auto","md:min-w-[364px]","rounded-md","border","border-border","p-4","gap-2","shadow-lg"].join(" "),{variants:{colorSchema:{default:"bg-white dark:bg-popover",success:"bg-green-200 dark:bg-popover"}},defaultVariants:{colorSchema:"default"}}),v=u.cva("text-sm leading-normal font-medium",{variants:{colorSchema:{default:"text-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}}),g=u.cva("text-sm leading-normal",{variants:{colorSchema:{default:"text-muted-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}}),s=u.cva("size-5",{variants:{colorSchema:{default:"text-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}});function p(n,e){switch(n){case"info":return o.jsx(c.Info,{className:a.cn(s({colorSchema:e}))});case"success":return o.jsx(c.CheckCircle2,{className:a.cn(s({colorSchema:e}))});case"warning":return o.jsx(c.AlertTriangle,{className:a.cn(s({colorSchema:e}))});case"error":return o.jsx(c.XCircle,{className:a.cn(s({colorSchema:e}))});case"loading":return o.jsx(c.Loader2,{className:a.cn(s({colorSchema:e}),"animate-spin")});default:return null}}function N(n,e){const{id:r,...t}=n,d=r!=null?{...e,id:e?.id??r}:e;m.toast.custom(l=>{const f=t.button&&t.button.label?{label:t.button.label,variant:t.button.variant,onClick:()=>{t.button?.onClick&&t.button.onClick(),m.toast.dismiss(l)}}:void 0;return o.jsx(j,{button:f,colorSchema:t.colorSchema,description:t.description,icon:t.icon??void 0,id:l,title:t.title})},d)}function j(n){const{button:e,description:r,icon:t,title:d,colorSchema:l}=n,i=(S=>S==="success"?"success":"default")(l);return o.jsxs("div",{"aria-atomic":"true","aria-live":"polite",className:a.cn(b({colorSchema:i})),role:"status",children:[o.jsxs("div",{className:"flex flex-1 items-start gap-2",children:[t!=null&&p(t,i),o.jsxs("div",{className:"w-full",children:[o.jsx("p",{className:a.cn(v({colorSchema:i})),children:d}),r&&o.jsx("p",{className:a.cn(g({colorSchema:i})),children:r})]})]}),e?.label&&o.jsx(x.Button,{"aria-label":e.label,className:"min-h-6 px-2 py-0 text-xs leading-normal font-medium",dataHook:"toast-action",size:"default",variant:e.variant,onClick:e.onClick,children:e.label})]})}function h(){return o.jsx(m.Toaster,{position:"top-right"})}h.displayName="Sonner";exports.Sonner=h;exports.sonner=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("@brightlocal/icons"),u=require("class-variance-authority"),m=require("sonner"),x=require("@brightlocal/ui-components/button"),a=require("@brightlocal/ui-components/lib/utils"),b=u.cva(["flex","items-center","justify-between","w-full","md:w-auto","md:min-w-[364px]","rounded-md","border","border-border","p-4","gap-2","shadow-lg"].join(" "),{variants:{colorSchema:{default:"bg-white dark:bg-popover",success:"bg-green-200 dark:bg-popover"}},defaultVariants:{colorSchema:"default"}}),v=u.cva("text-sm leading-normal font-medium",{variants:{colorSchema:{default:"text-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}}),g=u.cva("text-sm leading-normal",{variants:{colorSchema:{default:"text-muted-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}}),c=u.cva("",{variants:{colorSchema:{default:"text-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}});function p(n,e){switch(n){case"info":return o.jsx(r.Info,{className:a.cn(c({colorSchema:e})),size:20});case"success":return o.jsx(r.CheckCircle2,{className:a.cn(c({colorSchema:e})),size:20});case"warning":return o.jsx(r.AlertTriangle,{className:a.cn(c({colorSchema:e})),size:20});case"error":return o.jsx(r.XCircle,{className:a.cn(c({colorSchema:e})),size:20});case"loading":return o.jsx(r.Loader2,{className:a.cn(c({colorSchema:e}),"animate-spin"),size:20});default:return null}}function N(n,e){const{id:s,...t}=n,d=s!=null?{...e,id:e?.id??s}:e;m.toast.custom(l=>{const f=t.button&&t.button.label?{label:t.button.label,variant:t.button.variant,onClick:()=>{t.button?.onClick&&t.button.onClick(),m.toast.dismiss(l)}}:void 0;return o.jsx(j,{button:f,colorSchema:t.colorSchema,description:t.description,icon:t.icon??void 0,id:l,title:t.title})},d)}function j(n){const{button:e,description:s,icon:t,title:d,colorSchema:l}=n,i=(S=>S==="success"?"success":"default")(l);return o.jsxs("div",{"aria-atomic":"true","aria-live":"polite",className:a.cn(b({colorSchema:i})),role:"status",children:[o.jsxs("div",{className:"flex flex-1 items-start gap-2",children:[t!=null&&p(t,i),o.jsxs("div",{className:"w-full",children:[o.jsx("p",{className:a.cn(v({colorSchema:i})),children:d}),s&&o.jsx("p",{className:a.cn(g({colorSchema:i})),children:s})]})]}),e?.label&&o.jsx(x.Button,{"aria-label":e.label,className:"min-h-6 px-2 py-0 text-xs leading-normal font-medium",dataHook:"toast-action",size:"default",variant:e.variant,onClick:e.onClick,children:e.label})]})}function h(){return o.jsx(m.Toaster,{position:"top-right"})}h.displayName="Sonner";exports.Sonner=h;exports.sonner=N;
@@ -1 +1 @@
1
- {"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,KAAK,UAAU,GAAG;IAChB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,MAAM,CAAC,EAAE;QACP,wBAAwB;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,mCAAmC;QACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,mCAAmC;QACnC,OAAO,CAAC,EACJ,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,CAAC;KACf,CAAC;IACF,gCAAgC;IAChC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,mCAAmC;IACnC,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtD,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,KAAK,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAoGpE,iBAAS,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAkCtE;AAqDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,iBAAS,MAAM,4CAEd;kBAFQ,MAAM;;;AAKf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,KAAK,UAAU,GAAG;IAChB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,MAAM,CAAC,EAAE;QACP,wBAAwB;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,mCAAmC;QACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,mCAAmC;QACnC,OAAO,CAAC,EACJ,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,CAAC;KACf,CAAC;IACF,gCAAgC;IAChC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,mCAAmC;IACnC,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtD,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,KAAK,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAqGpE,iBAAS,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAkCtE;AAqDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,iBAAS,MAAM,4CAEd;kBAFQ,MAAM;;;AAKf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"}
package/dist/sonner.js CHANGED
@@ -50,7 +50,7 @@ const I = i(
50
50
  defaultVariants: {
51
51
  colorSchema: "default"
52
52
  }
53
- }), n = i("size-5", {
53
+ }), n = i("", {
54
54
  variants: {
55
55
  colorSchema: {
56
56
  default: "text-foreground",
@@ -64,25 +64,26 @@ const I = i(
64
64
  function A(r, e) {
65
65
  switch (r) {
66
66
  case "info":
67
- return /* @__PURE__ */ o(v, { className: a(n({ colorSchema: e })) });
67
+ return /* @__PURE__ */ o(v, { className: a(n({ colorSchema: e })), size: 20 });
68
68
  case "success":
69
- return /* @__PURE__ */ o(g, { className: a(n({ colorSchema: e })) });
69
+ return /* @__PURE__ */ o(g, { className: a(n({ colorSchema: e })), size: 20 });
70
70
  case "warning":
71
- return /* @__PURE__ */ o(b, { className: a(n({ colorSchema: e })) });
71
+ return /* @__PURE__ */ o(b, { className: a(n({ colorSchema: e })), size: 20 });
72
72
  case "error":
73
- return /* @__PURE__ */ o(p, { className: a(n({ colorSchema: e })) });
73
+ return /* @__PURE__ */ o(p, { className: a(n({ colorSchema: e })), size: 20 });
74
74
  case "loading":
75
75
  return /* @__PURE__ */ o(
76
76
  S,
77
77
  {
78
- className: a(n({ colorSchema: e }), "animate-spin")
78
+ className: a(n({ colorSchema: e }), "animate-spin"),
79
+ size: 20
79
80
  }
80
81
  );
81
82
  default:
82
83
  return null;
83
84
  }
84
85
  }
85
- function E(r, e) {
86
+ function y(r, e) {
86
87
  const { id: c, ...t } = r, m = c != null ? { ...e, id: e?.id ?? c } : e;
87
88
  f.custom((l) => {
88
89
  const u = t.button && t.button.label ? {
@@ -144,5 +145,5 @@ function w() {
144
145
  w.displayName = "Sonner";
145
146
  export {
146
147
  w as Sonner,
147
- E as sonner
148
+ y as sonner
148
149
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "BrightLocal Design System UI Components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -700,11 +700,11 @@ function DataTableColumnHeader<TData, TValue>({
700
700
  className="flex size-3 items-center justify-center"
701
701
  >
702
702
  {sortState === "desc" ? (
703
- <ArrowDownIcon className="size-3" />
703
+ <ArrowDownIcon size={12} />
704
704
  ) : sortState === "asc" ? (
705
- <ArrowUpIcon className="size-3" />
705
+ <ArrowUpIcon size={12} />
706
706
  ) : (
707
- <ArrowUpDownIcon className="size-3" />
707
+ <ArrowUpDownIcon size={12} />
708
708
  )}
709
709
  </span>
710
710
  </Button>
@@ -749,7 +749,7 @@ function DataTableRowActions<TData>({
749
749
  trackingLabel={trackingLabel}
750
750
  variant="ghost"
751
751
  >
752
- <EllipsisIcon className="size-4" />
752
+ <EllipsisIcon size={16} />
753
753
  </Button>
754
754
  </DropdownMenuTrigger>
755
755
  <DropdownMenuContent align="end" dataHook={`${dataHook}-menu`}>
@@ -967,7 +967,7 @@ function DataTableSearch<TData>({
967
967
  onChange={(event) => handleFilterChange(event.target.value)}
968
968
  />
969
969
  <InputGroupAddon className="pr-3">
970
- <SearchIcon className="size-4" />
970
+ <SearchIcon size={16} />
971
971
  </InputGroupAddon>
972
972
  </InputGroup>
973
973
  </div>
@@ -832,13 +832,14 @@ const SidebarGroupLabel = React.forwardRef<
832
832
  {variant === SidebarGroupLabelVariant.COLLAPSIBLE && (
833
833
  <ChevronDown
834
834
  className={cn(
835
- "size-4 shrink-0 transition-transform duration-200",
835
+ "shrink-0 transition-transform duration-200",
836
836
  isOpen && "rotate-180"
837
837
  )}
838
+ size={16}
838
839
  />
839
840
  )}
840
841
  {variant === SidebarGroupLabelVariant.ACTION && (
841
- <Plus className="size-4 shrink-0" />
842
+ <Plus className="shrink-0" size={16} />
842
843
  )}
843
844
  </Comp>
844
845
  );
@@ -185,7 +185,7 @@ const AccordionTrigger = React.forwardRef<
185
185
  {...props}
186
186
  >
187
187
  {children}
188
- <ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
188
+ <ChevronDownIcon className="text-muted-foreground pointer-events-none shrink-0 translate-y-0.5 transition-transform duration-200" size={16} />
189
189
  </AccordionPrimitive.Trigger>
190
190
  </AccordionPrimitive.Header>
191
191
  ));
@@ -167,7 +167,7 @@ const BreadcrumbEllipsis = React.forwardRef<
167
167
  role="presentation"
168
168
  {...props}
169
169
  >
170
- <MoreHorizontal className="size-4" />
170
+ <MoreHorizontal size={16} />
171
171
  <span className="sr-only">More</span>
172
172
  </span>
173
173
  ));
@@ -205,7 +205,8 @@ function Calendar({
205
205
  if (orientation === "left") {
206
206
  return (
207
207
  <ChevronLeft
208
- className={cn("size-4", chevronClassName)}
208
+ className={chevronClassName}
209
+ size={16}
209
210
  {...iconProps}
210
211
  />
211
212
  );
@@ -213,14 +214,16 @@ function Calendar({
213
214
  if (orientation === "right") {
214
215
  return (
215
216
  <ChevronRight
216
- className={cn("size-4", chevronClassName)}
217
+ className={chevronClassName}
218
+ size={16}
217
219
  {...iconProps}
218
220
  />
219
221
  );
220
222
  }
221
223
  return (
222
224
  <ChevronDown
223
- className={cn("size-4", chevronClassName)}
225
+ className={chevronClassName}
226
+ size={16}
224
227
  {...iconProps}
225
228
  />
226
229
  );
@@ -14,7 +14,15 @@ type CardVariant = "default" | "transparent" | "border" | "transparent-flush";
14
14
  const CardContext = React.createContext<{ flush: boolean }>({ flush: false });
15
15
 
16
16
  const cardVariants = cva(
17
- ["flex", "flex-col", "gap-8", "rounded-[14px]", "py-8", "transition-colors"],
17
+ [
18
+ "flex",
19
+ "flex-col",
20
+ "gap-8",
21
+ "rounded-xl",
22
+ "py-8",
23
+ "transition-colors",
24
+ "w-full",
25
+ ],
18
26
  {
19
27
  variants: {
20
28
  variant: {
@@ -61,6 +69,11 @@ type CardProps = React.ComponentProps<"div"> & {
61
69
  * Tracking label for analytics context
62
70
  */
63
71
  trackingLabel?: string;
72
+ /**
73
+ * Maximum width of the card (e.g., "420px", "600px", "100%")
74
+ * @default "400px"
75
+ */
76
+ maxWidth?: string | number;
64
77
  };
65
78
 
66
79
  /**
@@ -75,13 +88,22 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
75
88
  dataHook,
76
89
  trackingEl,
77
90
  trackingLabel,
91
+ maxWidth = "400px",
78
92
  children,
93
+ style,
79
94
  ...props
80
95
  },
81
96
  ref
82
97
  ) => {
83
98
  const flush = variant === "transparent-flush";
84
99
 
100
+ const maxWidthStyle =
101
+ maxWidth !== undefined
102
+ ? {
103
+ maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
104
+ }
105
+ : undefined;
106
+
85
107
  return (
86
108
  <CardContext.Provider value={{ flush }}>
87
109
  <div
@@ -91,6 +113,7 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
91
113
  data-slot="card"
92
114
  data-tracking-el={trackingEl || `card-${variant}`}
93
115
  data-tracking-label={trackingLabel}
116
+ style={{ ...maxWidthStyle, ...style }}
94
117
  {...props}
95
118
  >
96
119
  {children}
@@ -7,14 +7,13 @@ import { cn } from "@brightlocal/ui-components/lib/utils";
7
7
  * -----------------------------------------------------------------------------------------------*/
8
8
 
9
9
  /**
10
- * CentredLayout provides a responsive centered container with max-width constraint.
10
+ * CentredLayout provides a full-page centered container.
11
11
  *
12
12
  * Spacing tokens used:
13
13
  * - Padding: section-padding-x/y tokens (responsive: 16px mobile, 24px desktop)
14
14
  * - Header to content gap: gap-4 (spacing.4 = 16px)
15
- * - Max width: max-w-7xl (1280px) by default
16
15
  *
17
- * The component centers content horizontally and vertically.
16
+ * The component takes full page width/height and centers content horizontally and vertically.
18
17
  *
19
18
  * @example
20
19
  * // Basic usage
@@ -49,50 +48,28 @@ interface CentredLayoutProps extends React.ComponentProps<"div"> {
49
48
  * Tracking label for analytics context
50
49
  */
51
50
  trackingLabel?: string;
52
- /**
53
- * Custom max-width value (overrides default 1280px)
54
- */
55
- maxWidth?: string | number;
56
51
  }
57
52
 
58
53
  /**
59
- * CentredLayout component for centering content with responsive max-width constraints.
54
+ * CentredLayout component for centering content with full page width/height.
60
55
  */
61
56
  const CentredLayout = React.forwardRef<HTMLDivElement, CentredLayoutProps>(
62
57
  (
63
- {
64
- className,
65
- maxWidth,
66
- children,
67
- dataHook,
68
- trackingEl,
69
- trackingLabel,
70
- ...props
71
- },
58
+ { className, children, dataHook, trackingEl, trackingLabel, ...props },
72
59
  ref
73
60
  ) => {
74
- // If custom maxWidth is provided, use inline style; otherwise use default max-w-7xl
75
- const maxWidthStyle =
76
- maxWidth !== undefined
77
- ? {
78
- maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
79
- }
80
- : undefined;
81
-
82
61
  return (
83
62
  <div
84
63
  ref={ref}
85
64
  className={cn(
86
65
  // Base styles with section-padding tokens (responsive: 16px mobile, 24px desktop) and gap-4 for header/content spacing
87
- "bg-background flex min-h-screen flex-col items-center justify-center gap-4 p-section",
88
- !maxWidth && "max-w-7xl",
66
+ "bg-background flex min-h-screen w-full flex-col items-center justify-center gap-4 p-section",
89
67
  className
90
68
  )}
91
69
  data-hook={dataHook}
92
70
  data-slot="centred-layout"
93
71
  data-tracking-el={trackingEl}
94
72
  data-tracking-label={trackingLabel}
95
- style={maxWidthStyle}
96
73
  {...props}
97
74
  >
98
75
  {children}
@@ -161,7 +138,7 @@ const CentredLayoutContent = React.forwardRef<
161
138
  <div
162
139
  ref={ref}
163
140
  className={cn(
164
- "flex flex-1 flex-col items-center justify-center",
141
+ "flex w-full flex-1 flex-col items-center justify-center",
165
142
  className
166
143
  )}
167
144
  data-slot="centred-layout-content"
@@ -83,7 +83,7 @@ const Checkbox = React.forwardRef<HTMLButtonElement, CheckboxProps>(
83
83
  className="flex items-center justify-center text-current transition-none"
84
84
  data-slot="checkbox-indicator"
85
85
  >
86
- <CheckIcon className="size-3.5" />
86
+ <CheckIcon size={14} />
87
87
  </CheckboxPrimitive.Indicator>
88
88
  </CheckboxPrimitive.Root>
89
89
  );
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import * as React from "react";
4
- import { ChevronsUpDownIcon, CheckIcon, LoaderIcon } from "@brightlocal/icons";
4
+ import { ChevronsUpDownIcon, CheckIcon } from "@brightlocal/icons";
5
5
  import { cva, type VariantProps } from "class-variance-authority";
6
6
 
7
7
  import { cn } from "@brightlocal/ui-components/lib/utils";
@@ -261,7 +261,8 @@ const ComboboxTrigger = React.forwardRef<
261
261
  {children}
262
262
  <ChevronsUpDownIcon
263
263
  aria-hidden="true"
264
- className="text-muted-foreground ml-auto size-4 shrink-0"
264
+ className="text-muted-foreground ml-auto shrink-0"
265
+ size={16}
265
266
  />
266
267
  </button>
267
268
  </PopoverTrigger>
@@ -311,6 +312,11 @@ export interface ComboboxContentProps {
311
312
  children: React.ReactNode;
312
313
  /** Alignment of the popover relative to trigger */
313
314
  align?: "start" | "center" | "end";
315
+ /**
316
+ * Hide the list area (and the input border). Useful for async search
317
+ * where you want to hide results until a minimum character count.
318
+ */
319
+ hideList?: boolean;
314
320
  }
315
321
 
316
322
  function ComboboxContent({
@@ -318,6 +324,7 @@ function ComboboxContent({
318
324
  className,
319
325
  children,
320
326
  align = "start",
327
+ hideList = false,
321
328
  }: ComboboxContentProps) {
322
329
  const { shouldFilter } = useComboboxContext();
323
330
 
@@ -326,9 +333,14 @@ function ComboboxContent({
326
333
  align={align}
327
334
  className={cn("w-[var(--radix-popover-trigger-width)] p-0", className)}
328
335
  data-slot="combobox-popover"
336
+ side="bottom"
329
337
  >
330
338
  <Command
331
- className="border-0 shadow-none"
339
+ className={cn(
340
+ "border-0 shadow-none",
341
+ hideList &&
342
+ "[&_[data-slot='command-input-wrapper']]:border-b-0"
343
+ )}
332
344
  data-slot="combobox-command"
333
345
  dataHook={dataHook || "combobox-command"}
334
346
  shouldFilter={shouldFilter}
@@ -527,7 +539,8 @@ const ComboboxItem = React.forwardRef<
527
539
  {isSelected && (
528
540
  <CheckIcon
529
541
  aria-hidden="true"
530
- className="text-muted-foreground size-4 shrink-0"
542
+ className="text-muted-foreground shrink-0"
543
+ size={16}
531
544
  />
532
545
  )}
533
546
  </CommandItem>
@@ -576,7 +589,10 @@ function ComboboxLoading({ className, children }: ComboboxLoadingProps) {
576
589
  >
577
590
  {children || (
578
591
  <>
579
- <LoaderIcon aria-hidden="true" className="size-4 animate-spin" />
592
+ <div
593
+ aria-hidden="true"
594
+ className="size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"
595
+ />
580
596
  Loading...
581
597
  </>
582
598
  )}
@@ -127,7 +127,7 @@ const CommandInput = React.forwardRef<
127
127
  data-hook={dataHook}
128
128
  data-slot="command-input-wrapper"
129
129
  >
130
- <SearchIcon className="size-4 shrink-0 opacity-50" />
130
+ <SearchIcon className="shrink-0 opacity-50" size={16} />
131
131
  <CommandPrimitive.Input
132
132
  ref={inputRef}
133
133
  className={cn(
@@ -149,7 +149,7 @@ const CommandInput = React.forwardRef<
149
149
  variant="ghost"
150
150
  onClick={handleClear}
151
151
  >
152
- <XIcon className="size-4" />
152
+ <XIcon size={16} />
153
153
  </Button>
154
154
  )}
155
155
  </div>
@@ -337,7 +337,7 @@ const CommandItem = React.forwardRef<
337
337
  {...props}
338
338
  >
339
339
  {children}
340
- {selected && <CheckIcon className="text-foreground ml-auto size-4" />}
340
+ {selected && <CheckIcon className="text-foreground ml-auto" size={16} />}
341
341
  </CommandPrimitive.Item>
342
342
  )
343
343
  );
@@ -175,7 +175,7 @@ const ContextMenuSubTrigger = React.forwardRef<
175
175
  {...props}
176
176
  >
177
177
  {children}
178
- <ChevronRight className="ml-auto size-4" />
178
+ <ChevronRight className="ml-auto" size={16} />
179
179
  </ContextMenuPrimitive.SubTrigger>
180
180
  )
181
181
  );
@@ -341,7 +341,7 @@ const ContextMenuCheckboxItem = React.forwardRef<
341
341
  >
342
342
  <span className="absolute left-2 flex size-3.5 items-center justify-center">
343
343
  <ContextMenuPrimitive.ItemIndicator>
344
- <Check className="size-4" />
344
+ <Check size={16} />
345
345
  </ContextMenuPrimitive.ItemIndicator>
346
346
  </span>
347
347
  {children}
@@ -395,7 +395,7 @@ const ContextMenuRadioItem = React.forwardRef<
395
395
  >
396
396
  <span className="absolute left-2 flex size-3.5 items-center justify-center">
397
397
  <ContextMenuPrimitive.ItemIndicator>
398
- <Circle className="size-2 fill-current" />
398
+ <Circle className="fill-current" size={8} />
399
399
  </ContextMenuPrimitive.ItemIndicator>
400
400
  </span>
401
401
  {children}
@@ -281,7 +281,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
281
281
  >
282
282
  <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
283
283
  <DropdownMenuPrimitive.ItemIndicator>
284
- <Check className="size-4" />
284
+ <Check size={16} />
285
285
  </DropdownMenuPrimitive.ItemIndicator>
286
286
  </span>
287
287
  {children}
@@ -354,7 +354,7 @@ const DropdownMenuRadioItem = React.forwardRef<
354
354
  >
355
355
  <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
356
356
  <DropdownMenuPrimitive.ItemIndicator>
357
- <Circle className="size-2 fill-current" />
357
+ <Circle className="fill-current" size={8} />
358
358
  </DropdownMenuPrimitive.ItemIndicator>
359
359
  </span>
360
360
  {children}
@@ -515,7 +515,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
515
515
  {...props}
516
516
  >
517
517
  {children}
518
- <ChevronRight className="ml-auto size-4" />
518
+ <ChevronRight className="ml-auto" size={16} />
519
519
  </DropdownMenuPrimitive.SubTrigger>
520
520
  );
521
521
  }
@@ -647,7 +647,7 @@ const DropdownMenuTriggerAvatar = React.forwardRef<
647
647
  </span>
648
648
  )}
649
649
  </div>
650
- <ChevronsUpDown className="text-muted-foreground size-4 opacity-50" />
650
+ <ChevronsUpDown className="text-muted-foreground opacity-50" size={16} />
651
651
  </DropdownMenuPrimitive.Trigger>
652
652
  );
653
653
  }