@brightlocal/ui-components 1.2.0 → 1.2.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.
- package/component-meta.json +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +20 -16
- package/dist/centred-layout.cjs +1 -1
- package/dist/centred-layout.js +1 -1
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +53 -47
- package/dist/split-layout.cjs +1 -1
- package/dist/split-layout.js +9 -9
- package/package.json +1 -1
- package/src/components/card.tsx +8 -4
- package/src/components/centred-layout.tsx +1 -1
- package/src/components/sonner.tsx +36 -27
- package/src/components/split-layout.tsx +3 -3
package/component-meta.json
CHANGED
package/dist/card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h=require("react"),w=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils");function R(t){const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h=require("react"),w=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils");function R(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const a=R(h),c=a.createContext({flush:!1}),O=w.cva(["flex","flex-col","gap-8","rounded-xl","py-section-md","transition-colors","w-full"],{variants:{variant:{default:["bg-card","text-card-foreground","border","border-card-border"],transparent:["bg-transparent","text-foreground"],border:["bg-transparent","text-foreground","border","border-border"],"transparent-flush":["bg-transparent","text-foreground"]}},defaultVariants:{variant:"default"}}),i=a.forwardRef(({className:t,variant:e="default",dataHook:r,trackingEl:o,trackingLabel:x,maxWidth:n="400px",children:g,style:b,...y},j)=>{const v=e==="transparent-flush",N=n!==void 0?{maxWidth:typeof n=="number"?`${n}px`:n}:void 0;return s.jsx(c.Provider,{value:{flush:v},children:s.jsx("div",{ref:j,className:d.cn(O({variant:e}),t),"data-hook":r,"data-slot":"card","data-tracking-el":o||`card-${e}`,"data-tracking-label":x,style:{...N,...b},...y,children:g})})});i.displayName="Card";const l=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto]",!o&&"px-section-md",t),"data-slot":"card-header",...e})});l.displayName="CardHeader";const u=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("heading-sm",t),"data-slot":"card-title",...e}));u.displayName="CardTitle";const f=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("text-muted-foreground text-sm leading-normal font-normal",t),"data-slot":"card-description",...e}));f.displayName="CardDescription";const p=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:d.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),"data-slot":"card-action",...e}));p.displayName="CardAction";const m=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn(!o&&"px-section-md",t),"data-slot":"card-content",...e})});m.displayName="CardContent";const C=a.forwardRef(({className:t,...e},r)=>{const{flush:o}=a.useContext(c);return s.jsx("div",{ref:r,className:d.cn("flex items-center",!o&&"px-section-md",t),"data-slot":"card-footer",...e})});C.displayName="CardFooter";exports.Card=i;exports.CardAction=p;exports.CardContent=m;exports.CardDescription=f;exports.CardFooter=C;exports.CardHeader=l;exports.CardTitle=u;
|
package/dist/card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,KAAK,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AA0C9E;;GAEG;AACH,KAAK,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;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,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,IAAI,+FAyCT,CAAC;AAIF;;GAEG;AACH,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACzD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAgBf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,SAAS,2GASd,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,eAAe,2GAYpB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAYf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,WAAW,2GAYhB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,KAAK,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AA0C9E;;GAEG;AACH,KAAK,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;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,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,IAAI,+FAyCT,CAAC;AAIF;;GAEG;AACH,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACzD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAgBf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,SAAS,2GASd,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,eAAe,2GAYpB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAYf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,WAAW,2GAYhB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAgBf,CAAC;AAGF,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAC;AAEF,YAAY,EAAE,SAAS,EAAE,qBAAqB,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/card.js
CHANGED
|
@@ -2,13 +2,13 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import * as e from "react";
|
|
3
3
|
import { cva as x } from "class-variance-authority";
|
|
4
4
|
import { cn as s } from "@brightlocal/ui-components/lib/utils";
|
|
5
|
-
const
|
|
5
|
+
const c = e.createContext({ flush: !1 }), g = x(
|
|
6
6
|
[
|
|
7
7
|
"flex",
|
|
8
8
|
"flex-col",
|
|
9
9
|
"gap-8",
|
|
10
10
|
"rounded-xl",
|
|
11
|
-
"py-
|
|
11
|
+
"py-section-md",
|
|
12
12
|
"transition-colors",
|
|
13
13
|
"w-full"
|
|
14
14
|
],
|
|
@@ -41,26 +41,26 @@ const l = e.createContext({ flush: !1 }), g = x(
|
|
|
41
41
|
variant: a = "default",
|
|
42
42
|
dataHook: t,
|
|
43
43
|
trackingEl: d,
|
|
44
|
-
trackingLabel:
|
|
44
|
+
trackingLabel: l,
|
|
45
45
|
maxWidth: n = "400px",
|
|
46
46
|
children: i,
|
|
47
47
|
style: f,
|
|
48
|
-
...
|
|
49
|
-
},
|
|
50
|
-
const
|
|
48
|
+
...m
|
|
49
|
+
}, u) => {
|
|
50
|
+
const p = a === "transparent-flush", C = n !== void 0 ? {
|
|
51
51
|
maxWidth: typeof n == "number" ? `${n}px` : n
|
|
52
52
|
} : void 0;
|
|
53
|
-
return /* @__PURE__ */ o(
|
|
53
|
+
return /* @__PURE__ */ o(c.Provider, { value: { flush: p }, children: /* @__PURE__ */ o(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
ref:
|
|
56
|
+
ref: u,
|
|
57
57
|
className: s(g({ variant: a }), r),
|
|
58
58
|
"data-hook": t,
|
|
59
59
|
"data-slot": "card",
|
|
60
60
|
"data-tracking-el": d || `card-${a}`,
|
|
61
|
-
"data-tracking-label":
|
|
61
|
+
"data-tracking-label": l,
|
|
62
62
|
style: { ...C, ...f },
|
|
63
|
-
...
|
|
63
|
+
...m,
|
|
64
64
|
children: i
|
|
65
65
|
}
|
|
66
66
|
) });
|
|
@@ -69,14 +69,14 @@ const l = e.createContext({ flush: !1 }), g = x(
|
|
|
69
69
|
N.displayName = "Card";
|
|
70
70
|
const b = e.forwardRef(
|
|
71
71
|
({ className: r, ...a }, t) => {
|
|
72
|
-
const { flush: d } = e.useContext(
|
|
72
|
+
const { flush: d } = e.useContext(c);
|
|
73
73
|
return /* @__PURE__ */ o(
|
|
74
74
|
"div",
|
|
75
75
|
{
|
|
76
76
|
ref: t,
|
|
77
77
|
className: s(
|
|
78
78
|
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto]",
|
|
79
|
-
!d && "px-
|
|
79
|
+
!d && "px-section-md",
|
|
80
80
|
r
|
|
81
81
|
),
|
|
82
82
|
"data-slot": "card-header",
|
|
@@ -130,12 +130,12 @@ const w = e.forwardRef(
|
|
|
130
130
|
w.displayName = "CardAction";
|
|
131
131
|
const y = e.forwardRef(
|
|
132
132
|
({ className: r, ...a }, t) => {
|
|
133
|
-
const { flush: d } = e.useContext(
|
|
133
|
+
const { flush: d } = e.useContext(c);
|
|
134
134
|
return /* @__PURE__ */ o(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
ref: t,
|
|
138
|
-
className: s(!d && "px-
|
|
138
|
+
className: s(!d && "px-section-md", r),
|
|
139
139
|
"data-slot": "card-content",
|
|
140
140
|
...a
|
|
141
141
|
}
|
|
@@ -145,12 +145,16 @@ const y = e.forwardRef(
|
|
|
145
145
|
y.displayName = "CardContent";
|
|
146
146
|
const R = e.forwardRef(
|
|
147
147
|
({ className: r, ...a }, t) => {
|
|
148
|
-
const { flush: d } = e.useContext(
|
|
148
|
+
const { flush: d } = e.useContext(c);
|
|
149
149
|
return /* @__PURE__ */ o(
|
|
150
150
|
"div",
|
|
151
151
|
{
|
|
152
152
|
ref: t,
|
|
153
|
-
className: s(
|
|
153
|
+
className: s(
|
|
154
|
+
"flex items-center",
|
|
155
|
+
!d && "px-section-md",
|
|
156
|
+
r
|
|
157
|
+
),
|
|
154
158
|
"data-slot": "card-footer",
|
|
155
159
|
...a
|
|
156
160
|
}
|
package/dist/centred-layout.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),o=require("@brightlocal/ui-components/lib/utils");function m(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const c=m(y),l=c.forwardRef(({className:e,children:a,dataHook:t,trackingEl:r,trackingLabel:d,...i},f)=>n.jsx("div",{ref:f,className:o.cn("bg-background p-section flex min-h-screen w-full flex-col items-center justify-center gap-4",e),"data-hook":t,"data-slot":"centred-layout","data-tracking-el":r,"data-tracking-label":d,...i,children:a}));l.displayName="CentredLayout";const s=c.forwardRef(({className:e,children:a,...t},r)=>n.jsx("div",{ref:r,className:o.cn("flex w-full items-center justify-center lg:justify-start",e),"data-slot":"centred-layout-header",...t,children:a}));s.displayName="CentredLayoutHeader";const u=c.forwardRef(({className:e,children:a,...t},r)=>n.jsx("div",{ref:r,className:o.cn("flex w-full flex-1 flex-col items-center justify-center",e),"data-slot":"centred-layout-content",...t,children:a}));u.displayName="CentredLayoutContent";exports.CentredLayout=l;exports.CentredLayoutContent=u;exports.CentredLayoutHeader=s;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),o=require("@brightlocal/ui-components/lib/utils");function m(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const c=m(y),l=c.forwardRef(({className:e,children:a,dataHook:t,trackingEl:r,trackingLabel:d,...i},f)=>n.jsx("div",{ref:f,className:o.cn("bg-background p-section-sm flex min-h-screen w-full flex-col items-center justify-center gap-4",e),"data-hook":t,"data-slot":"centred-layout","data-tracking-el":r,"data-tracking-label":d,...i,children:a}));l.displayName="CentredLayout";const s=c.forwardRef(({className:e,children:a,...t},r)=>n.jsx("div",{ref:r,className:o.cn("flex w-full items-center justify-center lg:justify-start",e),"data-slot":"centred-layout-header",...t,children:a}));s.displayName="CentredLayoutHeader";const u=c.forwardRef(({className:e,children:a,...t},r)=>n.jsx("div",{ref:r,className:o.cn("flex w-full flex-1 flex-col items-center justify-center",e),"data-slot":"centred-layout-content",...t,children:a}));u.displayName="CentredLayoutContent";exports.CentredLayout=l;exports.CentredLayoutContent=u;exports.CentredLayoutHeader=s;
|
package/dist/centred-layout.js
CHANGED
|
@@ -8,7 +8,7 @@ const f = o.forwardRef(
|
|
|
8
8
|
ref: c,
|
|
9
9
|
className: l(
|
|
10
10
|
// Base styles with section-padding tokens (responsive: 16px mobile, 24px desktop) and gap-4 for header/content spacing
|
|
11
|
-
"bg-background p-section flex min-h-screen w-full flex-col items-center justify-center gap-4",
|
|
11
|
+
"bg-background p-section-sm flex min-h-screen w-full flex-col items-center justify-center gap-4",
|
|
12
12
|
e
|
|
13
13
|
),
|
|
14
14
|
"data-hook": a,
|
package/dist/sonner.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("@brightlocal/icons"),m=require("class-variance-authority"),d=require("sonner"),b=require("@brightlocal/ui-components/button"),o=require("@brightlocal/ui-components/lib/utils"),g=4e3,v=m.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"}}),p=m.cva("text-sm leading-normal font-medium",{variants:{colorSchema:{default:"text-foreground",success:"text-green-900 dark:text-green-100"}},defaultVariants:{colorSchema:"default"}}),N=m.cva("text-sm leading-normal",{variants:{colorSchema:{default:"text-muted-foreground",success:"text-green-900 dark:text-green-100"}},defaultVariants:{colorSchema:"default"}}),l=m.cva("",{variants:{colorSchema:{default:"text-foreground",success:"text-green-900 dark:text-green-100"}},defaultVariants:{colorSchema:"default"}});function j(s,e){switch(s){case"info":return t.jsx(i.Info,{className:o.cn(l({colorSchema:e}))});case"success":return t.jsx(i.CheckCircle2,{className:o.cn(l({colorSchema:e}))});case"warning":return t.jsx(i.AlertTriangle,{className:o.cn(l({colorSchema:e}))});case"error":return t.jsx(i.XCircle,{className:o.cn(l({colorSchema:e}))});case"loading":return t.jsx(i.Loader2,{className:o.cn(l({colorSchema:e}),"animate-spin")});default:return null}}const x=function(e,r){const{id:c,...n}=e,u={...r,duration:r?.duration??g,...c!=null&&{id:r?.id??c}},h=u.duration===1/0;d.toast.custom(a=>{const f=n.button&&n.button.label?{label:n.button.label,variant:n.button.variant,onClick:()=>{n.button?.onClick&&n.button.onClick(),d.toast.dismiss(a)}}:void 0;return t.jsx(T,{button:f,colorSchema:n.colorSchema,description:n.description,icon:n.icon??void 0,id:a,title:n.title})},{...u,...h&&{dismissible:!1}})};x.dismiss=s=>{d.toast.dismiss(s)};function T(s){const{button:e,description:r,icon:c,title:n,colorSchema:u}=s,a=(f=>f==="success"?"success":"default")(u);return t.jsxs("div",{"aria-atomic":"true","aria-live":"polite",className:o.cn(v({colorSchema:a})),role:"status",children:[t.jsxs("div",{className:"flex flex-1 items-start gap-2",children:[c!=null&&j(c,a),t.jsxs("div",{className:"w-full",children:[t.jsx("p",{className:o.cn(p({colorSchema:a})),children:n}),r&&t.jsx("p",{className:o.cn(N({colorSchema:a})),children:r})]})]}),e?.label&&t.jsx(b.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 S(){return t.jsx(d.Toaster,{position:"top-right"})}S.displayName="Sonner";exports.Sonner=S;exports.sonner=x;
|
package/dist/sonner.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type SonnerColorSchema = "default" | "success";
|
|
|
36
36
|
type SonnerCustomOptions = {
|
|
37
37
|
className?: string;
|
|
38
38
|
id?: string | number;
|
|
39
|
-
/** Duration in ms before the toast auto-dismisses. Set to `Infinity`
|
|
39
|
+
/** Duration in ms before the toast auto-dismisses. Set to `Infinity` for a persistent toast that can only be dismissed programmatically via `sonner.dismiss(id)` or through an action button. @default 4000 */
|
|
40
40
|
duration?: number;
|
|
41
41
|
};
|
|
42
42
|
/**
|
package/dist/sonner.d.ts.map
CHANGED
|
@@ -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;IACrB
|
|
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;IACrB,+MAA+M;IAC/M,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,KAAK,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAuGpE,UAAU,QAAQ;IAChB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACzD,mCAAmC;IACnC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,QAAA,MAAM,MAAM,EAAE,QA+Cb,CAAC;AAyDF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,iBAAS,MAAM,4CAEd;kBAFQ,MAAM;;;AAKf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/sonner.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { Loader2 as S, XCircle as p, AlertTriangle as
|
|
3
|
-
import { cva as
|
|
2
|
+
import { Loader2 as S, XCircle as p, AlertTriangle as b, CheckCircle2 as g, Info as v } from "@brightlocal/icons";
|
|
3
|
+
import { cva as d } from "class-variance-authority";
|
|
4
4
|
import { Toaster as x, toast as f } from "sonner";
|
|
5
5
|
import { Button as N } from "@brightlocal/ui-components/button";
|
|
6
6
|
import { cn as a } from "@brightlocal/ui-components/lib/utils";
|
|
7
|
-
const
|
|
7
|
+
const I = 4e3, T = d(
|
|
8
8
|
[
|
|
9
9
|
"flex",
|
|
10
10
|
"items-center",
|
|
@@ -30,7 +30,7 @@ const T = 4e3, I = i(
|
|
|
30
30
|
colorSchema: "default"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
), k =
|
|
33
|
+
), k = d("text-sm leading-normal font-medium", {
|
|
34
34
|
variants: {
|
|
35
35
|
colorSchema: {
|
|
36
36
|
default: "text-foreground",
|
|
@@ -40,7 +40,7 @@ const T = 4e3, I = i(
|
|
|
40
40
|
defaultVariants: {
|
|
41
41
|
colorSchema: "default"
|
|
42
42
|
}
|
|
43
|
-
}), A =
|
|
43
|
+
}), A = d("text-sm leading-normal", {
|
|
44
44
|
variants: {
|
|
45
45
|
colorSchema: {
|
|
46
46
|
default: "text-muted-foreground",
|
|
@@ -50,7 +50,7 @@ const T = 4e3, I = i(
|
|
|
50
50
|
defaultVariants: {
|
|
51
51
|
colorSchema: "default"
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), i = d("", {
|
|
54
54
|
variants: {
|
|
55
55
|
colorSchema: {
|
|
56
56
|
default: "text-foreground",
|
|
@@ -61,72 +61,78 @@ const T = 4e3, I = i(
|
|
|
61
61
|
colorSchema: "default"
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
function C(
|
|
65
|
-
switch (
|
|
64
|
+
function C(n, e) {
|
|
65
|
+
switch (n) {
|
|
66
66
|
case "info":
|
|
67
|
-
return /* @__PURE__ */ o(v, { className: a(
|
|
67
|
+
return /* @__PURE__ */ o(v, { className: a(i({ colorSchema: e })) });
|
|
68
68
|
case "success":
|
|
69
|
-
return /* @__PURE__ */ o(
|
|
69
|
+
return /* @__PURE__ */ o(g, { className: a(i({ colorSchema: e })) });
|
|
70
70
|
case "warning":
|
|
71
|
-
return /* @__PURE__ */ o(
|
|
71
|
+
return /* @__PURE__ */ o(b, { className: a(i({ colorSchema: e })) });
|
|
72
72
|
case "error":
|
|
73
|
-
return /* @__PURE__ */ o(p, { className: a(
|
|
73
|
+
return /* @__PURE__ */ o(p, { className: a(i({ colorSchema: e })) });
|
|
74
74
|
case "loading":
|
|
75
75
|
return /* @__PURE__ */ o(
|
|
76
76
|
S,
|
|
77
77
|
{
|
|
78
|
-
className: a(
|
|
78
|
+
className: a(i({ colorSchema: e }), "animate-spin")
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
default:
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
const w = function(e,
|
|
86
|
-
const { id: c, ...t } = e,
|
|
87
|
-
...
|
|
88
|
-
duration:
|
|
89
|
-
...c != null && { id:
|
|
90
|
-
};
|
|
91
|
-
f.custom(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
85
|
+
const w = function(e, s) {
|
|
86
|
+
const { id: c, ...t } = e, l = {
|
|
87
|
+
...s,
|
|
88
|
+
duration: s?.duration ?? I,
|
|
89
|
+
...c != null && { id: s?.id ?? c }
|
|
90
|
+
}, h = l.duration === 1 / 0;
|
|
91
|
+
f.custom(
|
|
92
|
+
(r) => {
|
|
93
|
+
const m = t.button && t.button.label ? {
|
|
94
|
+
label: t.button.label,
|
|
95
|
+
variant: t.button.variant,
|
|
96
|
+
onClick: () => {
|
|
97
|
+
t.button?.onClick && t.button.onClick(), f.dismiss(r);
|
|
98
|
+
}
|
|
99
|
+
} : void 0;
|
|
100
|
+
return /* @__PURE__ */ o(
|
|
101
|
+
V,
|
|
102
|
+
{
|
|
103
|
+
button: m,
|
|
104
|
+
colorSchema: t.colorSchema,
|
|
105
|
+
description: t.description,
|
|
106
|
+
icon: t.icon ?? void 0,
|
|
107
|
+
id: r,
|
|
108
|
+
title: t.title
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
...l,
|
|
114
|
+
...h && { dismissible: !1 }
|
|
115
|
+
}
|
|
116
|
+
);
|
|
111
117
|
};
|
|
112
|
-
w.dismiss = (
|
|
113
|
-
f.dismiss(
|
|
118
|
+
w.dismiss = (n) => {
|
|
119
|
+
f.dismiss(n);
|
|
114
120
|
};
|
|
115
|
-
function V(
|
|
116
|
-
const { button: e, description:
|
|
121
|
+
function V(n) {
|
|
122
|
+
const { button: e, description: s, icon: c, title: t, colorSchema: l } = n, r = ((m) => m === "success" ? "success" : "default")(l);
|
|
117
123
|
return /* @__PURE__ */ u(
|
|
118
124
|
"div",
|
|
119
125
|
{
|
|
120
126
|
"aria-atomic": "true",
|
|
121
127
|
"aria-live": "polite",
|
|
122
|
-
className: a(
|
|
128
|
+
className: a(T({ colorSchema: r })),
|
|
123
129
|
role: "status",
|
|
124
130
|
children: [
|
|
125
131
|
/* @__PURE__ */ u("div", { className: "flex flex-1 items-start gap-2", children: [
|
|
126
|
-
c != null && C(c,
|
|
132
|
+
c != null && C(c, r),
|
|
127
133
|
/* @__PURE__ */ u("div", { className: "w-full", children: [
|
|
128
|
-
/* @__PURE__ */ o("p", { className: a(k({ colorSchema:
|
|
129
|
-
|
|
134
|
+
/* @__PURE__ */ o("p", { className: a(k({ colorSchema: r })), children: t }),
|
|
135
|
+
s && /* @__PURE__ */ o("p", { className: a(A({ colorSchema: r })), children: s })
|
|
130
136
|
] })
|
|
131
137
|
] }),
|
|
132
138
|
e?.label && /* @__PURE__ */ o(
|
package/dist/split-layout.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),N=require("react"),c=require("@brightlocal/ui-components/lib/utils");function R(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const l=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,l.get?l:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const n=R(N),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),N=require("react"),c=require("@brightlocal/ui-components/lib/utils");function R(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const l=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,l.get?l:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const n=R(N),x=n.createContext(!1),j=n.forwardRef(({className:t,dataHook:a,trackingEl:e,trackingLabel:l,left:r,right:u,children:L,...C},S)=>{const d=[],f=[],p=[],m=o=>{if(n.isValidElement(o)){if(o.type===n.Fragment){n.Children.forEach(o.props.children,m);return}o.type===y?d.push(o):o.type===i?p.push(o):f.push(o)}};n.Children.forEach(L,m);const b=r!=null||u!=null,v=f.length>0||p.length>0,g=b&&!v,w=d.length>0;return s.jsxs("div",{ref:S,className:c.cn("flex min-h-screen w-full flex-col lg:flex-row",t),"data-hook":a,"data-slot":"split-layout","data-tracking-el":e||"split-layout","data-tracking-label":l,...C,children:[s.jsx("div",{className:"bg-background flex flex-1 flex-col","data-slot":"split-layout-body",children:s.jsxs(x.Provider,{value:w,children:[d,g?r&&s.jsx(h,{children:r}):f]})}),g?u&&s.jsx(i,{children:u}):p]})});j.displayName="SplitLayout";const y=n.forwardRef(({className:t,children:a,...e},l)=>s.jsx("div",{ref:l,className:c.cn("px-section-sm pt-section-sm flex w-full items-center justify-center lg:justify-start",t),"data-slot":"split-layout-header",...e,children:a}));y.displayName="SplitLayoutHeader";const h=n.forwardRef(({className:t,children:a,...e},l)=>{const r=n.useContext(x);return s.jsx("div",{ref:l,className:c.cn("p-section-sm flex flex-1 items-center justify-center overflow-auto",r&&"pt-2",t),"data-slot":"split-layout-left",...e,children:a})});h.displayName="SplitLayoutContentLeft";const i=n.forwardRef(({className:t,children:a,...e},l)=>s.jsx("div",{ref:l,className:c.cn("bg-card p-section-sm hidden flex-1 items-center justify-center overflow-auto lg:flex",t),"data-slot":"split-layout-right",...e,children:a}));i.displayName="SplitLayoutContentRight";exports.SplitLayout=j;exports.SplitLayoutContentLeft=h;exports.SplitLayoutContentRight=i;exports.SplitLayoutHeader=y;
|
package/dist/split-layout.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { cn as i } from "@brightlocal/ui-components/lib/utils";
|
|
4
4
|
const x = t.createContext(!1), j = t.forwardRef(
|
|
@@ -25,8 +25,8 @@ const x = t.createContext(!1), j = t.forwardRef(
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
t.Children.forEach(L, y);
|
|
28
|
-
const N = r != null || c != null, S = f.length > 0 || p.length > 0,
|
|
29
|
-
return /* @__PURE__ */
|
|
28
|
+
const N = r != null || c != null, S = f.length > 0 || p.length > 0, m = N && !S, R = d.length > 0;
|
|
29
|
+
return /* @__PURE__ */ h(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
ref: w,
|
|
@@ -45,13 +45,13 @@ const x = t.createContext(!1), j = t.forwardRef(
|
|
|
45
45
|
{
|
|
46
46
|
className: "bg-background flex flex-1 flex-col",
|
|
47
47
|
"data-slot": "split-layout-body",
|
|
48
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ h(x.Provider, { value: R, children: [
|
|
49
49
|
d,
|
|
50
|
-
|
|
50
|
+
m ? r && /* @__PURE__ */ n(C, { children: r }) : f
|
|
51
51
|
] })
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
|
|
54
|
+
m ? c && /* @__PURE__ */ n(u, { children: c }) : p
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
);
|
|
@@ -63,7 +63,7 @@ const g = t.forwardRef(({ className: a, children: l, ...o }, s) => /* @__PURE__
|
|
|
63
63
|
{
|
|
64
64
|
ref: s,
|
|
65
65
|
className: i(
|
|
66
|
-
"px-section pt-section flex w-full items-center justify-center lg:justify-start",
|
|
66
|
+
"px-section-sm pt-section-sm flex w-full items-center justify-center lg:justify-start",
|
|
67
67
|
a
|
|
68
68
|
),
|
|
69
69
|
"data-slot": "split-layout-header",
|
|
@@ -79,7 +79,7 @@ const C = t.forwardRef(({ className: a, children: l, ...o }, s) => {
|
|
|
79
79
|
{
|
|
80
80
|
ref: s,
|
|
81
81
|
className: i(
|
|
82
|
-
"p-section flex flex-1 items-center justify-center overflow-auto",
|
|
82
|
+
"p-section-sm flex flex-1 items-center justify-center overflow-auto",
|
|
83
83
|
r && "pt-2",
|
|
84
84
|
a
|
|
85
85
|
),
|
|
@@ -95,7 +95,7 @@ const u = t.forwardRef(({ className: a, children: l, ...o }, s) => /* @__PURE__
|
|
|
95
95
|
{
|
|
96
96
|
ref: s,
|
|
97
97
|
className: i(
|
|
98
|
-
"bg-card p-section hidden flex-1 items-center justify-center overflow-auto lg:flex",
|
|
98
|
+
"bg-card p-section-sm hidden flex-1 items-center justify-center overflow-auto lg:flex",
|
|
99
99
|
a
|
|
100
100
|
),
|
|
101
101
|
"data-slot": "split-layout-right",
|
package/package.json
CHANGED
package/src/components/card.tsx
CHANGED
|
@@ -19,7 +19,7 @@ const cardVariants = cva(
|
|
|
19
19
|
"flex-col",
|
|
20
20
|
"gap-8",
|
|
21
21
|
"rounded-xl",
|
|
22
|
-
"py-
|
|
22
|
+
"py-section-md",
|
|
23
23
|
"transition-colors",
|
|
24
24
|
"w-full",
|
|
25
25
|
],
|
|
@@ -150,7 +150,7 @@ const CardHeader = React.forwardRef<HTMLDivElement, CardSubComponentProps>(
|
|
|
150
150
|
ref={ref}
|
|
151
151
|
className={cn(
|
|
152
152
|
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto]",
|
|
153
|
-
!flush && "px-
|
|
153
|
+
!flush && "px-section-md",
|
|
154
154
|
className
|
|
155
155
|
)}
|
|
156
156
|
data-slot="card-header"
|
|
@@ -221,7 +221,7 @@ const CardContent = React.forwardRef<HTMLDivElement, CardSubComponentProps>(
|
|
|
221
221
|
return (
|
|
222
222
|
<div
|
|
223
223
|
ref={ref}
|
|
224
|
-
className={cn(!flush && "px-
|
|
224
|
+
className={cn(!flush && "px-section-md", className)}
|
|
225
225
|
data-slot="card-content"
|
|
226
226
|
{...props}
|
|
227
227
|
/>
|
|
@@ -239,7 +239,11 @@ const CardFooter = React.forwardRef<HTMLDivElement, CardSubComponentProps>(
|
|
|
239
239
|
return (
|
|
240
240
|
<div
|
|
241
241
|
ref={ref}
|
|
242
|
-
className={cn(
|
|
242
|
+
className={cn(
|
|
243
|
+
"flex items-center",
|
|
244
|
+
!flush && "px-section-md",
|
|
245
|
+
className
|
|
246
|
+
)}
|
|
243
247
|
data-slot="card-footer"
|
|
244
248
|
{...props}
|
|
245
249
|
/>
|
|
@@ -63,7 +63,7 @@ const CentredLayout = React.forwardRef<HTMLDivElement, CentredLayoutProps>(
|
|
|
63
63
|
ref={ref}
|
|
64
64
|
className={cn(
|
|
65
65
|
// Base styles with section-padding tokens (responsive: 16px mobile, 24px desktop) and gap-4 for header/content spacing
|
|
66
|
-
"bg-background p-section flex min-h-screen w-full flex-col items-center justify-center gap-4",
|
|
66
|
+
"bg-background p-section-sm flex min-h-screen w-full flex-col items-center justify-center gap-4",
|
|
67
67
|
className
|
|
68
68
|
)}
|
|
69
69
|
data-hook={dataHook}
|
|
@@ -61,7 +61,7 @@ export type SonnerColorSchema = "default" | "success";
|
|
|
61
61
|
type SonnerCustomOptions = {
|
|
62
62
|
className?: string;
|
|
63
63
|
id?: string | number;
|
|
64
|
-
/** Duration in ms before the toast auto-dismisses. Set to `Infinity`
|
|
64
|
+
/** Duration in ms before the toast auto-dismisses. Set to `Infinity` for a persistent toast that can only be dismissed programmatically via `sonner.dismiss(id)` or through an action button. @default 4000 */
|
|
65
65
|
duration?: number;
|
|
66
66
|
};
|
|
67
67
|
|
|
@@ -188,33 +188,42 @@ const sonner: SonnerFn = function sonner(
|
|
|
188
188
|
...(providedId != null && { id: options?.id ?? providedId }),
|
|
189
189
|
};
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
const buttonWithDismiss =
|
|
194
|
-
rest.button && rest.button.label
|
|
195
|
-
? {
|
|
196
|
-
label: rest.button.label,
|
|
197
|
-
variant: rest.button.variant,
|
|
198
|
-
onClick: () => {
|
|
199
|
-
if (rest.button?.onClick) {
|
|
200
|
-
rest.button.onClick();
|
|
201
|
-
}
|
|
202
|
-
sonnerToast.dismiss(id);
|
|
203
|
-
},
|
|
204
|
-
}
|
|
205
|
-
: undefined;
|
|
191
|
+
// Persistent toasts (duration: Infinity) should not be swipeable
|
|
192
|
+
const isPersistent = mergedOptions.duration === Infinity;
|
|
206
193
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
194
|
+
sonnerToast.custom(
|
|
195
|
+
(id) => {
|
|
196
|
+
// Wrap button onClick to include dismiss logic
|
|
197
|
+
const buttonWithDismiss =
|
|
198
|
+
rest.button && rest.button.label
|
|
199
|
+
? {
|
|
200
|
+
label: rest.button.label,
|
|
201
|
+
variant: rest.button.variant,
|
|
202
|
+
onClick: () => {
|
|
203
|
+
if (rest.button?.onClick) {
|
|
204
|
+
rest.button.onClick();
|
|
205
|
+
}
|
|
206
|
+
sonnerToast.dismiss(id);
|
|
207
|
+
},
|
|
208
|
+
}
|
|
209
|
+
: undefined;
|
|
210
|
+
|
|
211
|
+
return (
|
|
212
|
+
<Toast
|
|
213
|
+
button={buttonWithDismiss}
|
|
214
|
+
colorSchema={rest.colorSchema}
|
|
215
|
+
description={rest.description}
|
|
216
|
+
icon={rest.icon ?? undefined}
|
|
217
|
+
id={id}
|
|
218
|
+
title={rest.title}
|
|
219
|
+
/>
|
|
220
|
+
);
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
...mergedOptions,
|
|
224
|
+
...(isPersistent && { dismissible: false }),
|
|
225
|
+
}
|
|
226
|
+
);
|
|
218
227
|
};
|
|
219
228
|
|
|
220
229
|
sonner.dismiss = (id: string | number) => {
|
|
@@ -177,7 +177,7 @@ const SplitLayoutHeader = React.forwardRef<
|
|
|
177
177
|
<div
|
|
178
178
|
ref={ref}
|
|
179
179
|
className={cn(
|
|
180
|
-
"px-section pt-section flex w-full items-center justify-center lg:justify-start",
|
|
180
|
+
"px-section-sm pt-section-sm flex w-full items-center justify-center lg:justify-start",
|
|
181
181
|
className
|
|
182
182
|
)}
|
|
183
183
|
data-slot="split-layout-header"
|
|
@@ -214,7 +214,7 @@ const SplitLayoutContentLeft = React.forwardRef<
|
|
|
214
214
|
<div
|
|
215
215
|
ref={ref}
|
|
216
216
|
className={cn(
|
|
217
|
-
"p-section flex flex-1 items-center justify-center overflow-auto",
|
|
217
|
+
"p-section-sm flex flex-1 items-center justify-center overflow-auto",
|
|
218
218
|
hasHeader && "pt-2",
|
|
219
219
|
className
|
|
220
220
|
)}
|
|
@@ -250,7 +250,7 @@ const SplitLayoutContentRight = React.forwardRef<
|
|
|
250
250
|
<div
|
|
251
251
|
ref={ref}
|
|
252
252
|
className={cn(
|
|
253
|
-
"bg-card p-section hidden flex-1 items-center justify-center overflow-auto lg:flex",
|
|
253
|
+
"bg-card p-section-sm hidden flex-1 items-center justify-center overflow-auto lg:flex",
|
|
254
254
|
className
|
|
255
255
|
)}
|
|
256
256
|
data-slot="split-layout-right"
|