@brightlocal/ui-components 2.17.1 → 2.19.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.
- package/README.md +83 -1
- package/component-meta.json +23 -7
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +23 -2
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +21 -19
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +64 -63
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +2 -0
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +426 -403
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +22 -2
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +93 -72
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +1 -7
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +23 -3
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +44 -42
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +10 -0
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +30 -29
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +5 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +9 -7
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +44 -42
- package/dist/hooks/use-prefers-reduced-motion.cjs +1 -1
- package/dist/hooks/use-prefers-reduced-motion.d.ts +25 -2
- package/dist/hooks/use-prefers-reduced-motion.d.ts.map +1 -1
- package/dist/hooks/use-prefers-reduced-motion.js +17 -11
- package/dist/index.cjs +1 -1
- package/dist/index.js +38 -37
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +13 -2
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +110 -53
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +44 -37
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +26 -25
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +17 -2
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +29 -27
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.d.ts +15 -13
- package/dist/stepper.d.ts.map +1 -1
- package/dist/stepper.js +84 -85
- package/package.json +3 -3
- package/src/blocks/input-list.tsx +8 -1
- package/src/blocks/sidebar.tsx +47 -7
- package/src/components/alert-dialog.tsx +38 -4
- package/src/components/card.tsx +56 -9
- package/src/components/chip.tsx +1 -4
- package/src/components/dialog.tsx +39 -6
- package/src/components/dropdown-menu.tsx +7 -1
- package/src/components/field.tsx +6 -0
- package/src/components/global-layout.tsx +3 -1
- package/src/components/link.tsx +103 -27
- package/src/components/logo.tsx +19 -25
- package/src/components/map.tsx +1 -2
- package/src/components/progress.tsx +12 -6
- package/src/components/sheet.tsx +30 -5
- package/src/components/stepper.tsx +93 -80
- package/src/hooks/use-prefers-reduced-motion.ts +35 -5
package/dist/dropdown-menu.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),z=require("react"),P=require("@radix-ui/react-dropdown-menu"),c=require("@brightlocal/icons"),l=require("@brightlocal/ui-components/lib/utils");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=m(z),r=m(P);function f({...e}){return o.jsx(r.Root,{...e})}f.displayName="DropdownMenu";function g({...e}){return o.jsx(r.Portal,{...e})}g.displayName="DropdownMenuPortal";const w=u.forwardRef(({className:e,dataHook:t,trackingEl:n,trackingLabel:a,...
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),z=require("react"),P=require("@radix-ui/react-dropdown-menu"),c=require("@brightlocal/icons"),l=require("@brightlocal/ui-components/lib/utils");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=m(z),r=m(P);function f({...e}){return o.jsx(r.Root,{...e})}f.displayName="DropdownMenu";function g({...e}){return o.jsx(r.Portal,{...e})}g.displayName="DropdownMenuPortal";const w=u.forwardRef(({className:e,dataHook:t,trackingEl:n,trackingLabel:a,...d},s)=>o.jsx(r.Trigger,{ref:s,className:e,"data-slot":"dropdown-menu-trigger","data-tracking-el":n,"data-tracking-label":a,...t!=null&&{"data-hook":t},...d}));w.displayName="DropdownMenuTrigger";const x=u.forwardRef(({className:e,sideOffset:t=4,align:n="start",dataHook:a,trackingEl:d,trackingLabel:s,...i},p)=>o.jsx(r.Portal,{children:o.jsx(r.Content,{ref:p,align:n,className:l.cn(["bg-popover text-popover-foreground","z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem]","origin-(--radix-dropdown-menu-content-transform-origin)","overflow-x-hidden overflow-y-auto","rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"],e),"data-hook":a,"data-slot":"dropdown-menu-content","data-tracking-el":d,"data-tracking-label":s,sideOffset:t,...i})}));x.displayName="DropdownMenuContent";function b({...e}){return o.jsx(r.Group,{...e})}b.displayName="DropdownMenuGroup";const h=u.forwardRef(({className:e,inset:t,dataHook:n,trackingEl:a,trackingLabel:d,...s},i)=>o.jsx(r.Item,{ref:i,className:l.cn(["relative flex cursor-default items-center gap-2 self-stretch select-none","rounded-sm px-2 py-1.5 text-sm leading-normal outline-hidden","[&>span]:overflow-hidden [&>span]:text-ellipsis [&>span]:whitespace-nowrap","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","data-[inset]:pl-8","[&_svg]:pointer-events-none [&_svg]:shrink-0"],e),"data-hook":n,"data-inset":t,"data-slot":"dropdown-menu-item","data-tracking-el":a,"data-tracking-label":d,...s}));h.displayName="DropdownMenuItem";const D=u.forwardRef(({className:e,children:t,checked:n,dataHook:a,trackingEl:d,trackingLabel:s,...i},p)=>o.jsxs(r.CheckboxItem,{ref:p,checked:n,className:l.cn(["relative flex cursor-default items-center gap-2 select-none","rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],e),"data-hook":a,"data-slot":"dropdown-menu-checkbox-item","data-tracking-el":d,"data-tracking-label":s,...i,children:[o.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(r.ItemIndicator,{children:o.jsx(c.Check,{})})}),t]}));D.displayName="DropdownMenuCheckboxItem";function M({...e}){return o.jsx(r.RadioGroup,{...e})}M.displayName="DropdownMenuRadioGroup";const v=u.forwardRef(({className:e,children:t,dataHook:n,trackingEl:a,trackingLabel:d,...s},i)=>o.jsxs(r.RadioItem,{ref:i,className:l.cn(["relative flex cursor-default items-center gap-2 select-none","rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],e),"data-hook":n,"data-slot":"dropdown-menu-radio-item","data-tracking-el":a,"data-tracking-label":d,...s,children:[o.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(r.ItemIndicator,{children:o.jsx(c.Circle,{className:"fill-current",size:8})})}),t]}));v.displayName="DropdownMenuRadioItem";const y=u.forwardRef(({className:e,inset:t,dataHook:n,...a},d)=>o.jsx(r.Label,{ref:d,className:l.cn(["px-2 py-1.5 text-sm leading-normal font-semibold","data-[inset]:pl-8"],e),"data-hook":n,"data-inset":t,"data-slot":"dropdown-menu-label",...a}));y.displayName="DropdownMenuLabel";const j=u.forwardRef(({className:e,...t},n)=>o.jsx(r.Separator,{ref:n,className:l.cn(["bg-border -mx-1 my-1 h-px"],e),"data-slot":"dropdown-menu-separator",...t}));j.displayName="DropdownMenuSeparator";function N({className:e,...t}){return o.jsx("span",{className:l.cn(["text-popover-foreground ml-auto text-xs leading-normal opacity-60"],e),"data-slot":"dropdown-menu-shortcut",...t})}N.displayName="DropdownMenuShortcut";function k({...e}){return o.jsx(r.Sub,{...e})}k.displayName="DropdownMenuSub";const R=u.forwardRef(({className:e,inset:t,children:n,dataHook:a,trackingEl:d,trackingLabel:s,...i},p)=>o.jsxs(r.SubTrigger,{ref:p,className:l.cn(["flex cursor-default items-center gap-2 select-none","rounded-sm px-2 py-1.5 text-sm outline-hidden","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground","data-[inset]:pl-8","[&_svg]:pointer-events-none [&_svg]:shrink-0"],e),"data-hook":a,"data-inset":t,"data-slot":"dropdown-menu-sub-trigger","data-tracking-el":d,"data-tracking-label":s,...i,children:[n,o.jsx(c.ChevronRight,{className:"ml-auto"})]}));R.displayName="DropdownMenuSubTrigger";const S=u.forwardRef(({className:e,...t},n)=>o.jsx(r.SubContent,{ref:n,className:l.cn(["bg-popover text-popover-foreground","z-50 min-w-[8rem]","origin-(--radix-dropdown-menu-content-transform-origin)","overflow-hidden rounded-md border p-1 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"],e),"data-slot":"dropdown-menu-sub-content",...t}));S.displayName="DropdownMenuSubContent";const C=u.forwardRef(({className:e,dataHook:t,trackingEl:n,trackingLabel:a,avatar:d,title:s,description:i,disabled:p,ariaLabel:I,...T},_)=>o.jsxs(r.Trigger,{ref:_,"aria-label":I??s,className:l.cn(["flex items-center gap-2 rounded-lg border px-3 py-2","bg-popover shadow-sm","outline-none","hover:bg-accent","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50"],e),"data-hook":t,"data-slot":"dropdown-menu-trigger-avatar","data-tracking-el":n,"data-tracking-label":a,disabled:p,...T,children:[d,o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col items-start",children:[o.jsx("span",{className:"w-full overflow-hidden text-sm leading-normal font-semibold text-ellipsis whitespace-nowrap",children:s}),i&&o.jsx("span",{className:"text-muted-foreground w-full overflow-hidden text-xs leading-normal text-ellipsis whitespace-nowrap",children:i})]}),o.jsx(c.ChevronsUpDown,{className:"text-muted-foreground opacity-50"})]}));C.displayName="DropdownMenuTriggerAvatar";exports.DropdownMenu=f;exports.DropdownMenuCheckboxItem=D;exports.DropdownMenuContent=x;exports.DropdownMenuGroup=b;exports.DropdownMenuItem=h;exports.DropdownMenuLabel=y;exports.DropdownMenuPortal=g;exports.DropdownMenuRadioGroup=M;exports.DropdownMenuRadioItem=v;exports.DropdownMenuSeparator=j;exports.DropdownMenuShortcut=N;exports.DropdownMenuSub=k;exports.DropdownMenuSubContent=S;exports.DropdownMenuSubTrigger=R;exports.DropdownMenuTrigger=w;exports.DropdownMenuTriggerAvatar=C;
|
package/dist/dropdown-menu.d.ts
CHANGED
|
@@ -192,6 +192,11 @@ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<Dropdo
|
|
|
192
192
|
trackingLabel?: string;
|
|
193
193
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
194
194
|
type DropdownMenuLabelProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
195
|
+
/**
|
|
196
|
+
* Data hook for automated testing
|
|
197
|
+
* @example "dropdown-menu-label"
|
|
198
|
+
*/
|
|
199
|
+
dataHook?: string;
|
|
195
200
|
/**
|
|
196
201
|
* Indent the label (for hierarchical menus)
|
|
197
202
|
*/
|
|
@@ -201,6 +206,11 @@ type DropdownMenuLabelProps = React.ComponentPropsWithoutRef<typeof DropdownMenu
|
|
|
201
206
|
* Label/header for menu sections
|
|
202
207
|
*/
|
|
203
208
|
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
209
|
+
/**
|
|
210
|
+
* Data hook for automated testing
|
|
211
|
+
* @example "dropdown-menu-label"
|
|
212
|
+
*/
|
|
213
|
+
dataHook?: string;
|
|
204
214
|
/**
|
|
205
215
|
* Indent the label (for hierarchical menus)
|
|
206
216
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAUvE;;GAEG;AACH,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,2CAEzD;kBAJQ,YAAY;;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qB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,CAAC;AAEF,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAC"}
|
package/dist/dropdown-menu.js
CHANGED
|
@@ -15,16 +15,16 @@ function D({
|
|
|
15
15
|
return /* @__PURE__ */ t(n.Portal, { ...e });
|
|
16
16
|
}
|
|
17
17
|
D.displayName = "DropdownMenuPortal";
|
|
18
|
-
const N = l.forwardRef(({ className: e, dataHook: o, trackingEl: a, trackingLabel: r, ...
|
|
18
|
+
const N = l.forwardRef(({ className: e, dataHook: o, trackingEl: a, trackingLabel: r, ...d }, s) => /* @__PURE__ */ t(
|
|
19
19
|
n.Trigger,
|
|
20
20
|
{
|
|
21
|
-
ref:
|
|
21
|
+
ref: s,
|
|
22
22
|
className: e,
|
|
23
23
|
"data-slot": "dropdown-menu-trigger",
|
|
24
24
|
"data-tracking-el": a,
|
|
25
25
|
"data-tracking-label": r,
|
|
26
26
|
...o != null && { "data-hook": o },
|
|
27
|
-
...
|
|
27
|
+
...d
|
|
28
28
|
}
|
|
29
29
|
));
|
|
30
30
|
N.displayName = "DropdownMenuTrigger";
|
|
@@ -34,8 +34,8 @@ const M = l.forwardRef(
|
|
|
34
34
|
sideOffset: o = 4,
|
|
35
35
|
align: a = "start",
|
|
36
36
|
dataHook: r,
|
|
37
|
-
trackingEl:
|
|
38
|
-
trackingLabel:
|
|
37
|
+
trackingEl: d,
|
|
38
|
+
trackingLabel: s,
|
|
39
39
|
...i
|
|
40
40
|
}, u) => /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(
|
|
41
41
|
n.Content,
|
|
@@ -62,8 +62,8 @@ const M = l.forwardRef(
|
|
|
62
62
|
),
|
|
63
63
|
"data-hook": r,
|
|
64
64
|
"data-slot": "dropdown-menu-content",
|
|
65
|
-
"data-tracking-el":
|
|
66
|
-
"data-tracking-label":
|
|
65
|
+
"data-tracking-el": d,
|
|
66
|
+
"data-tracking-label": s,
|
|
67
67
|
sideOffset: o,
|
|
68
68
|
...i
|
|
69
69
|
}
|
|
@@ -77,7 +77,7 @@ function y({
|
|
|
77
77
|
}
|
|
78
78
|
y.displayName = "DropdownMenuGroup";
|
|
79
79
|
const k = l.forwardRef(
|
|
80
|
-
({ className: e, inset: o, dataHook: a, trackingEl: r, trackingLabel:
|
|
80
|
+
({ className: e, inset: o, dataHook: a, trackingEl: r, trackingLabel: d, ...s }, i) => /* @__PURE__ */ t(
|
|
81
81
|
n.Item,
|
|
82
82
|
{
|
|
83
83
|
ref: i,
|
|
@@ -100,8 +100,8 @@ const k = l.forwardRef(
|
|
|
100
100
|
"data-inset": o,
|
|
101
101
|
"data-slot": "dropdown-menu-item",
|
|
102
102
|
"data-tracking-el": r,
|
|
103
|
-
"data-tracking-label":
|
|
104
|
-
...
|
|
103
|
+
"data-tracking-label": d,
|
|
104
|
+
...s
|
|
105
105
|
}
|
|
106
106
|
)
|
|
107
107
|
);
|
|
@@ -112,8 +112,8 @@ const R = l.forwardRef(
|
|
|
112
112
|
children: o,
|
|
113
113
|
checked: a,
|
|
114
114
|
dataHook: r,
|
|
115
|
-
trackingEl:
|
|
116
|
-
trackingLabel:
|
|
115
|
+
trackingEl: d,
|
|
116
|
+
trackingLabel: s,
|
|
117
117
|
...i
|
|
118
118
|
}, u) => /* @__PURE__ */ c(
|
|
119
119
|
n.CheckboxItem,
|
|
@@ -133,8 +133,8 @@ const R = l.forwardRef(
|
|
|
133
133
|
),
|
|
134
134
|
"data-hook": r,
|
|
135
135
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
136
|
-
"data-tracking-el":
|
|
137
|
-
"data-tracking-label":
|
|
136
|
+
"data-tracking-el": d,
|
|
137
|
+
"data-tracking-label": s,
|
|
138
138
|
...i,
|
|
139
139
|
children: [
|
|
140
140
|
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(w, {}) }) }),
|
|
@@ -151,7 +151,7 @@ function S({
|
|
|
151
151
|
}
|
|
152
152
|
S.displayName = "DropdownMenuRadioGroup";
|
|
153
153
|
const C = l.forwardRef(
|
|
154
|
-
({ className: e, children: o, dataHook: a, trackingEl: r, trackingLabel:
|
|
154
|
+
({ className: e, children: o, dataHook: a, trackingEl: r, trackingLabel: d, ...s }, i) => /* @__PURE__ */ c(
|
|
155
155
|
n.RadioItem,
|
|
156
156
|
{
|
|
157
157
|
ref: i,
|
|
@@ -169,8 +169,8 @@ const C = l.forwardRef(
|
|
|
169
169
|
"data-hook": a,
|
|
170
170
|
"data-slot": "dropdown-menu-radio-item",
|
|
171
171
|
"data-tracking-el": r,
|
|
172
|
-
"data-tracking-label":
|
|
173
|
-
...
|
|
172
|
+
"data-tracking-label": d,
|
|
173
|
+
...s,
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(b, { className: "fill-current", size: 8 }) }) }),
|
|
176
176
|
o
|
|
@@ -179,10 +179,10 @@ const C = l.forwardRef(
|
|
|
179
179
|
)
|
|
180
180
|
);
|
|
181
181
|
C.displayName = "DropdownMenuRadioItem";
|
|
182
|
-
const I = l.forwardRef(({ className: e, inset: o,
|
|
182
|
+
const I = l.forwardRef(({ className: e, inset: o, dataHook: a, ...r }, d) => /* @__PURE__ */ t(
|
|
183
183
|
n.Label,
|
|
184
184
|
{
|
|
185
|
-
ref:
|
|
185
|
+
ref: d,
|
|
186
186
|
className: p(
|
|
187
187
|
[
|
|
188
188
|
"px-2 py-1.5 text-sm leading-normal font-semibold",
|
|
@@ -190,9 +190,10 @@ const I = l.forwardRef(({ className: e, inset: o, ...a }, r) => /* @__PURE__ */
|
|
|
190
190
|
],
|
|
191
191
|
e
|
|
192
192
|
),
|
|
193
|
+
"data-hook": a,
|
|
193
194
|
"data-inset": o,
|
|
194
195
|
"data-slot": "dropdown-menu-label",
|
|
195
|
-
...
|
|
196
|
+
...r
|
|
196
197
|
}
|
|
197
198
|
));
|
|
198
199
|
I.displayName = "DropdownMenuLabel";
|
|
@@ -235,8 +236,8 @@ const G = l.forwardRef(
|
|
|
235
236
|
inset: o,
|
|
236
237
|
children: a,
|
|
237
238
|
dataHook: r,
|
|
238
|
-
trackingEl:
|
|
239
|
-
trackingLabel:
|
|
239
|
+
trackingEl: d,
|
|
240
|
+
trackingLabel: s,
|
|
240
241
|
...i
|
|
241
242
|
}, u) => /* @__PURE__ */ c(
|
|
242
243
|
n.SubTrigger,
|
|
@@ -257,8 +258,8 @@ const G = l.forwardRef(
|
|
|
257
258
|
"data-hook": r,
|
|
258
259
|
"data-inset": o,
|
|
259
260
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
260
|
-
"data-tracking-el":
|
|
261
|
-
"data-tracking-label":
|
|
261
|
+
"data-tracking-el": d,
|
|
262
|
+
"data-tracking-label": s,
|
|
262
263
|
...i,
|
|
263
264
|
children: [
|
|
264
265
|
a,
|
|
@@ -300,8 +301,8 @@ const j = l.forwardRef(
|
|
|
300
301
|
dataHook: o,
|
|
301
302
|
trackingEl: a,
|
|
302
303
|
trackingLabel: r,
|
|
303
|
-
avatar:
|
|
304
|
-
title:
|
|
304
|
+
avatar: d,
|
|
305
|
+
title: s,
|
|
305
306
|
description: i,
|
|
306
307
|
disabled: u,
|
|
307
308
|
ariaLabel: m,
|
|
@@ -310,7 +311,7 @@ const j = l.forwardRef(
|
|
|
310
311
|
n.Trigger,
|
|
311
312
|
{
|
|
312
313
|
ref: g,
|
|
313
|
-
"aria-label": m ??
|
|
314
|
+
"aria-label": m ?? s,
|
|
314
315
|
className: p(
|
|
315
316
|
[
|
|
316
317
|
"flex items-center gap-2 rounded-lg border px-3 py-2",
|
|
@@ -329,9 +330,9 @@ const j = l.forwardRef(
|
|
|
329
330
|
disabled: u,
|
|
330
331
|
...f,
|
|
331
332
|
children: [
|
|
332
|
-
|
|
333
|
+
d,
|
|
333
334
|
/* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
|
|
334
|
-
/* @__PURE__ */ t("span", { className: "w-full overflow-hidden text-sm leading-normal font-semibold text-ellipsis whitespace-nowrap", children:
|
|
335
|
+
/* @__PURE__ */ t("span", { className: "w-full overflow-hidden text-sm leading-normal font-semibold text-ellipsis whitespace-nowrap", children: s }),
|
|
335
336
|
i && /* @__PURE__ */ t("span", { className: "text-muted-foreground w-full overflow-hidden text-xs leading-normal text-ellipsis whitespace-nowrap", children: i })
|
|
336
337
|
] }),
|
|
337
338
|
/* @__PURE__ */ t(x, { className: "text-muted-foreground opacity-50" })
|
package/dist/field.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),g=require("class-variance-authority"),p=require("@brightlocal/icons"),r=require("@brightlocal/ui-components/lib/utils"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),g=require("class-variance-authority"),p=require("@brightlocal/icons"),r=require("@brightlocal/ui-components/lib/utils"),h=require("./description.cjs"),b=require("@brightlocal/ui-components/label");function n({className:e,...a}){return l.jsx("fieldset",{className:r.cn("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),"data-slot":"field-set",...a})}n.displayName="FieldSet";const m=["legend","label"];function v({className:e,variant:a="legend",...t}){return l.jsx("legend",{className:r.cn("mb-3 font-medium","data-[variant=legend]:text-base","data-[variant=label]:text-sm",e),"data-slot":"field-legend","data-variant":a,...t})}function x({className:e,...a}){return l.jsx("div",{className:r.cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",e),"data-slot":"field-group",...a})}const _=g.cva(["group/field flex w-full gap-2","[[data-slot=radio-group]_&]:relative [[data-slot=radio-group]_&]:cursor-pointer [[data-slot=radio-group]_&]:gap-3 [[data-slot=radio-group]_&]:has-[[data-disabled]]:cursor-not-allowed","[[data-slot=radio-group]_&_[data-slot=field-label]]:after:absolute [[data-slot=radio-group]_&_[data-slot=field-label]]:after:inset-0 [[data-slot=radio-group]_&_[data-slot=field-label]]:after:cursor-pointer [[data-slot=radio-group]_&:has([data-disabled])_[data-slot=field-label]]:after:cursor-not-allowed","has-[>[role=checkbox]]:gap-3","has-[>[role=checkbox]]:[&_[data-slot=field-label]]:leading-normal"],{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["grid grid-cols-[auto_1fr] items-center gap-x-2","[&>[data-slot=field-description]]:col-start-2 [&>[data-slot=field-error]]:col-start-2","has-[>[data-slot=field-content]]:items-start"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:grid @md/field-group:grid-cols-[auto_1fr] @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-description]]:col-start-2 @md/field-group:[&>[data-slot=field-error]]:col-start-2","@md/field-group:has-[>[data-slot=field-content]]:items-start"]},variant:{default:[],box:["relative cursor-pointer gap-3","rounded-lg border border-border bg-background p-3","transition-colors","[&_[data-slot=field-label]]:after:absolute [&_[data-slot=field-label]]:after:inset-0 [&_[data-slot=field-label]]:after:cursor-pointer","has-[:focus-visible]:shadow-default has-[:focus-visible]:border-ring","has-[[data-state=checked]:not([role=switch])]:border-primary has-[[data-state=checked]:not([role=switch])]:bg-primary/10","dark:has-[[data-state=checked]:not([role=switch])]:bg-alpha-10","has-[[data-disabled]]:cursor-not-allowed","[&:has([data-disabled])_[data-slot=field-label]]:after:cursor-not-allowed","[[aria-invalid=true]_&]:border-destructive-40","[[aria-invalid=true]_&]:has-[:focus-visible]:border-destructive-40 [[aria-invalid=true]_&]:has-[:focus-visible]:shadow-destructive","has-[[aria-invalid=true]]:border-destructive-40","has-[[aria-invalid=true]:focus-visible]:border-destructive-40 has-[[aria-invalid=true]:focus-visible]:shadow-destructive"]}},defaultVariants:{orientation:"vertical",variant:"default"}});function k({className:e,orientation:a="vertical",variant:t="default",align:d="start",dataHook:i,...o}){return l.jsx("div",{className:r.cn(_({orientation:a,variant:t}),d==="end"&&a==="horizontal"&&"grid-cols-[1fr_auto]",e),"data-hook":i,"data-orientation":a,"data-slot":"field","data-variant":t,role:"group",...o})}function w({className:e,...a}){return l.jsx("div",{className:r.cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug","[[data-variant=boxIconVertical]_&]:items-center [[data-variant=boxIconVertical]_&]:text-center",e),"data-slot":"field-content",...a})}function F({className:e,htmlFor:a,dataHook:t,...d}){return l.jsx(b.Label,{className:r.cn("group/field-label peer/field-label w-fit","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e),"data-hook":t,"data-slot":"field-label",htmlFor:a,...d})}function j({className:e,dataHook:a,...t}){return l.jsx(h.Description,{className:r.cn("mt-2","group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",e),"data-hook":a,"data-slot":"field-description",...t})}function y({icon:e=p.AlertCircle,className:a,...t}){return l.jsx(e,{"aria-hidden":"true",className:r.cn("inline-block shrink-0 align-text-bottom",a),...t})}function N({className:e,dataHook:a,children:t,errors:d,...i}){const o=d?.filter(s=>!!s?.message);if(!t&&(!o||o.length===0))return null;const c=r.cn("text-destructive-foreground text-sm font-normal leading-5","mt-2","group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",e),u=o&&o.length>1;return l.jsx("div",{className:c,"data-hook":a,"data-slot":"field-error",role:"alert",...i,children:u?l.jsx("ul",{className:"list-disc space-y-1 pl-4",children:o.map((s,f)=>l.jsx("li",{children:s.message},f))}):l.jsx("p",{className:"m-0",children:t||o?.[0]?.message})})}exports.Field=k;exports.FieldContent=w;exports.FieldDescription=j;exports.FieldError=N;exports.FieldErrorIcon=y;exports.FieldGroup=x;exports.FieldLabel=F;exports.FieldLegend=v;exports.FieldSet=n;exports.fieldLegendVariants=m;
|
package/dist/field.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ declare const fieldVariants: (props?: ({
|
|
|
23
23
|
* Props for the Field component
|
|
24
24
|
*/
|
|
25
25
|
interface FieldProps extends React.ComponentProps<"div">, VariantProps<typeof fieldVariants> {
|
|
26
|
+
/**
|
|
27
|
+
* Data hook for automated testing
|
|
28
|
+
*/
|
|
29
|
+
dataHook?: string;
|
|
26
30
|
/**
|
|
27
31
|
* Controls the grid column sizing for horizontal orientation.
|
|
28
32
|
* - `"start"` (default): `auto 1fr` — control left, content right
|
|
@@ -30,7 +34,7 @@ interface FieldProps extends React.ComponentProps<"div">, VariantProps<typeof fi
|
|
|
30
34
|
*/
|
|
31
35
|
align?: "start" | "end";
|
|
32
36
|
}
|
|
33
|
-
declare function Field({ className, orientation, variant, align, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare function Field({ className, orientation, variant, align, dataHook, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
34
38
|
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
35
39
|
interface FieldLabelProps extends LabelProps {
|
|
36
40
|
/**
|
package/dist/field.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components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EACV,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,YAAY,GACb,CAAC;AAEF,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/field.js
CHANGED
|
@@ -3,8 +3,8 @@ import { cva as u } from "class-variance-authority";
|
|
|
3
3
|
import { AlertCircle as g } from "@brightlocal/icons";
|
|
4
4
|
import { cn as r } from "@brightlocal/ui-components/lib/utils";
|
|
5
5
|
import { Description as p } from "./description.js";
|
|
6
|
-
import { Label as
|
|
7
|
-
function
|
|
6
|
+
import { Label as h } from "@brightlocal/ui-components/label";
|
|
7
|
+
function m({ className: t, ...a }) {
|
|
8
8
|
return /* @__PURE__ */ l(
|
|
9
9
|
"fieldset",
|
|
10
10
|
{
|
|
@@ -18,7 +18,7 @@ function h({ className: t, ...a }) {
|
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
m.displayName = "FieldSet";
|
|
22
22
|
const y = ["legend", "label"];
|
|
23
23
|
function F({
|
|
24
24
|
className: t,
|
|
@@ -115,7 +115,8 @@ function z({
|
|
|
115
115
|
orientation: a = "vertical",
|
|
116
116
|
variant: e = "default",
|
|
117
117
|
align: d = "start",
|
|
118
|
-
|
|
118
|
+
dataHook: i,
|
|
119
|
+
...o
|
|
119
120
|
}) {
|
|
120
121
|
return /* @__PURE__ */ l(
|
|
121
122
|
"div",
|
|
@@ -125,11 +126,12 @@ function z({
|
|
|
125
126
|
d === "end" && a === "horizontal" && "grid-cols-[1fr_auto]",
|
|
126
127
|
t
|
|
127
128
|
),
|
|
129
|
+
"data-hook": i,
|
|
128
130
|
"data-orientation": a,
|
|
129
131
|
"data-slot": "field",
|
|
130
132
|
"data-variant": e,
|
|
131
133
|
role: "group",
|
|
132
|
-
...
|
|
134
|
+
...o
|
|
133
135
|
}
|
|
134
136
|
);
|
|
135
137
|
}
|
|
@@ -155,7 +157,7 @@ function I({
|
|
|
155
157
|
...d
|
|
156
158
|
}) {
|
|
157
159
|
return /* @__PURE__ */ l(
|
|
158
|
-
|
|
160
|
+
h,
|
|
159
161
|
{
|
|
160
162
|
className: r(
|
|
161
163
|
// Base label styles from primitives are inherited via Label component
|
|
@@ -249,6 +251,6 @@ export {
|
|
|
249
251
|
V as FieldGroup,
|
|
250
252
|
I as FieldLabel,
|
|
251
253
|
F as FieldLegend,
|
|
252
|
-
|
|
254
|
+
m as FieldSet,
|
|
253
255
|
y as fieldLegendVariants
|
|
254
256
|
};
|
package/dist/global-layout.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h=require("react"),d=require("@brightlocal/ui-components/lib/utils"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h=require("react"),d=require("@brightlocal/ui-components/lib/utils"),v=require("./header.cjs"),w=require("./scroll-area.cjs");function k(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const i=k(h),u=i.forwardRef(({className:t,maxWidth:a="var(--ds-breakpoint-xl)",dataHook:e,trackingEl:o,trackingLabel:l,children:n,...r},c)=>{const g=typeof a=="number"?`${a}px`:a;return s.jsx(w.ScrollArea,{className:d.cn("h-dvh w-full [&>[data-radix-scroll-area-viewport]>div]:block! [&>[data-radix-scroll-area-viewport]>div]:min-w-0!",t),dataHook:`${e}-scroll`,scrollOrientation:"both",children:s.jsx("div",{ref:c,className:"p-section-sm flex min-h-dvh w-full flex-col","data-hook":e,"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:g},children:n})})})});u.displayName="GlobalLayout";const G="224px",b=i.forwardRef(({className:t,width:a=G,dataHook:e,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",t),"data-hook":e,"data-slot":"sidebar-container",...l,style:{width:r,top:"var(--ds-section-padding-y-sm)",height:"calc(100dvh - 2 * var(--ds-section-padding-y-sm))",...l.style},children:o})});b.displayName="GlobalLayoutSidebar";const y=i.forwardRef(({className:t,maxWidth:a="var(--ds-breakpoint-lg)",dataHook:e,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",t),"data-hook":e,"data-slot":"content-wrapper",style:{"--content-max-width":r},...l,children:o})});y.displayName="GlobalLayoutContent";const f=i.forwardRef(({className:t,dataHook:a,trackingEl:e,trackingLabel:o,children:l,...n},r)=>s.jsx(v.Header,{ref:r,className:d.cn("mx-auto w-full flex-wrap justify-between gap-4",t),"data-slot":"content-header",dataHook:a,style:{maxWidth:"var(--ds-breakpoint-lg)"},trackingEl:e,trackingLabel:o,...n,children:l}));f.displayName="GlobalLayoutContentHeader";const m=i.forwardRef(({className:t,dataHook:a,trackingEl:e,trackingLabel:o,children:l,...n},r)=>s.jsx("div",{ref:r,className:d.cn("mx-auto hidden w-full items-center justify-end gap-2 lg:flex",t),"data-hook":a,"data-slot":"content-actions","data-tracking-el":e,"data-tracking-label":o,style:{maxWidth:"var(--ds-breakpoint-lg)"},...n,children:l}));m.displayName="GlobalLayoutContentActions";const x=i.forwardRef(({className:t,dataHook:a,trackingEl:e,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",t),"data-hook":a,"data-slot":"content-body","data-tracking-el":e,"data-tracking-label":o,style:{maxWidth:"var(--content-max-width)"},...n,children:l}));x.displayName="GlobalLayoutContentBody";const p=i.forwardRef(({className:t,dataHook:a,ariaLabel:e,trackingEl:o,trackingLabel:l,children:n,...r},c)=>s.jsx("div",{ref:c,"aria-label":e??"Mobile navigation",className:d.cn("flex w-full items-center justify-start gap-2.5 py-2 lg:hidden",t),"data-hook":a,"data-slot":"mobile-header","data-tracking-el":o,"data-tracking-label":l,role:"toolbar",...r,children:n}));p.displayName="GlobalLayoutMobileHeader";exports.GlobalLayout=u;exports.GlobalLayoutContent=y;exports.GlobalLayoutContentActions=m;exports.GlobalLayoutContentBody=x;exports.GlobalLayoutContentHeader=f;exports.GlobalLayoutMobileHeader=p;exports.GlobalLayoutSidebar=b;
|
|
@@ -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,uGA6CjB,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,
|
|
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,QA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,CAAC;IACxE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,uBAAuB,kHAuB5B,CAAC;AAIF,UAAU,6BAA8B,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACzE;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,wBAAwB,mHAmC7B,CAAC;AAIF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,GACzB,CAAC;AAEF,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,+BAA+B,EAC/B,8BAA8B,EAC9B,4BAA4B,EAC5B,6BAA6B,GAC9B,CAAC"}
|
package/dist/global-layout.js
CHANGED
|
@@ -2,20 +2,20 @@ import { jsx as d } from "react/jsx-runtime";
|
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
import { cn as i } from "@brightlocal/ui-components/lib/utils";
|
|
4
4
|
import { Header as m } from "./header.js";
|
|
5
|
-
import { ScrollArea as
|
|
6
|
-
const
|
|
5
|
+
import { ScrollArea as y } from "./scroll-area.js";
|
|
6
|
+
const b = s.forwardRef(
|
|
7
7
|
({
|
|
8
8
|
className: o,
|
|
9
9
|
maxWidth: a = "var(--ds-breakpoint-xl)",
|
|
10
10
|
dataHook: t,
|
|
11
|
-
trackingEl:
|
|
12
|
-
trackingLabel:
|
|
11
|
+
trackingEl: l,
|
|
12
|
+
trackingLabel: e,
|
|
13
13
|
children: r,
|
|
14
14
|
...n
|
|
15
15
|
}, c) => {
|
|
16
16
|
const f = typeof a == "number" ? `${a}px` : a;
|
|
17
17
|
return /* @__PURE__ */ d(
|
|
18
|
-
|
|
18
|
+
y,
|
|
19
19
|
{
|
|
20
20
|
className: i(
|
|
21
21
|
"h-dvh w-full [&>[data-radix-scroll-area-viewport]>div]:block! [&>[data-radix-scroll-area-viewport]>div]:min-w-0!",
|
|
@@ -30,8 +30,8 @@ const y = s.forwardRef(
|
|
|
30
30
|
className: "p-section-sm flex min-h-dvh w-full flex-col",
|
|
31
31
|
"data-hook": t,
|
|
32
32
|
"data-slot": "global-layout",
|
|
33
|
-
"data-tracking-el":
|
|
34
|
-
"data-tracking-label":
|
|
33
|
+
"data-tracking-el": l,
|
|
34
|
+
"data-tracking-label": e,
|
|
35
35
|
...n,
|
|
36
36
|
children: /* @__PURE__ */ d(
|
|
37
37
|
"div",
|
|
@@ -48,8 +48,8 @@ const y = s.forwardRef(
|
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
|
-
|
|
52
|
-
const u = "224px", p = s.forwardRef(({ className: o, width: a = u, dataHook: t, children:
|
|
51
|
+
b.displayName = "GlobalLayout";
|
|
52
|
+
const u = "224px", p = s.forwardRef(({ className: o, width: a = u, dataHook: t, children: l, ...e }, r) => {
|
|
53
53
|
const n = typeof a == "number" ? `${a}px` : a;
|
|
54
54
|
return /* @__PURE__ */ d(
|
|
55
55
|
"aside",
|
|
@@ -61,12 +61,14 @@ const u = "224px", p = s.forwardRef(({ className: o, width: a = u, dataHook: t,
|
|
|
61
61
|
),
|
|
62
62
|
"data-hook": t,
|
|
63
63
|
"data-slot": "sidebar-container",
|
|
64
|
+
...e,
|
|
64
65
|
style: {
|
|
65
66
|
width: n,
|
|
66
|
-
top: "var(--ds-section-padding-y-sm)"
|
|
67
|
+
top: "var(--ds-section-padding-y-sm)",
|
|
68
|
+
height: "calc(100dvh - 2 * var(--ds-section-padding-y-sm))",
|
|
69
|
+
...e.style
|
|
67
70
|
},
|
|
68
|
-
|
|
69
|
-
children: e
|
|
71
|
+
children: l
|
|
70
72
|
}
|
|
71
73
|
);
|
|
72
74
|
});
|
|
@@ -76,8 +78,8 @@ const x = s.forwardRef(
|
|
|
76
78
|
className: o,
|
|
77
79
|
maxWidth: a = "var(--ds-breakpoint-lg)",
|
|
78
80
|
dataHook: t,
|
|
79
|
-
children:
|
|
80
|
-
...
|
|
81
|
+
children: l,
|
|
82
|
+
...e
|
|
81
83
|
}, r) => {
|
|
82
84
|
const n = typeof a == "number" ? `${a}px` : a;
|
|
83
85
|
return /* @__PURE__ */ d(
|
|
@@ -91,15 +93,15 @@ const x = s.forwardRef(
|
|
|
91
93
|
"data-hook": t,
|
|
92
94
|
"data-slot": "content-wrapper",
|
|
93
95
|
style: { "--content-max-width": n },
|
|
94
|
-
...
|
|
95
|
-
children:
|
|
96
|
+
...e,
|
|
97
|
+
children: l
|
|
96
98
|
}
|
|
97
99
|
);
|
|
98
100
|
}
|
|
99
101
|
);
|
|
100
102
|
x.displayName = "GlobalLayoutContent";
|
|
101
|
-
const
|
|
102
|
-
({ className: o, dataHook: a, trackingEl: t, trackingLabel:
|
|
103
|
+
const h = s.forwardRef(
|
|
104
|
+
({ className: o, dataHook: a, trackingEl: t, trackingLabel: l, children: e, ...r }, n) => /* @__PURE__ */ d(
|
|
103
105
|
m,
|
|
104
106
|
{
|
|
105
107
|
ref: n,
|
|
@@ -111,15 +113,15 @@ const g = s.forwardRef(
|
|
|
111
113
|
dataHook: a,
|
|
112
114
|
style: { maxWidth: "var(--ds-breakpoint-lg)" },
|
|
113
115
|
trackingEl: t,
|
|
114
|
-
trackingLabel:
|
|
116
|
+
trackingLabel: l,
|
|
115
117
|
...r,
|
|
116
|
-
children:
|
|
118
|
+
children: e
|
|
117
119
|
}
|
|
118
120
|
)
|
|
119
121
|
);
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
({ className: o, dataHook: a, trackingEl: t, trackingLabel:
|
|
122
|
+
h.displayName = "GlobalLayoutContentHeader";
|
|
123
|
+
const g = s.forwardRef(
|
|
124
|
+
({ className: o, dataHook: a, trackingEl: t, trackingLabel: l, children: e, ...r }, n) => /* @__PURE__ */ d(
|
|
123
125
|
"div",
|
|
124
126
|
{
|
|
125
127
|
ref: n,
|
|
@@ -130,16 +132,16 @@ const h = s.forwardRef(
|
|
|
130
132
|
"data-hook": a,
|
|
131
133
|
"data-slot": "content-actions",
|
|
132
134
|
"data-tracking-el": t,
|
|
133
|
-
"data-tracking-label":
|
|
135
|
+
"data-tracking-label": l,
|
|
134
136
|
style: { maxWidth: "var(--ds-breakpoint-lg)" },
|
|
135
137
|
...r,
|
|
136
|
-
children:
|
|
138
|
+
children: e
|
|
137
139
|
}
|
|
138
140
|
)
|
|
139
141
|
);
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
({ className: o, dataHook: a, trackingEl: t, trackingLabel:
|
|
142
|
+
g.displayName = "GlobalLayoutContentActions";
|
|
143
|
+
const v = s.forwardRef(
|
|
144
|
+
({ className: o, dataHook: a, trackingEl: t, trackingLabel: l, children: e, ...r }, n) => /* @__PURE__ */ d(
|
|
143
145
|
"div",
|
|
144
146
|
{
|
|
145
147
|
ref: n,
|
|
@@ -147,21 +149,21 @@ const w = s.forwardRef(
|
|
|
147
149
|
"data-hook": a,
|
|
148
150
|
"data-slot": "content-body",
|
|
149
151
|
"data-tracking-el": t,
|
|
150
|
-
"data-tracking-label":
|
|
152
|
+
"data-tracking-label": l,
|
|
151
153
|
style: { maxWidth: "var(--content-max-width)" },
|
|
152
154
|
...r,
|
|
153
|
-
children:
|
|
155
|
+
children: e
|
|
154
156
|
}
|
|
155
157
|
)
|
|
156
158
|
);
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
+
v.displayName = "GlobalLayoutContentBody";
|
|
160
|
+
const w = s.forwardRef(
|
|
159
161
|
({
|
|
160
162
|
className: o,
|
|
161
163
|
dataHook: a,
|
|
162
164
|
ariaLabel: t,
|
|
163
|
-
trackingEl:
|
|
164
|
-
trackingLabel:
|
|
165
|
+
trackingEl: l,
|
|
166
|
+
trackingLabel: e,
|
|
165
167
|
children: r,
|
|
166
168
|
...n
|
|
167
169
|
}, c) => /* @__PURE__ */ d(
|
|
@@ -175,21 +177,21 @@ const k = s.forwardRef(
|
|
|
175
177
|
),
|
|
176
178
|
"data-hook": a,
|
|
177
179
|
"data-slot": "mobile-header",
|
|
178
|
-
"data-tracking-el":
|
|
179
|
-
"data-tracking-label":
|
|
180
|
+
"data-tracking-el": l,
|
|
181
|
+
"data-tracking-label": e,
|
|
180
182
|
role: "toolbar",
|
|
181
183
|
...n,
|
|
182
184
|
children: r
|
|
183
185
|
}
|
|
184
186
|
)
|
|
185
187
|
);
|
|
186
|
-
|
|
188
|
+
w.displayName = "GlobalLayoutMobileHeader";
|
|
187
189
|
export {
|
|
188
|
-
|
|
190
|
+
b as GlobalLayout,
|
|
189
191
|
x as GlobalLayoutContent,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
g as GlobalLayoutContentActions,
|
|
193
|
+
v as GlobalLayoutContentBody,
|
|
194
|
+
h as GlobalLayoutContentHeader,
|
|
195
|
+
w as GlobalLayoutMobileHeader,
|
|
194
196
|
p as GlobalLayoutSidebar
|
|
195
197
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),r="(prefers-reduced-motion: reduce)",o=n.createContext(null);function c(e){const t=window.matchMedia(r);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function s(){return window.matchMedia(r).matches}function u(){return!1}function d(){const e=n.useContext(o),t=n.useSyncExternalStore(c,s,u);return e??t}exports.ReducedMotionOverrideContext=o;exports.usePrefersReducedMotion=d;
|