@brightlocal/ui-components 2.27.0 → 3.0.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 +6 -1
- package/component-meta.json +480 -126
- package/deprecations.json +189 -2
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +2 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +18 -18
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +11 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -28
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +15 -11
- package/dist/blocks/empty-state.cjs +1 -0
- package/dist/blocks/empty-state.d.ts +172 -0
- package/dist/blocks/empty-state.d.ts.map +1 -0
- package/dist/blocks/empty-state.js +155 -0
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +124 -108
- package/dist/blocks/progress-state.cjs +1 -0
- package/dist/blocks/{progress-screen.d.ts → progress-state.d.ts} +30 -18
- package/dist/blocks/progress-state.d.ts.map +1 -0
- package/dist/blocks/{progress-screen.js → progress-state.js} +100 -71
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +160 -161
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +11 -11
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +37 -38
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +24 -2
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +57 -55
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +23 -2
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +94 -91
- package/dist/chart-empty.cjs +1 -0
- package/dist/chart-empty.d.ts +59 -0
- package/dist/chart-empty.d.ts.map +1 -0
- package/dist/chart-empty.js +29 -0
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +6 -1
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +183 -183
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +5 -3
- package/dist/combobox.cjs +2 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +81 -79
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +74 -77
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +26 -29
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +44 -10
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +13 -11
- package/dist/description.cjs +1 -1
- package/dist/description.js +5 -5
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +20 -20
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +8 -11
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +17 -20
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +29 -25
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +27 -1
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +18 -16
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +56 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +32 -0
- package/dist/header.d.ts +13 -0
- package/dist/header.d.ts.map +1 -1
- package/dist/hooks/use-delayed-pending.cjs +1 -0
- package/dist/hooks/use-delayed-pending.d.ts +34 -0
- package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
- package/dist/hooks/use-delayed-pending.js +17 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +512 -494
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +25 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +9 -9
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.js +51 -51
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +25 -28
- package/dist/lib/block-illustration.cjs +1 -0
- package/dist/lib/block-illustration.d.ts +28 -0
- package/dist/lib/block-illustration.d.ts.map +1 -0
- package/dist/lib/block-illustration.js +21 -0
- package/dist/lib/empty-canvas.cjs +1 -0
- package/dist/lib/empty-canvas.d.ts +27 -0
- package/dist/lib/empty-canvas.d.ts.map +1 -0
- package/dist/lib/empty-canvas.js +62 -0
- package/dist/lib/optical-center.cjs +1 -0
- package/dist/lib/optical-center.d.ts +12 -0
- package/dist/lib/optical-center.d.ts.map +1 -0
- package/dist/lib/optical-center.js +11 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -5
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +62 -58
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +60 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +187 -164
- package/dist/media-empty.cjs +1 -0
- package/dist/media-empty.d.ts +72 -0
- package/dist/media-empty.d.ts.map +1 -0
- package/dist/media-empty.js +45 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +17 -20
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +7 -7
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +127 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +189 -98
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +2 -26
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +79 -118
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +19 -18
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +8 -8
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +38 -3
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +43 -20
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.js +26 -26
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +40 -40
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +31 -28
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.d.ts +10 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +8 -8
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +8 -8
- package/dist/typography-heading.cjs +1 -0
- package/dist/typography-heading.d.ts +116 -0
- package/dist/typography-heading.d.ts.map +1 -0
- package/dist/typography-heading.js +84 -0
- package/dist/typography-text.cjs +1 -0
- package/dist/typography-text.d.ts +113 -0
- package/dist/typography-text.d.ts.map +1 -0
- package/dist/typography-text.js +81 -0
- package/dist/typography.d.ts +13 -0
- package/dist/typography.d.ts.map +1 -1
- package/package.json +35 -7
- package/src/blocks/empty-state.tsx +424 -0
- package/src/blocks/input-list.tsx +66 -36
- package/src/blocks/{progress-screen.tsx → progress-state.tsx} +154 -93
- package/src/blocks/sidebar.tsx +25 -26
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +27 -13
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +8 -4
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button.tsx +3 -3
- package/src/components/calendar.tsx +5 -6
- package/src/components/callout.tsx +48 -15
- package/src/components/card.tsx +52 -17
- package/src/components/chart-empty.tsx +116 -0
- package/src/components/chart.tsx +43 -17
- package/src/components/chip.tsx +5 -3
- package/src/components/combobox.tsx +12 -10
- package/src/components/command.tsx +9 -10
- package/src/components/context-menu.tsx +6 -9
- package/src/components/data-table.tsx +72 -17
- package/src/components/description.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -5
- package/src/components/dropdown-menu.tsx +8 -11
- package/src/components/field.tsx +8 -4
- package/src/components/global-layout.tsx +36 -3
- package/src/components/grid.tsx +130 -0
- package/src/components/header.tsx +13 -0
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +1 -1
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +10 -13
- package/src/components/list.tsx +13 -9
- package/src/components/map.tsx +101 -5
- package/src/components/media-empty.tsx +156 -0
- package/src/components/menubar.tsx +7 -10
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/pagination.tsx +279 -1
- package/src/components/progress.tsx +35 -113
- package/src/components/select.tsx +5 -4
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/skeleton.tsx +78 -7
- package/src/components/sonner.tsx +2 -2
- package/src/components/stepper.tsx +3 -3
- package/src/components/table.tsx +6 -3
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +10 -0
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/components/typography-heading.tsx +229 -0
- package/src/components/typography-text.tsx +225 -0
- package/src/components/typography.tsx +13 -0
- package/src/hooks/use-delayed-pending.ts +60 -0
- package/src/index.ts +10 -1
- package/src/lib/block-illustration.tsx +88 -0
- package/src/lib/empty-canvas.tsx +128 -0
- package/src/lib/optical-center.tsx +45 -0
- package/src/lib/utils.ts +26 -0
- package/dist/blocks/progress-screen.cjs +0 -1
- package/dist/blocks/progress-screen.d.ts.map +0 -1
package/dist/dropdown-menu.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),O=require("react"),P=require("@radix-ui/react-dropdown-menu"),p=require("@brightlocal/icons"),l=require("@brightlocal/ui-components/lib/utils"),G=require("@brightlocal/ui-components/hooks/use-overlay-pointer-lock");function m(e){const o=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(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const u=m(O),a=m(P);function g({...e}){return n.jsx(a.Root,{...e})}g.displayName="DropdownMenu";function w({...e}){return n.jsx(a.Portal,{...e})}w.displayName="DropdownMenuPortal";const f=u.forwardRef(({className:e,dataHook:o,trackingEl:t,trackingLabel:r,...d},s)=>n.jsx(a.Trigger,{ref:s,className:e,"data-slot":"dropdown-menu-trigger","data-tracking-el":t,"data-tracking-label":r,...o!=null&&{"data-hook":o},...d}));f.displayName="DropdownMenuTrigger";const x=u.forwardRef(({className:e,sideOffset:o=4,align:t="start",dataHook:r,trackingEl:d,trackingLabel:s,...i},c)=>(G.useOverlayPointerLock(),n.jsx(a.Portal,{children:n.jsx(a.Content,{ref:c,align:t,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",l.FLOATING_CONTENT_ANIMATION],e),"data-hook":r,"data-slot":"dropdown-menu-content","data-tracking-el":d,"data-tracking-label":s,sideOffset:o,...i})})));x.displayName="DropdownMenuContent";function b({...e}){return n.jsx(a.Group,{...e})}b.displayName="DropdownMenuGroup";const h=u.forwardRef(({className:e,inset:o,dataHook:t,trackingEl:r,trackingLabel:d,...s},i)=>n.jsx(a.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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),O=require("react"),P=require("@radix-ui/react-dropdown-menu"),p=require("@brightlocal/icons"),l=require("@brightlocal/ui-components/lib/utils"),G=require("@brightlocal/ui-components/hooks/use-overlay-pointer-lock");function m(e){const o=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(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const u=m(O),a=m(P);function g({...e}){return n.jsx(a.Root,{...e})}g.displayName="DropdownMenu";function w({...e}){return n.jsx(a.Portal,{...e})}w.displayName="DropdownMenuPortal";const f=u.forwardRef(({className:e,dataHook:o,trackingEl:t,trackingLabel:r,...d},s)=>n.jsx(a.Trigger,{ref:s,className:e,"data-slot":"dropdown-menu-trigger","data-tracking-el":t,"data-tracking-label":r,...o!=null&&{"data-hook":o},...d}));f.displayName="DropdownMenuTrigger";const x=u.forwardRef(({className:e,sideOffset:o=4,align:t="start",dataHook:r,trackingEl:d,trackingLabel:s,...i},c)=>(G.useOverlayPointerLock(),n.jsx(a.Portal,{children:n.jsx(a.Content,{ref:c,align:t,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",l.FLOATING_CONTENT_ANIMATION],e),"data-hook":r,"data-slot":"dropdown-menu-content","data-tracking-el":d,"data-tracking-label":s,sideOffset:o,...i})})));x.displayName="DropdownMenuContent";function b({...e}){return n.jsx(a.Group,{...e})}b.displayName="DropdownMenuGroup";const h=u.forwardRef(({className:e,inset:o,dataHook:t,trackingEl:r,trackingLabel:d,...s},i)=>n.jsx(a.Item,{ref:i,className:l.cn(["relative flex cursor-default items-center gap-2 self-stretch select-none","text-label rounded-sm px-2 py-1.5 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":t,"data-inset":o,"data-slot":"dropdown-menu-item","data-tracking-el":r,"data-tracking-label":d,...s}));h.displayName="DropdownMenuItem";const M=u.forwardRef(({className:e,children:o,checked:t,dataHook:r,trackingEl:d,trackingLabel:s,...i},c)=>n.jsxs(a.CheckboxItem,{ref:c,checked:t,className:l.cn(["relative flex cursor-default items-center gap-2 select-none","text-label rounded-sm py-1.5 pr-2 pl-8 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":r,"data-slot":"dropdown-menu-checkbox-item","data-tracking-el":d,"data-tracking-label":s,...i,children:[n.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n.jsx(a.ItemIndicator,{children:n.jsx(p.Check,{})})}),o]}));M.displayName="DropdownMenuCheckboxItem";function D({...e}){return n.jsx(a.RadioGroup,{...e})}D.displayName="DropdownMenuRadioGroup";const v=u.forwardRef(({className:e,children:o,dataHook:t,trackingEl:r,trackingLabel:d,...s},i)=>n.jsxs(a.RadioItem,{ref:i,className:l.cn(["relative flex cursor-default items-center gap-2 select-none","text-label rounded-sm py-1.5 pr-2 pl-8 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":t,"data-slot":"dropdown-menu-radio-item","data-tracking-el":r,"data-tracking-label":d,...s,children:[n.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n.jsx(a.ItemIndicator,{children:n.jsx(p.Circle,{className:"fill-current",size:8})})}),o]}));v.displayName="DropdownMenuRadioItem";const N=u.forwardRef(({className:e,inset:o,dataHook:t,...r},d)=>n.jsx(a.Label,{ref:d,className:l.cn(["text-label-sm px-2 py-1.5","data-[inset]:pl-8"],e),"data-hook":t,"data-inset":o,"data-slot":"dropdown-menu-label",...r}));N.displayName="DropdownMenuLabel";const y=u.forwardRef(({className:e,...o},t)=>n.jsx(a.Separator,{ref:t,className:l.cn(["bg-border -mx-1 my-1 h-px"],e),"data-slot":"dropdown-menu-separator",...o}));y.displayName="DropdownMenuSeparator";function j({className:e,...o}){return n.jsx("span",{className:l.cn(["text-popover-foreground text-body-xs ml-auto opacity-60"],e),"data-slot":"dropdown-menu-shortcut",...o})}j.displayName="DropdownMenuShortcut";function k({...e}){return n.jsx(a.Sub,{...e})}k.displayName="DropdownMenuSub";const R=u.forwardRef(({className:e,inset:o,children:t,dataHook:r,trackingEl:d,trackingLabel:s,...i},c)=>n.jsxs(a.SubTrigger,{ref:c,className:l.cn(["flex cursor-default items-center gap-2 select-none","text-label rounded-sm px-2 py-1.5 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":r,"data-inset":o,"data-slot":"dropdown-menu-sub-trigger","data-tracking-el":d,"data-tracking-label":s,...i,children:[t,n.jsx(p.ChevronRight,{className:"ml-auto"})]}));R.displayName="DropdownMenuSubTrigger";const S=u.forwardRef(({className:e,...o},t)=>n.jsx(a.SubContent,{ref:t,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",l.FLOATING_CONTENT_ANIMATION],e),"data-slot":"dropdown-menu-sub-content",...o}));S.displayName="DropdownMenuSubContent";const I=u.forwardRef(({className:e,dataHook:o,trackingEl:t,trackingLabel:r,avatar:d,title:s,description:i,disabled:c,ariaLabel:T,...C},_)=>n.jsxs(a.Trigger,{ref:_,"aria-label":T??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":o,"data-slot":"dropdown-menu-trigger-avatar","data-tracking-el":t,"data-tracking-label":r,disabled:c,...C,children:[d,n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col items-start",children:[n.jsx("span",{className:"text-heading-compact w-full overflow-hidden text-ellipsis whitespace-nowrap",children:s}),i&&n.jsx("span",{className:"text-muted-foreground text-body-xs w-full overflow-hidden text-ellipsis whitespace-nowrap",children:i})]}),n.jsx(p.ChevronsUpDown,{className:"text-muted-foreground opacity-50"})]}));I.displayName="DropdownMenuTriggerAvatar";exports.DropdownMenu=g;exports.DropdownMenuCheckboxItem=M;exports.DropdownMenuContent=x;exports.DropdownMenuGroup=b;exports.DropdownMenuItem=h;exports.DropdownMenuLabel=N;exports.DropdownMenuPortal=w;exports.DropdownMenuRadioGroup=D;exports.DropdownMenuRadioItem=v;exports.DropdownMenuSeparator=y;exports.DropdownMenuShortcut=j;exports.DropdownMenuSub=k;exports.DropdownMenuSubContent=S;exports.DropdownMenuSubTrigger=R;exports.DropdownMenuTrigger=f;exports.DropdownMenuTriggerAvatar=I;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OA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;OAEG;eACQ,MAAM;IACjB;;OAEG;iBACU,MAAM;IACnB;;OAEG;oBACa,MAAM;IACtB;;OAEG;YACK,KAAK,CAAC,SAAS;IACvB;;OAEG;WACI,MAAM;IACb;;OAEG;kBACW,MAAM;IACpB;;;OAGG;gBACS,MAAM;2CA8DnB,CAAC;AAIF,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,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
|
@@ -4,19 +4,19 @@ import * as a from "@radix-ui/react-dropdown-menu";
|
|
|
4
4
|
import { Check as b, Circle as h, ChevronRight as x, ChevronsUpDown as v } from "@brightlocal/icons";
|
|
5
5
|
import { cn as p, FLOATING_CONTENT_ANIMATION as m } from "@brightlocal/ui-components/lib/utils";
|
|
6
6
|
import { useOverlayPointerLock as N } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
|
|
7
|
-
function
|
|
7
|
+
function y({
|
|
8
8
|
...e
|
|
9
9
|
}) {
|
|
10
10
|
return /* @__PURE__ */ o(a.Root, { ...e });
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
function
|
|
12
|
+
y.displayName = "DropdownMenu";
|
|
13
|
+
function D({
|
|
14
14
|
...e
|
|
15
15
|
}) {
|
|
16
16
|
return /* @__PURE__ */ o(a.Portal, { ...e });
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
const
|
|
18
|
+
D.displayName = "DropdownMenuPortal";
|
|
19
|
+
const M = l.forwardRef(({ className: e, dataHook: n, trackingEl: t, trackingLabel: r, ...d }, s) => /* @__PURE__ */ o(
|
|
20
20
|
a.Trigger,
|
|
21
21
|
{
|
|
22
22
|
ref: s,
|
|
@@ -28,7 +28,7 @@ const y = l.forwardRef(({ className: e, dataHook: n, trackingEl: t, trackingLabe
|
|
|
28
28
|
...d
|
|
29
29
|
}
|
|
30
30
|
));
|
|
31
|
-
|
|
31
|
+
M.displayName = "DropdownMenuTrigger";
|
|
32
32
|
const k = l.forwardRef(
|
|
33
33
|
({
|
|
34
34
|
className: e,
|
|
@@ -79,7 +79,7 @@ const I = l.forwardRef(
|
|
|
79
79
|
className: p(
|
|
80
80
|
[
|
|
81
81
|
"relative flex cursor-default items-center gap-2 self-stretch select-none",
|
|
82
|
-
"rounded-sm px-2 py-1.5
|
|
82
|
+
"text-label rounded-sm px-2 py-1.5 outline-hidden",
|
|
83
83
|
// Text truncation for child text elements
|
|
84
84
|
"[&>span]:overflow-hidden [&>span]:text-ellipsis [&>span]:whitespace-nowrap",
|
|
85
85
|
"focus:bg-accent focus:text-accent-foreground",
|
|
@@ -118,7 +118,7 @@ const C = l.forwardRef(
|
|
|
118
118
|
className: p(
|
|
119
119
|
[
|
|
120
120
|
"relative flex cursor-default items-center gap-2 select-none",
|
|
121
|
-
"rounded-sm py-1.5 pr-2 pl-8
|
|
121
|
+
"text-label rounded-sm py-1.5 pr-2 pl-8 outline-hidden",
|
|
122
122
|
"focus:bg-accent focus:text-accent-foreground",
|
|
123
123
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
124
124
|
// Icon styling
|
|
@@ -153,7 +153,7 @@ const T = l.forwardRef(
|
|
|
153
153
|
className: p(
|
|
154
154
|
[
|
|
155
155
|
"relative flex cursor-default items-center gap-2 select-none",
|
|
156
|
-
"rounded-sm py-1.5 pr-2 pl-8
|
|
156
|
+
"text-label rounded-sm py-1.5 pr-2 pl-8 outline-hidden",
|
|
157
157
|
"focus:bg-accent focus:text-accent-foreground",
|
|
158
158
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
159
159
|
// Icon styling
|
|
@@ -179,10 +179,7 @@ const _ = l.forwardRef(({ className: e, inset: n, dataHook: t, ...r }, d) => /*
|
|
|
179
179
|
{
|
|
180
180
|
ref: d,
|
|
181
181
|
className: p(
|
|
182
|
-
[
|
|
183
|
-
"px-2 py-1.5 text-sm leading-normal font-semibold",
|
|
184
|
-
"data-[inset]:pl-8"
|
|
185
|
-
],
|
|
182
|
+
["text-label-sm px-2 py-1.5", "data-[inset]:pl-8"],
|
|
186
183
|
e
|
|
187
184
|
),
|
|
188
185
|
"data-hook": t,
|
|
@@ -210,7 +207,7 @@ function P({
|
|
|
210
207
|
"span",
|
|
211
208
|
{
|
|
212
209
|
className: p(
|
|
213
|
-
["text-popover-foreground
|
|
210
|
+
["text-popover-foreground text-body-xs ml-auto opacity-60"],
|
|
214
211
|
e
|
|
215
212
|
),
|
|
216
213
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -241,7 +238,7 @@ const A = l.forwardRef(
|
|
|
241
238
|
className: p(
|
|
242
239
|
[
|
|
243
240
|
"flex cursor-default items-center gap-2 select-none",
|
|
244
|
-
"rounded-sm px-2 py-1.5
|
|
241
|
+
"text-label rounded-sm px-2 py-1.5 outline-hidden",
|
|
245
242
|
"focus:bg-accent focus:text-accent-foreground",
|
|
246
243
|
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
247
244
|
"data-[inset]:pl-8",
|
|
@@ -321,8 +318,8 @@ const j = l.forwardRef(
|
|
|
321
318
|
children: [
|
|
322
319
|
d,
|
|
323
320
|
/* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
|
|
324
|
-
/* @__PURE__ */ o("span", { className: "w-full overflow-hidden text-
|
|
325
|
-
i && /* @__PURE__ */ o("span", { className: "text-muted-foreground w-full overflow-hidden text-
|
|
321
|
+
/* @__PURE__ */ o("span", { className: "text-heading-compact w-full overflow-hidden text-ellipsis whitespace-nowrap", children: s }),
|
|
322
|
+
i && /* @__PURE__ */ o("span", { className: "text-muted-foreground text-body-xs w-full overflow-hidden text-ellipsis whitespace-nowrap", children: i })
|
|
326
323
|
] }),
|
|
327
324
|
/* @__PURE__ */ o(v, { className: "text-muted-foreground opacity-50" })
|
|
328
325
|
]
|
|
@@ -331,13 +328,13 @@ const j = l.forwardRef(
|
|
|
331
328
|
);
|
|
332
329
|
j.displayName = "DropdownMenuTriggerAvatar";
|
|
333
330
|
export {
|
|
334
|
-
|
|
331
|
+
y as DropdownMenu,
|
|
335
332
|
C as DropdownMenuCheckboxItem,
|
|
336
333
|
k as DropdownMenuContent,
|
|
337
334
|
R as DropdownMenuGroup,
|
|
338
335
|
I as DropdownMenuItem,
|
|
339
336
|
_ as DropdownMenuLabel,
|
|
340
|
-
|
|
337
|
+
D as DropdownMenuPortal,
|
|
341
338
|
S as DropdownMenuRadioGroup,
|
|
342
339
|
T as DropdownMenuRadioItem,
|
|
343
340
|
G as DropdownMenuSeparator,
|
|
@@ -345,6 +342,6 @@ export {
|
|
|
345
342
|
z as DropdownMenuSub,
|
|
346
343
|
L as DropdownMenuSubContent,
|
|
347
344
|
A as DropdownMenuSubTrigger,
|
|
348
|
-
|
|
345
|
+
M as DropdownMenuTrigger,
|
|
349
346
|
j as DropdownMenuTriggerAvatar
|
|
350
347
|
};
|
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"),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","has-[>.sr-only]:relative",e),"data-slot":"field-set",...a})}n.displayName="FieldSet";const m=["legend","label"];function v({className:e,variant:a="legend",srOnly:t=!1,...d}){return l.jsx("legend",{className:r.cn("mb-3
|
|
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","has-[>.sr-only]:relative",e),"data-slot":"field-set",...a})}n.displayName="FieldSet";const m=["legend","label"];function v({className:e,variant:a="legend",srOnly:t=!1,...d}){return l.jsx("legend",{className:r.cn("mb-3","data-[variant=legend]:text-heading-subsection","data-[variant=label]:text-label",t&&"sr-only",e),"data-slot":"field-legend","data-variant":a,...d})}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","has-[>.sr-only]:relative"],{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","has-[>[data-slot=field-content]]:[&>[role=radio]]:mt-0.5","has-[>.sr-only[data-slot=field-label]]:grid-cols-[1fr]","[&:has(>.sr-only[data-slot=field-label])>[data-slot=field-description]]:col-start-1","[&:has(>.sr-only[data-slot=field-label])>[data-slot=field-error]]:col-start-1"],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","@md/field-group:has-[>[data-slot=field-content]]:[&>[role=radio]]:mt-0.5","@md/field-group:has-[>.sr-only[data-slot=field-label]]:grid-cols-[1fr]","@md/field-group:[&:has(>.sr-only[data-slot=field-label])>[data-slot=field-description]]:col-start-1","@md/field-group:[&:has(>.sr-only[data-slot=field-label])>[data-slot=field-error]]:col-start-1"]},variant:{default:[],box:["relative cursor-pointer gap-3","rounded-lg border border-border bg-background p-3","transition-colors duration-fast ease-out","[&_[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 y({className:e,orientation:a="vertical",variant:t="default",align:d="start",dataHook:s,...o}){return l.jsx("div",{className:r.cn(_({orientation:a,variant:t}),d==="end"&&a==="horizontal"&&"grid-cols-[1fr_auto]",e),"data-hook":s,"data-orientation":a,"data-slot":"field","data-variant":t,role:"group",...o})}function k({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 w({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 F({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 j({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,...s}){const o=d?.filter(i=>!!i?.message);if(!t&&(!o||o.length===0))return null;const c=r.cn("text-body-sm text-destructive-foreground","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",...s,children:u?l.jsx("ul",{className:"list-disc space-y-1 pl-4",children:o.map((i,f)=>l.jsx("li",{children:i.message},f))}):l.jsx("p",{className:"m-0",children:t||o?.[0]?.message})})}exports.Field=y;exports.FieldContent=k;exports.FieldDescription=F;exports.FieldError=N;exports.FieldErrorIcon=j;exports.FieldGroup=x;exports.FieldLabel=w;exports.FieldLegend=v;exports.FieldSet=n;exports.fieldLegendVariants=m;
|
package/dist/field.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGnE,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE1E,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAe1E;kBAfQ,QAAQ;;;AAmBjB,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,mBAAmB,EAAE,gBAAgB,CAAC,SAAS,CAAC,EAAwB,CAAC;AAE/E,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAkB,EAClB,MAAc,EACd,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAelB;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,QAAA,MAAM,aAAa;;;
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OA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AQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,eAAe,kDAyCjB;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,YAAY,GACb,CAAC;AAEF,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/field.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { cva as u } from "class-variance-authority";
|
|
3
3
|
import { AlertCircle as g } from "@brightlocal/icons";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as o } from "@brightlocal/ui-components/lib/utils";
|
|
5
5
|
import { Description as p } from "./description.js";
|
|
6
6
|
import { Label as h } from "@brightlocal/ui-components/label";
|
|
7
|
-
function
|
|
7
|
+
function b({ className: t, ...a }) {
|
|
8
8
|
return /* @__PURE__ */ l(
|
|
9
9
|
"fieldset",
|
|
10
10
|
{
|
|
11
|
-
className:
|
|
11
|
+
className: o(
|
|
12
12
|
"flex flex-col gap-6",
|
|
13
13
|
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
14
14
|
// sr-only children (FieldLegend srOnly) are position:absolute — FieldSet
|
|
@@ -21,7 +21,7 @@ function m({ className: t, ...a }) {
|
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
b.displayName = "FieldSet";
|
|
25
25
|
const N = ["legend", "label"];
|
|
26
26
|
function F({
|
|
27
27
|
className: t,
|
|
@@ -32,10 +32,10 @@ function F({
|
|
|
32
32
|
return /* @__PURE__ */ l(
|
|
33
33
|
"legend",
|
|
34
34
|
{
|
|
35
|
-
className:
|
|
36
|
-
"mb-3
|
|
37
|
-
"data-[variant=legend]:text-
|
|
38
|
-
"data-[variant=label]:text-
|
|
35
|
+
className: o(
|
|
36
|
+
"mb-3",
|
|
37
|
+
"data-[variant=legend]:text-heading-subsection",
|
|
38
|
+
"data-[variant=label]:text-label",
|
|
39
39
|
e && "sr-only",
|
|
40
40
|
t
|
|
41
41
|
),
|
|
@@ -49,7 +49,7 @@ function V({ className: t, ...a }) {
|
|
|
49
49
|
return /* @__PURE__ */ l(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
|
-
className:
|
|
52
|
+
className: o(
|
|
53
53
|
"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",
|
|
54
54
|
t
|
|
55
55
|
),
|
|
@@ -58,7 +58,7 @@ function V({ className: t, ...a }) {
|
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const m = u(
|
|
62
62
|
[
|
|
63
63
|
"group/field flex w-full gap-2",
|
|
64
64
|
// RadioGroup context: positioned ancestor for RadioGroupItem click overlay + pointer cursor
|
|
@@ -81,6 +81,9 @@ const b = u(
|
|
|
81
81
|
"grid grid-cols-[auto_1fr] items-center gap-x-2",
|
|
82
82
|
"[&>[data-slot=field-description]]:col-start-2 [&>[data-slot=field-error]]:col-start-2",
|
|
83
83
|
"has-[>[data-slot=field-content]]:items-start",
|
|
84
|
+
// Top-aligned rows: a 16px control centres on the label's first line
|
|
85
|
+
// (text-label is 20px), never on the content box's top edge.
|
|
86
|
+
"has-[>[data-slot=field-content]]:[&>[role=radio]]:mt-0.5",
|
|
84
87
|
// sr-only label leaves grid flow — collapse to a single column
|
|
85
88
|
"has-[>.sr-only[data-slot=field-label]]:grid-cols-[1fr]",
|
|
86
89
|
"[&:has(>.sr-only[data-slot=field-label])>[data-slot=field-description]]:col-start-1",
|
|
@@ -90,6 +93,7 @@ const b = u(
|
|
|
90
93
|
"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",
|
|
91
94
|
"@md/field-group:[&>[data-slot=field-description]]:col-start-2 @md/field-group:[&>[data-slot=field-error]]:col-start-2",
|
|
92
95
|
"@md/field-group:has-[>[data-slot=field-content]]:items-start",
|
|
96
|
+
"@md/field-group:has-[>[data-slot=field-content]]:[&>[role=radio]]:mt-0.5",
|
|
93
97
|
// sr-only label leaves grid flow — collapse to a single column
|
|
94
98
|
"@md/field-group:has-[>.sr-only[data-slot=field-label]]:grid-cols-[1fr]",
|
|
95
99
|
"@md/field-group:[&:has(>.sr-only[data-slot=field-label])>[data-slot=field-description]]:col-start-1",
|
|
@@ -132,13 +136,13 @@ function z({
|
|
|
132
136
|
variant: e = "default",
|
|
133
137
|
align: d = "start",
|
|
134
138
|
dataHook: i,
|
|
135
|
-
...
|
|
139
|
+
...r
|
|
136
140
|
}) {
|
|
137
141
|
return /* @__PURE__ */ l(
|
|
138
142
|
"div",
|
|
139
143
|
{
|
|
140
|
-
className:
|
|
141
|
-
|
|
144
|
+
className: o(
|
|
145
|
+
m({ orientation: a, variant: e }),
|
|
142
146
|
d === "end" && a === "horizontal" && "grid-cols-[1fr_auto]",
|
|
143
147
|
t
|
|
144
148
|
),
|
|
@@ -147,7 +151,7 @@ function z({
|
|
|
147
151
|
"data-slot": "field",
|
|
148
152
|
"data-variant": e,
|
|
149
153
|
role: "group",
|
|
150
|
-
...
|
|
154
|
+
...r
|
|
151
155
|
}
|
|
152
156
|
);
|
|
153
157
|
}
|
|
@@ -155,7 +159,7 @@ function L({ className: t, ...a }) {
|
|
|
155
159
|
return /* @__PURE__ */ l(
|
|
156
160
|
"div",
|
|
157
161
|
{
|
|
158
|
-
className:
|
|
162
|
+
className: o(
|
|
159
163
|
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
160
164
|
// Center text for boxIconVertical RadioGroup
|
|
161
165
|
"[[data-variant=boxIconVertical]_&]:items-center [[data-variant=boxIconVertical]_&]:text-center",
|
|
@@ -175,7 +179,7 @@ function I({
|
|
|
175
179
|
return /* @__PURE__ */ l(
|
|
176
180
|
h,
|
|
177
181
|
{
|
|
178
|
-
className:
|
|
182
|
+
className: o(
|
|
179
183
|
// Base label styles from primitives are inherited via Label component
|
|
180
184
|
// Reset to mb-0 when label wraps a field (card variant for radio/checkbox)
|
|
181
185
|
"group/field-label peer/field-label w-fit",
|
|
@@ -200,7 +204,7 @@ function S({
|
|
|
200
204
|
return /* @__PURE__ */ l(
|
|
201
205
|
p,
|
|
202
206
|
{
|
|
203
|
-
className:
|
|
207
|
+
className: o(
|
|
204
208
|
// Field-specific positioning and context styles
|
|
205
209
|
"mt-2",
|
|
206
210
|
"group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
@@ -222,7 +226,7 @@ function C({
|
|
|
222
226
|
t,
|
|
223
227
|
{
|
|
224
228
|
"aria-hidden": "true",
|
|
225
|
-
className:
|
|
229
|
+
className: o("inline-block shrink-0 align-text-bottom", a),
|
|
226
230
|
...e
|
|
227
231
|
}
|
|
228
232
|
);
|
|
@@ -234,18 +238,18 @@ function D({
|
|
|
234
238
|
errors: d,
|
|
235
239
|
...i
|
|
236
240
|
}) {
|
|
237
|
-
const
|
|
241
|
+
const r = d?.filter(
|
|
238
242
|
(s) => !!s?.message
|
|
239
243
|
);
|
|
240
|
-
if (!e && (!
|
|
244
|
+
if (!e && (!r || r.length === 0))
|
|
241
245
|
return null;
|
|
242
|
-
const n =
|
|
243
|
-
"text-
|
|
246
|
+
const n = o(
|
|
247
|
+
"text-body-sm text-destructive-foreground",
|
|
244
248
|
"mt-2",
|
|
245
249
|
"group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
246
250
|
"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
247
251
|
t
|
|
248
|
-
), c =
|
|
252
|
+
), c = r && r.length > 1;
|
|
249
253
|
return /* @__PURE__ */ l(
|
|
250
254
|
"div",
|
|
251
255
|
{
|
|
@@ -254,7 +258,7 @@ function D({
|
|
|
254
258
|
"data-slot": "field-error",
|
|
255
259
|
role: "alert",
|
|
256
260
|
...i,
|
|
257
|
-
children: c ? /* @__PURE__ */ l("ul", { className: "list-disc space-y-1 pl-4", children:
|
|
261
|
+
children: c ? /* @__PURE__ */ l("ul", { className: "list-disc space-y-1 pl-4", children: r.map((s, f) => /* @__PURE__ */ l("li", { children: s.message }, f)) }) : /* @__PURE__ */ l("p", { className: "m-0", children: e || r?.[0]?.message })
|
|
258
262
|
}
|
|
259
263
|
);
|
|
260
264
|
}
|
|
@@ -267,6 +271,6 @@ export {
|
|
|
267
271
|
V as FieldGroup,
|
|
268
272
|
I as FieldLabel,
|
|
269
273
|
F as FieldLegend,
|
|
270
|
-
|
|
274
|
+
b as FieldSet,
|
|
271
275
|
N as fieldLegendVariants
|
|
272
276
|
};
|
package/dist/global-layout.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),H=require("react"),q=require("@brightlocal/icons"),u=require("@brightlocal/ui-components/lib/utils"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),H=require("react"),q=require("@brightlocal/icons"),u=require("@brightlocal/ui-components/lib/utils"),O=require("./breadcrumb.cjs"),v=require("./header.cjs"),_=require("./link.cjs"),B=require("./scroll-area.cjs"),E=require("./typography-text.cjs");function M(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const s=M(H),j=s.forwardRef(({className:a,maxWidth:e="none",dataHook:t,trackingEl:o,trackingLabel:n,children:r,...i},c)=>{const f=typeof e=="number"?`${e}px`:e;return l.jsx(B.ScrollArea,{className:u.cn("h-dvh w-full [&>[data-radix-scroll-area-viewport]]:p-0! [&>[data-radix-scroll-area-viewport]>div]:block! [&>[data-radix-scroll-area-viewport]>div]:min-w-0!",a),dataHook:`${t}-scroll`,scrollOrientation:"both",children:l.jsx("div",{ref:c,className:"flex min-h-dvh w-full flex-col","data-hook":t,"data-slot":"global-layout","data-tracking-el":o,"data-tracking-label":n,...i,children:l.jsx("div",{className:"mx-auto flex w-full flex-1","data-slot":"global-container",style:{maxWidth:f},children:r})})})});j.displayName="GlobalLayout";const T="288px",L=s.forwardRef(({className:a,width:e=T,dataHook:t,children:o,...n},r)=>{const i=typeof e=="number"?`${e}px`:e;return l.jsx("aside",{ref:r,className:u.cn("sticky hidden shrink-0 self-start outline-none lg:block",a),"data-hook":t,"data-slot":"sidebar-container",...n,style:{width:i,top:0,height:"100dvh",...n.style},children:o})});L.displayName="GlobalLayoutSidebar";const G=s.forwardRef(({className:a,maxWidth:e="var(--ds-breakpoint-lg)",dataHook:t,children:o,...n},r)=>{const i=typeof e=="number"?`${e}px`:e;return l.jsx("div",{ref:r,className:u.cn("pb-section-sm lg:pt-section-sm flex min-w-0 flex-1 flex-col gap-6",a),"data-hook":t,"data-slot":"content-wrapper",style:{"--content-max-width":i},...n,children:o})});G.displayName="GlobalLayoutContent";const x="px-4 md:px-6 lg:px-section-xs",h=s.forwardRef(({dataHook:a,ariaLabel:e,href:t,onClick:o,...n},r)=>{const i=c=>{t===void 0&&c.preventDefault(),o?.(c)};return l.jsx(_.Link,{ref:r,"aria-label":e||"Go back","data-slot":"content-header-back-link",dataHook:a??"content-header-back-link",href:t??"#",variant:"icon",onClick:i,...n,children:l.jsx(q.ArrowLeft,{"aria-hidden":"true"})})});h.displayName="GlobalLayoutBackLink";const g=s.forwardRef(({dataHook:a,asChild:e,...t},o)=>l.jsx(E.TypographyText,{ref:o,asChild:e,color:"muted","data-slot":"content-header-subtitle",dataHook:a??"content-header-subtitle",variant:"body-sm",...t}));g.displayName="GlobalLayoutSubtitle";const w=s.forwardRef(({className:a,dataHook:e,children:t,...o},n)=>l.jsx("div",{ref:n,className:u.cn("aspect-[3/2] h-12 shrink-0 overflow-hidden rounded-md [&_img]:size-full [&_img]:object-cover",a),"data-hook":e??"content-header-image","data-slot":"content-header-image",...o,children:t}));w.displayName="GlobalLayoutImage";const N=s.forwardRef(({className:a,dataHook:e,trackingEl:t,trackingLabel:o,children:n,...r},i)=>{const c=[],f=[],y=[],m=[],b=[],p=[];return s.Children.forEach(n,d=>{s.isValidElement(d)&&d.type===h?c.push(d):s.isValidElement(d)&&d.type===w?f.push(d):s.isValidElement(d)&&d.type===O.Breadcrumb?y.push(d):s.isValidElement(d)&&d.type===g?m.push(d):s.isValidElement(d)&&d.type===k?b.push(d):p.push(d)}),c.length===0&&f.length===0&&y.length===0&&m.length===0&&b.length===0?l.jsx("div",{className:u.cn("w-full",x),"data-slot":"content-header-region",children:l.jsx(v.Header,{ref:i,className:u.cn("mx-auto w-full flex-wrap justify-between gap-4 max-md:flex-col max-md:items-start",a),"data-slot":"content-header",dataHook:e,style:{maxWidth:"var(--ds-breakpoint-lg)"},trackingEl:t,trackingLabel:o,...r,children:n})}):l.jsx("div",{className:u.cn("w-full",x),"data-slot":"content-header-region",children:l.jsxs(v.Header,{ref:i,className:u.cn("mx-auto w-full items-start gap-4",a),"data-slot":"content-header",dataHook:e,style:{maxWidth:"var(--ds-breakpoint-lg)"},trackingEl:t,trackingLabel:o,...r,children:[c,f,l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-2","data-slot":"content-header-body",children:[y,b.length>0?l.jsxs("div",{className:"flex w-full flex-wrap items-start justify-between gap-4 max-md:flex-col","data-slot":"content-header-title",children:[l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-2","data-slot":"content-header-text",children:[p,m]}),l.jsx(C.Provider,{value:!0,children:b})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"flex w-full flex-wrap items-center justify-between gap-4 max-md:flex-col max-md:items-start","data-slot":"content-header-title",children:p}),m]})]})]})})});N.displayName="GlobalLayoutContentHeader";const C=s.createContext(!1),k=s.forwardRef(({className:a,dataHook:e,trackingEl:t,trackingLabel:o,children:n,...r},i)=>{const c=s.useContext(C),f=l.jsx("div",{ref:i,className:u.cn(c?"flex shrink-0 items-center gap-2":"mx-auto hidden w-full items-center justify-end gap-2 lg:flex",a),"data-hook":e,"data-slot":"content-actions","data-tracking-el":t,"data-tracking-label":o,style:c?void 0:{maxWidth:"var(--ds-breakpoint-lg)"},...r,children:n});return c?f:l.jsx("div",{className:u.cn("w-full",x),"data-slot":"content-actions-region",children:f})});k.displayName="GlobalLayoutContentActions";const R=s.forwardRef(({className:a,dataHook:e,trackingEl:t,trackingLabel:o,children:n,...r},i)=>l.jsx("div",{className:u.cn("flex w-full flex-1 flex-col",x),"data-slot":"content-body-region",children:l.jsx("div",{ref:i,className:u.cn("mx-auto flex w-full flex-1 flex-col gap-6",a),"data-hook":e,"data-slot":"content-body","data-tracking-el":t,"data-tracking-label":o,style:{maxWidth:"var(--content-max-width)"},...r,children:n})}));R.displayName="GlobalLayoutContentBody";const S=s.forwardRef(({className:a,dataHook:e,ariaLabel:t,trackingEl:o,trackingLabel:n,children:r,...i},c)=>l.jsx("div",{ref:c,"aria-label":t??"Mobile navigation",className:u.cn("flex w-full items-center justify-start gap-2 px-4 pt-6 pb-2 md:px-6 lg:hidden [&_[data-slot=sidebar-trigger]]:-ml-0.5",a),"data-hook":e,"data-slot":"mobile-header","data-tracking-el":o,"data-tracking-label":n,role:"toolbar",...i,children:r}));S.displayName="GlobalLayoutMobileHeader";exports.GlobalLayout=j;exports.GlobalLayoutBackLink=h;exports.GlobalLayoutContent=G;exports.GlobalLayoutContentActions=k;exports.GlobalLayoutContentBody=R;exports.GlobalLayoutContentHeader=N;exports.GlobalLayoutImage=w;exports.GlobalLayoutMobileHeader=S;exports.GlobalLayoutSidebar=L;exports.GlobalLayoutSubtitle=g;
|
package/dist/global-layout.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ interface GlobalLayoutBackLinkProps extends React.AnchorHTMLAttributes<HTMLAncho
|
|
|
63
63
|
* Pass `href` for URL navigation or `onClick` for SPA router navigation.
|
|
64
64
|
*/
|
|
65
65
|
declare const GlobalLayoutBackLink: React.ForwardRefExoticComponent<GlobalLayoutBackLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
66
|
-
interface GlobalLayoutSubtitleProps extends React.ComponentProps<"p"> {
|
|
66
|
+
interface GlobalLayoutSubtitleProps extends Omit<React.ComponentProps<"p">, "color"> {
|
|
67
67
|
/**
|
|
68
68
|
* Data hook for automated testing
|
|
69
69
|
* @default "content-header-subtitle"
|
|
@@ -80,6 +80,10 @@ interface GlobalLayoutSubtitleProps extends React.ComponentProps<"p"> {
|
|
|
80
80
|
* Muted description text for the page header. Place it as a direct child of
|
|
81
81
|
* `GlobalLayoutContentHeader` — the header positions it below the title row.
|
|
82
82
|
* For rich descriptions, pass `asChild` with your own flex row as the child.
|
|
83
|
+
*
|
|
84
|
+
* Sits on the semantic type scale's `text-body-sm` (Inter · Figma 500 · 14/20,
|
|
85
|
+
* rendering one CSS weight lighter per the DS-305 offset) with the muted
|
|
86
|
+
* colour role — de-emphasis is colour-only, never a lighter weight.
|
|
83
87
|
*/
|
|
84
88
|
declare const GlobalLayoutSubtitle: React.ForwardRefExoticComponent<Omit<GlobalLayoutSubtitleProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
85
89
|
interface GlobalLayoutImageProps extends React.ComponentProps<"div"> {
|
|
@@ -112,6 +116,28 @@ interface GlobalLayoutContentHeaderProps extends React.ComponentProps<"header">
|
|
|
112
116
|
*/
|
|
113
117
|
trackingLabel?: string;
|
|
114
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Page header for the content area. Slots direct children (back link, image,
|
|
121
|
+
* breadcrumb, subtitle, actions) around the title row per the Figma Page
|
|
122
|
+
* Header design.
|
|
123
|
+
*
|
|
124
|
+
* The consumer-supplied page title must be `TypographyHeading level={1}
|
|
125
|
+
* variant="page"` so it sits on the semantic type scale's
|
|
126
|
+
* `text-heading-page` (DS-714) — never a hand-styled heading. Exactly one
|
|
127
|
+
* page title per screen: a second title is a section (`variant="section"`,
|
|
128
|
+
* `text-heading-section`).
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* <GlobalLayoutContentHeader dataHook="page-header">
|
|
132
|
+
* <TypographyHeading level={1} variant="page" dataHook="page-title">
|
|
133
|
+
* All Locations
|
|
134
|
+
* </TypographyHeading>
|
|
135
|
+
* <GlobalLayoutContentActions dataHook="header-actions">
|
|
136
|
+
* <Button dataHook="add-location">Add Location</Button>
|
|
137
|
+
* </GlobalLayoutContentActions>
|
|
138
|
+
* <GlobalLayoutSubtitle>Manage your business locations.</GlobalLayoutSubtitle>
|
|
139
|
+
* </GlobalLayoutContentHeader>
|
|
140
|
+
*/
|
|
115
141
|
declare const GlobalLayoutContentHeader: React.ForwardRefExoticComponent<Omit<GlobalLayoutContentHeaderProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
116
142
|
interface GlobalLayoutContentActionsProps extends React.ComponentProps<"div"> {
|
|
117
143
|
/**
|
|
@@ -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;AAU/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;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,uGAgDjB,CAAC;AAQF,UAAU,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;IACtE;;OAEG;IACH,QAAQ,CAAC,EAAE,M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C,KAAK,CAAC;IAC3E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,0BAA0B,qHA4C/B,CAAC;AAIF,UAAU,4BAA6B,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,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,kHA4B5B,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,mHA0C7B,CAAC;AAIF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,GACzB,CAAC;AAEF,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,+BAA+B,EAC/B,8BAA8B,EAC9B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,EAC5B,6BAA6B,GAC9B,CAAC"}
|
package/dist/global-layout.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Breadcrumb as R } from "./breadcrumb.js";
|
|
|
6
6
|
import { Header as g } from "./header.js";
|
|
7
7
|
import { Link as H } from "./link.js";
|
|
8
8
|
import { ScrollArea as j } from "./scroll-area.js";
|
|
9
|
-
import {
|
|
9
|
+
import { TypographyText as E } from "./typography-text.js";
|
|
10
10
|
const S = r.forwardRef(
|
|
11
11
|
({
|
|
12
12
|
className: t,
|
|
@@ -53,7 +53,7 @@ const S = r.forwardRef(
|
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
S.displayName = "GlobalLayout";
|
|
56
|
-
const B = "288px",
|
|
56
|
+
const B = "288px", _ = r.forwardRef(({ className: t, width: e = B, dataHook: a, children: l, ...o }, s) => {
|
|
57
57
|
const d = typeof e == "number" ? `${e}px` : e;
|
|
58
58
|
return /* @__PURE__ */ n(
|
|
59
59
|
"aside",
|
|
@@ -76,8 +76,8 @@ const B = "288px", M = r.forwardRef(({ className: t, width: e = B, dataHook: a,
|
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
});
|
|
79
|
-
|
|
80
|
-
const
|
|
79
|
+
_.displayName = "GlobalLayoutSidebar";
|
|
80
|
+
const A = r.forwardRef(
|
|
81
81
|
({
|
|
82
82
|
className: t,
|
|
83
83
|
maxWidth: e = "var(--ds-breakpoint-lg)",
|
|
@@ -103,7 +103,7 @@ const _ = r.forwardRef(
|
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
|
-
|
|
106
|
+
A.displayName = "GlobalLayoutContent";
|
|
107
107
|
const x = "px-4 md:px-6 lg:px-section-xs", w = r.forwardRef(({ dataHook: t, ariaLabel: e, href: a, onClick: l, ...o }, s) => /* @__PURE__ */ n(
|
|
108
108
|
H,
|
|
109
109
|
{
|
|
@@ -126,8 +126,10 @@ const k = r.forwardRef(({ dataHook: t, asChild: e, ...a }, l) => /* @__PURE__ */
|
|
|
126
126
|
{
|
|
127
127
|
ref: l,
|
|
128
128
|
asChild: e,
|
|
129
|
+
color: "muted",
|
|
129
130
|
"data-slot": "content-header-subtitle",
|
|
130
131
|
dataHook: t ?? "content-header-subtitle",
|
|
132
|
+
variant: "body-sm",
|
|
131
133
|
...a
|
|
132
134
|
}
|
|
133
135
|
));
|
|
@@ -147,7 +149,7 @@ const v = r.forwardRef(({ className: t, dataHook: e, children: a, ...l }, o) =>
|
|
|
147
149
|
}
|
|
148
150
|
));
|
|
149
151
|
v.displayName = "GlobalLayoutImage";
|
|
150
|
-
const
|
|
152
|
+
const I = r.forwardRef(
|
|
151
153
|
({ className: t, dataHook: e, trackingEl: a, trackingLabel: l, children: o, ...s }, d) => {
|
|
152
154
|
const c = [], f = [], y = [], p = [], b = [], h = [];
|
|
153
155
|
return r.Children.forEach(o, (i) => {
|
|
@@ -248,7 +250,7 @@ const A = r.forwardRef(
|
|
|
248
250
|
);
|
|
249
251
|
}
|
|
250
252
|
);
|
|
251
|
-
|
|
253
|
+
I.displayName = "GlobalLayoutContentHeader";
|
|
252
254
|
const N = r.createContext(!1), L = r.forwardRef(
|
|
253
255
|
({ className: t, dataHook: e, trackingEl: a, trackingLabel: l, children: o, ...s }, d) => {
|
|
254
256
|
const c = r.useContext(N), f = /* @__PURE__ */ n(
|
|
@@ -279,7 +281,7 @@ const N = r.createContext(!1), L = r.forwardRef(
|
|
|
279
281
|
}
|
|
280
282
|
);
|
|
281
283
|
L.displayName = "GlobalLayoutContentActions";
|
|
282
|
-
const
|
|
284
|
+
const M = r.forwardRef(
|
|
283
285
|
({ className: t, dataHook: e, trackingEl: a, trackingLabel: l, children: o, ...s }, d) => /* @__PURE__ */ n(
|
|
284
286
|
"div",
|
|
285
287
|
{
|
|
@@ -302,8 +304,8 @@ const I = r.forwardRef(
|
|
|
302
304
|
}
|
|
303
305
|
)
|
|
304
306
|
);
|
|
305
|
-
|
|
306
|
-
const
|
|
307
|
+
M.displayName = "GlobalLayoutContentBody";
|
|
308
|
+
const T = r.forwardRef(
|
|
307
309
|
({
|
|
308
310
|
className: t,
|
|
309
311
|
dataHook: e,
|
|
@@ -334,16 +336,16 @@ const V = r.forwardRef(
|
|
|
334
336
|
}
|
|
335
337
|
)
|
|
336
338
|
);
|
|
337
|
-
|
|
339
|
+
T.displayName = "GlobalLayoutMobileHeader";
|
|
338
340
|
export {
|
|
339
341
|
S as GlobalLayout,
|
|
340
342
|
w as GlobalLayoutBackLink,
|
|
341
|
-
|
|
343
|
+
A as GlobalLayoutContent,
|
|
342
344
|
L as GlobalLayoutContentActions,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
+
M as GlobalLayoutContentBody,
|
|
346
|
+
I as GlobalLayoutContentHeader,
|
|
345
347
|
v as GlobalLayoutImage,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
+
T as GlobalLayoutMobileHeader,
|
|
349
|
+
_ as GlobalLayoutSidebar,
|
|
348
350
|
k as GlobalLayoutSubtitle
|
|
349
351
|
};
|
package/dist/grid.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),d=require("react"),u=require("@brightlocal/ui-components/lib/utils"),f=require("./lib/optical-center.cjs");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const p=g(d),c=p.forwardRef(({className:e,children:r,dataHook:t,variant:a,trackingEl:i,trackingLabel:l,...o},s)=>n.jsx("div",{ref:s,className:u.cn("flex w-full flex-1 flex-col items-center",e),"data-hook":t,"data-slot":"grid","data-tracking-el":i??"grid","data-tracking-label":l,"data-variant":a,...o,children:n.jsx(f.OpticalCenter,{children:r})}));c.displayName="Grid";exports.Grid=c;
|