@brightlocal/ui-components 2.16.0 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "Machine-readable registry of all components in the BrightLocal Design System",
5
5
  "components": [
6
6
  {
@@ -1102,6 +1102,7 @@
1102
1102
  "GlobalLayout",
1103
1103
  "GlobalLayoutSidebar",
1104
1104
  "GlobalLayoutContent",
1105
+ "GlobalLayoutContentActions",
1105
1106
  "GlobalLayoutContentHeader",
1106
1107
  "GlobalLayoutContentBody",
1107
1108
  "GlobalLayoutMobileHeader"
@@ -0,0 +1,189 @@
1
+ [
2
+ {
3
+ "id": "split-layout-left",
4
+ "component": "SplitLayout",
5
+ "file": "components/split-layout.tsx",
6
+ "item": "left",
7
+ "type": "prop",
8
+ "since": "1.2.0",
9
+ "reason": "Use <SplitLayoutContentLeft> composition instead",
10
+ "replacement": "SplitLayoutContentLeft component",
11
+ "ticket": "DS-450"
12
+ },
13
+ {
14
+ "id": "split-layout-right",
15
+ "component": "SplitLayout",
16
+ "file": "components/split-layout.tsx",
17
+ "item": "right",
18
+ "type": "prop",
19
+ "since": "1.2.0",
20
+ "reason": "Use <SplitLayoutContentRight> composition instead",
21
+ "replacement": "SplitLayoutContentRight component",
22
+ "ticket": "DS-450"
23
+ },
24
+ {
25
+ "id": "use-mobile-module",
26
+ "component": "use-mobile",
27
+ "file": "hooks/use-mobile.ts",
28
+ "item": "use-mobile.ts",
29
+ "type": "hook",
30
+ "since": "2.9.0",
31
+ "reason": "Module replaced by use-breakpoint",
32
+ "replacement": "@brightlocal/ui-components/hooks/use-breakpoint",
33
+ "ticket": ""
34
+ },
35
+ {
36
+ "id": "use-mobile-get-breakpoint",
37
+ "component": "use-mobile",
38
+ "file": "hooks/use-mobile.ts",
39
+ "item": "getMobileBreakpoint",
40
+ "type": "export",
41
+ "since": "2.9.0",
42
+ "reason": "Replaced by getBreakpointValue()",
43
+ "replacement": "getBreakpointValue()",
44
+ "ticket": ""
45
+ },
46
+ {
47
+ "id": "use-mobile-use-is-mobile",
48
+ "component": "use-mobile",
49
+ "file": "hooks/use-mobile.ts",
50
+ "item": "useIsMobile",
51
+ "type": "export",
52
+ "since": "2.9.0",
53
+ "reason": "Replaced by useIsBelowBreakpoint(\"sm\")",
54
+ "replacement": "useIsBelowBreakpoint(\"sm\")",
55
+ "ticket": ""
56
+ },
57
+ {
58
+ "id": "sidebar-embedded",
59
+ "component": "Sidebar",
60
+ "file": "blocks/sidebar.tsx",
61
+ "item": "embedded",
62
+ "type": "prop",
63
+ "since": "2.9.0",
64
+ "reason": "Sidebar now always uses inline layout",
65
+ "replacement": "Remove prop (no replacement needed)",
66
+ "ticket": ""
67
+ },
68
+ {
69
+ "id": "sidebar-drawer",
70
+ "component": "Sidebar",
71
+ "file": "blocks/sidebar.tsx",
72
+ "item": "SidebarDrawer",
73
+ "type": "component",
74
+ "since": "2.9.0",
75
+ "reason": "Use SidebarTrigger instead",
76
+ "replacement": "SidebarTrigger",
77
+ "ticket": ""
78
+ },
79
+ {
80
+ "id": "sidebar-drawer-props",
81
+ "component": "Sidebar",
82
+ "file": "blocks/sidebar.tsx",
83
+ "item": "SidebarDrawerProps",
84
+ "type": "type",
85
+ "since": "2.9.0",
86
+ "reason": "Paired with deprecated SidebarDrawer component",
87
+ "replacement": "SidebarTriggerProps",
88
+ "ticket": ""
89
+ },
90
+ {
91
+ "id": "map-satellite",
92
+ "component": "Map",
93
+ "file": "components/map.tsx",
94
+ "item": "MapTypeId.SATELLITE",
95
+ "type": "constant",
96
+ "since": "2.15.0",
97
+ "reason": "Prefer cloud-based map styling via Map ID",
98
+ "replacement": "Cloud-based Map Styling (Map ID parameter)",
99
+ "ticket": ""
100
+ },
101
+ {
102
+ "id": "map-legacy-variant",
103
+ "component": "Map",
104
+ "file": "components/map.tsx",
105
+ "item": "LegacyVariant",
106
+ "type": "type",
107
+ "since": "2.15.0",
108
+ "reason": "Legacy variant names replaced by semantic ranking names",
109
+ "replacement": "ResolvedVariant (strong, moderate, weak, unranked, error)",
110
+ "ticket": "DS-562"
111
+ },
112
+ {
113
+ "id": "map-legacy-variant-map",
114
+ "component": "Map",
115
+ "file": "components/map.tsx",
116
+ "item": "legacyVariantMap",
117
+ "type": "constant",
118
+ "since": "2.15.0",
119
+ "reason": "Internal helper for legacy variant names",
120
+ "replacement": "Use ResolvedVariant directly",
121
+ "ticket": "DS-562"
122
+ },
123
+ {
124
+ "id": "map-grid-pin-pulse",
125
+ "component": "MapGridPin",
126
+ "file": "components/map.tsx",
127
+ "item": "pulse",
128
+ "type": "prop",
129
+ "since": "2.15.0",
130
+ "reason": "No longer rendered",
131
+ "replacement": "Remove prop",
132
+ "ticket": "DS-562"
133
+ },
134
+ {
135
+ "id": "map-cluster-pin-hex-colors",
136
+ "component": "Map",
137
+ "file": "components/map.tsx",
138
+ "item": "clusterPinHexColors",
139
+ "type": "constant",
140
+ "since": "2.16.0",
141
+ "reason": "Static snapshot may be stale",
142
+ "replacement": "resolveClusterPinColors()",
143
+ "ticket": ""
144
+ },
145
+ {
146
+ "id": "map-location-pin-value",
147
+ "component": "MapLocationPin",
148
+ "file": "components/map.tsx",
149
+ "item": "value",
150
+ "type": "prop",
151
+ "since": "2.15.0",
152
+ "reason": "Use MapGridPin for numbered pins",
153
+ "replacement": "MapGridPin value prop",
154
+ "ticket": "DS-563"
155
+ },
156
+ {
157
+ "id": "map-location-pin-variant",
158
+ "component": "MapLocationPin",
159
+ "file": "components/map.tsx",
160
+ "item": "variant",
161
+ "type": "prop",
162
+ "since": "2.15.0",
163
+ "reason": "Use MapGridPin for numbered pins",
164
+ "replacement": "MapGridPin variant prop",
165
+ "ticket": "DS-563"
166
+ },
167
+ {
168
+ "id": "map-location-pin-pulse",
169
+ "component": "MapLocationPin",
170
+ "file": "components/map.tsx",
171
+ "item": "pulse",
172
+ "type": "prop",
173
+ "since": "2.15.0",
174
+ "reason": "Use MapGridPin for numbered pins",
175
+ "replacement": "MapGridPin (pulse no longer rendered)",
176
+ "ticket": "DS-563"
177
+ },
178
+ {
179
+ "id": "card-max-width",
180
+ "component": "Card",
181
+ "file": "components/card.tsx",
182
+ "item": "maxWidth",
183
+ "type": "prop",
184
+ "since": "2.16.0",
185
+ "reason": "Use Tailwind max-width utilities via className instead",
186
+ "replacement": "className=\"max-w-sm\" (or any max-w-* utility)",
187
+ "ticket": "DS-578"
188
+ }
189
+ ]
package/dist/badge.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "destructive" | "primary" | "outline" | "secondary" | null | undefined;
4
+ variant?: "outline" | "destructive" | "primary" | "secondary" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  /**
7
7
  * Props for the Badge component
package/dist/button.d.ts CHANGED
@@ -17,7 +17,7 @@ type ButtonVariantProps = {
17
17
  /** Supported visual style variants for the Button component. */
18
18
  export type ButtonVariant = NonNullable<ButtonVariantProps["variant"]>;
19
19
  declare const ButtonVariants: (props?: ({
20
- variant?: "ghost" | "destructive" | "warning" | "primary" | "outline" | "secondary" | null | undefined;
20
+ variant?: "ghost" | "outline" | "destructive" | "warning" | "primary" | "secondary" | null | undefined;
21
21
  size?: "default" | "sm" | "lg" | null | undefined;
22
22
  state?: "default" | "disabled" | "loading" | null | undefined;
23
23
  fullWidth?: boolean | null | undefined;
package/dist/chart.cjs CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),B=require("react"),e=require("recharts"),h=require("@brightlocal/ui-components/lib/utils");function _(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(o,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return o.default=t,Object.freeze(o)}const f=_(B),P=_(e),k=f.createContext(null);function L(){const t=f.useContext(k);if(!t)throw new Error("useChart must be used within a <ChartContainer />");return t}const R=f.forwardRef(({id:t,className:o,children:s,config:n,dataHook:l,trackingEl:i,trackingLabel:c,...u},d)=>{const b=f.useId(),p=`chart-${t||b.replace(/:/g,"")}`;return r.jsx(k.Provider,{value:{config:n},children:r.jsxs("div",{ref:d,className:h.cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-pie-sector]:stroke-background flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-pie-sector]:stroke-2 [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none [&_svg_g]:outline-none [&_svg_g]:focus:outline-none",o),"data-chart":p,"data-hook":l,"data-slot":"chart-container","data-tracking-el":i,"data-tracking-label":c,...u,children:[r.jsx(N,{config:n,id:p}),r.jsx(P.ResponsiveContainer,{children:s})]})})});R.displayName="ChartContainer";function N({id:t,config:o}){const s=Object.entries(o).filter(([,n])=>n.theme||n.color);return s.length?r.jsx("style",{dangerouslySetInnerHTML:{__html:s.map(([n,l])=>{const i=typeof l.color=="string"?l.color.replace(/^hsl\((.*)\)$/,"$1"):null;return i?`
2
- [data-chart=${t}] {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),B=require("react"),e=require("recharts"),h=require("@brightlocal/ui-components/lib/utils");function k(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(o,s,n.get?n:{enumerable:!0,get:()=>r[s]})}}return o.default=r,Object.freeze(o)}const m=k(B),O=k(e),L=m.createContext(null);function R(){const r=m.useContext(L);if(!r)throw new Error("useChart must be used within a <ChartContainer />");return r}const N=m.forwardRef(({id:r,className:o,children:s,config:n,dataHook:l,width:i,height:c,minWidth:u,minHeight:d,maxHeight:j,trackingEl:y,trackingLabel:P,...p},b)=>{const C=m.useId(),g=`chart-${r||C.replace(/:/g,"")}`;return t.jsx(L.Provider,{value:{config:n},children:t.jsxs("div",{ref:b,className:h.cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-pie-sector]:stroke-background flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-pie-sector]:stroke-2 [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none [&_svg_g]:outline-none [&_svg_g]:focus:outline-none",o),"data-chart":g,"data-hook":l,"data-slot":"chart-container","data-tracking-el":y,"data-tracking-label":P,...p,children:[t.jsx(w,{config:n,id:g}),t.jsx(O.ResponsiveContainer,{height:c??"100%",initialDimension:{width:1,height:1},maxHeight:j,minHeight:d,minWidth:u??0,width:i??"100%",children:s})]})})});N.displayName="ChartContainer";function w({id:r,config:o}){const s=Object.entries(o).filter(([,n])=>n.theme||n.color);return s.length?t.jsx("style",{dangerouslySetInnerHTML:{__html:s.map(([n,l])=>{const i=typeof l.color=="string"?l.color.replace(/^hsl\((.*)\)$/,"$1"):null;return i?`
2
+ [data-chart=${r}] {
3
3
  --color-${n}: ${i};
4
4
  }
5
5
  `:l.theme?Object.entries(l.theme).map(([c,u])=>`
6
- .${c} [data-chart=${t}] {
6
+ .${c} [data-chart=${r}] {
7
7
  --color-${n}: ${u.replace(/^hsl\((.*)\)$/,"$1")};
8
8
  }
9
9
  `).join(""):""}).join(`
10
- `)}}):null}function $({...t}){return r.jsx(P.Tooltip,{...t})}$.displayName="ChartTooltip";function w({active:t,payload:o,className:s,indicator:n="dot",hideLabel:l=!1,hideIndicator:i=!1,label:c,labelFormatter:u,labelClassName:d,formatter:b,color:p,nameKey:S,labelKey:x}){const{config:m}=L(),v=f.useMemo(()=>{if(l||!o?.length)return null;const[a]=o;if(!a)return null;const y=`${x||a.dataKey||a.name||"value"}`,C=m[y],g=!x&&typeof c=="string"?m[c]?.label||c:C?.label;return u?r.jsx("div",{className:h.cn("font-medium",d),children:u(g,o)}):g?r.jsx("div",{className:h.cn("font-medium",d),children:g}):null},[c,u,o,l,d,m,x]);if(!t||!o?.length)return null;const j=o.length===1&&n!=="dot";return r.jsxs("div",{className:h.cn("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",s),"data-slot":"chart-tooltip-content",children:[j?null:v,r.jsx("div",{className:"grid gap-1.5",children:o.map((a,y)=>{const C=`${S||a.name||a.dataKey||"value"}`,g=m[C],O=p||a.color||a.payload.fill||`var(--color-${C})`;return r.jsx("div",{className:h.cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2",n==="dot"&&"items-center"),children:b&&a?.value!==void 0&&a.name?b(a.value,a.name,a,y,o):r.jsxs(r.Fragment,{children:[g?.icon&&!i?r.jsx(g.icon,{size:10}):!i&&r.jsx("div",{className:h.cn("shrink-0 rounded-[2px]",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent":n==="dashed","my-0.5":j&&n==="dashed"}),style:{backgroundColor:n==="dashed"?"transparent":O,borderColor:O}}),r.jsxs("div",{className:h.cn("flex flex-1 justify-between leading-none",j?"items-end":"items-center"),children:[r.jsxs("div",{className:"grid gap-1.5",children:[j?v:null,r.jsx("span",{className:"text-muted-foreground",children:g?.label||a.name})]}),a.value&&r.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:typeof a.value=="number"?a.value.toLocaleString():a.value})]})]})},a.dataKey)})})]})}w.displayName="ChartTooltipContent";function A({...t}){return r.jsx(P.Legend,{...t})}A.displayName="ChartLegend";function T({className:t,hideIcon:o=!1,payload:s,verticalAlign:n="bottom",nameKey:l}){const{config:i}=L();return s?.length?r.jsx("div",{className:h.cn("flex items-center justify-center gap-4",n==="top"?"pb-4":"pt-4",t),"data-slot":"chart-legend-content",children:s.map(c=>{const u=`${l||c.dataKey||"value"}`,d=i[u];return r.jsxs("div",{className:h.cn("[&>svg]:text-muted-foreground flex items-center gap-1.5"),children:[d?.icon&&!o?r.jsx(d.icon,{size:12}):r.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),d?.label||c.value]},c.value)})}):null}T.displayName="ChartLegendContent";Object.defineProperty(exports,"Area",{enumerable:!0,get:()=>e.Area});Object.defineProperty(exports,"AreaChart",{enumerable:!0,get:()=>e.AreaChart});Object.defineProperty(exports,"Bar",{enumerable:!0,get:()=>e.Bar});Object.defineProperty(exports,"BarChart",{enumerable:!0,get:()=>e.BarChart});Object.defineProperty(exports,"CartesianGrid",{enumerable:!0,get:()=>e.CartesianGrid});Object.defineProperty(exports,"Cell",{enumerable:!0,get:()=>e.Cell});Object.defineProperty(exports,"ChartLabel",{enumerable:!0,get:()=>e.Label});Object.defineProperty(exports,"ChartsLegend",{enumerable:!0,get:()=>e.Legend});Object.defineProperty(exports,"ChartsTooltip",{enumerable:!0,get:()=>e.Tooltip});Object.defineProperty(exports,"Customized",{enumerable:!0,get:()=>e.Customized});Object.defineProperty(exports,"LabelList",{enumerable:!0,get:()=>e.LabelList});Object.defineProperty(exports,"Line",{enumerable:!0,get:()=>e.Line});Object.defineProperty(exports,"LineChart",{enumerable:!0,get:()=>e.LineChart});Object.defineProperty(exports,"Pie",{enumerable:!0,get:()=>e.Pie});Object.defineProperty(exports,"PieChart",{enumerable:!0,get:()=>e.PieChart});Object.defineProperty(exports,"PolarAngleAxis",{enumerable:!0,get:()=>e.PolarAngleAxis});Object.defineProperty(exports,"PolarGrid",{enumerable:!0,get:()=>e.PolarGrid});Object.defineProperty(exports,"PolarRadiusAxis",{enumerable:!0,get:()=>e.PolarRadiusAxis});Object.defineProperty(exports,"Radar",{enumerable:!0,get:()=>e.Radar});Object.defineProperty(exports,"RadarChart",{enumerable:!0,get:()=>e.RadarChart});Object.defineProperty(exports,"RadialBar",{enumerable:!0,get:()=>e.RadialBar});Object.defineProperty(exports,"RadialBarChart",{enumerable:!0,get:()=>e.RadialBarChart});Object.defineProperty(exports,"Rectangle",{enumerable:!0,get:()=>e.Rectangle});Object.defineProperty(exports,"ReferenceLine",{enumerable:!0,get:()=>e.ReferenceLine});Object.defineProperty(exports,"ResponsiveContainer",{enumerable:!0,get:()=>e.ResponsiveContainer});Object.defineProperty(exports,"Sector",{enumerable:!0,get:()=>e.Sector});Object.defineProperty(exports,"XAxis",{enumerable:!0,get:()=>e.XAxis});Object.defineProperty(exports,"YAxis",{enumerable:!0,get:()=>e.YAxis});exports.ChartContainer=R;exports.ChartLegend=A;exports.ChartLegendContent=T;exports.ChartStyle=N;exports.ChartTooltip=$;exports.ChartTooltipContent=w;
10
+ `)}}):null}function $({...r}){return t.jsx(O.Tooltip,{...r})}$.displayName="ChartTooltip";function A({active:r,payload:o,className:s,indicator:n="dot",hideLabel:l=!1,hideIndicator:i=!1,label:c,labelFormatter:u,labelClassName:d,formatter:j,color:y,nameKey:P,labelKey:p}){const{config:b}=R(),C=m.useMemo(()=>{if(l||!o?.length)return null;const[a]=o;if(!a)return null;const v=`${p||a.dataKey||a.name||"value"}`,x=b[v],f=!p&&typeof c=="string"?b[c]?.label||c:x?.label;return u?t.jsx("div",{className:h.cn("font-medium",d),children:u(f,o)}):f?t.jsx("div",{className:h.cn("font-medium",d),children:f}):null},[c,u,o,l,d,b,p]);if(!r||!o?.length)return null;const g=o.length===1&&n!=="dot";return t.jsxs("div",{className:h.cn("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",s),"data-slot":"chart-tooltip-content",children:[g?null:C,t.jsx("div",{className:"grid gap-1.5",children:o.map((a,v)=>{const x=`${P||a.name||a.dataKey||"value"}`,f=b[x],_=y||a.color||a.payload.fill||`var(--color-${x})`;return t.jsx("div",{className:h.cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2",n==="dot"&&"items-center"),children:j&&a?.value!==void 0&&a.name?j(a.value,a.name,a,v,o):t.jsxs(t.Fragment,{children:[f?.icon&&!i?t.jsx(f.icon,{size:10}):!i&&t.jsx("div",{className:h.cn("shrink-0 rounded-[2px]",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent":n==="dashed","my-0.5":g&&n==="dashed"}),style:{backgroundColor:n==="dashed"?"transparent":_,borderColor:_}}),t.jsxs("div",{className:h.cn("flex flex-1 justify-between leading-none",g?"items-end":"items-center"),children:[t.jsxs("div",{className:"grid gap-1.5",children:[g?C:null,t.jsx("span",{className:"text-muted-foreground",children:f?.label||a.name})]}),a.value&&t.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:typeof a.value=="number"?a.value.toLocaleString():a.value})]})]})},a.dataKey)})})]})}A.displayName="ChartTooltipContent";function T({...r}){return t.jsx(O.Legend,{...r})}T.displayName="ChartLegend";function S({className:r,hideIcon:o=!1,payload:s,verticalAlign:n="bottom",nameKey:l}){const{config:i}=R();return s?.length?t.jsx("div",{className:h.cn("flex items-center justify-center gap-4",n==="top"?"pb-4":"pt-4",r),"data-slot":"chart-legend-content",children:s.map(c=>{const u=`${l||c.dataKey||"value"}`,d=i[u];return t.jsxs("div",{className:h.cn("[&>svg]:text-muted-foreground flex items-center gap-1.5"),children:[d?.icon&&!o?t.jsx(d.icon,{size:12}):t.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),d?.label||c.value]},c.value)})}):null}S.displayName="ChartLegendContent";Object.defineProperty(exports,"Area",{enumerable:!0,get:()=>e.Area});Object.defineProperty(exports,"AreaChart",{enumerable:!0,get:()=>e.AreaChart});Object.defineProperty(exports,"Bar",{enumerable:!0,get:()=>e.Bar});Object.defineProperty(exports,"BarChart",{enumerable:!0,get:()=>e.BarChart});Object.defineProperty(exports,"CartesianGrid",{enumerable:!0,get:()=>e.CartesianGrid});Object.defineProperty(exports,"Cell",{enumerable:!0,get:()=>e.Cell});Object.defineProperty(exports,"ChartLabel",{enumerable:!0,get:()=>e.Label});Object.defineProperty(exports,"ChartsLegend",{enumerable:!0,get:()=>e.Legend});Object.defineProperty(exports,"ChartsTooltip",{enumerable:!0,get:()=>e.Tooltip});Object.defineProperty(exports,"Customized",{enumerable:!0,get:()=>e.Customized});Object.defineProperty(exports,"LabelList",{enumerable:!0,get:()=>e.LabelList});Object.defineProperty(exports,"Line",{enumerable:!0,get:()=>e.Line});Object.defineProperty(exports,"LineChart",{enumerable:!0,get:()=>e.LineChart});Object.defineProperty(exports,"Pie",{enumerable:!0,get:()=>e.Pie});Object.defineProperty(exports,"PieChart",{enumerable:!0,get:()=>e.PieChart});Object.defineProperty(exports,"PolarAngleAxis",{enumerable:!0,get:()=>e.PolarAngleAxis});Object.defineProperty(exports,"PolarGrid",{enumerable:!0,get:()=>e.PolarGrid});Object.defineProperty(exports,"PolarRadiusAxis",{enumerable:!0,get:()=>e.PolarRadiusAxis});Object.defineProperty(exports,"Radar",{enumerable:!0,get:()=>e.Radar});Object.defineProperty(exports,"RadarChart",{enumerable:!0,get:()=>e.RadarChart});Object.defineProperty(exports,"RadialBar",{enumerable:!0,get:()=>e.RadialBar});Object.defineProperty(exports,"RadialBarChart",{enumerable:!0,get:()=>e.RadialBarChart});Object.defineProperty(exports,"Rectangle",{enumerable:!0,get:()=>e.Rectangle});Object.defineProperty(exports,"ReferenceLine",{enumerable:!0,get:()=>e.ReferenceLine});Object.defineProperty(exports,"ResponsiveContainer",{enumerable:!0,get:()=>e.ResponsiveContainer});Object.defineProperty(exports,"Sector",{enumerable:!0,get:()=>e.Sector});Object.defineProperty(exports,"XAxis",{enumerable:!0,get:()=>e.XAxis});Object.defineProperty(exports,"YAxis",{enumerable:!0,get:()=>e.YAxis});exports.ChartContainer=N;exports.ChartLegend=T;exports.ChartLegendContent=S;exports.ChartStyle=w;exports.ChartTooltip=$;exports.ChartTooltipContent=A;
package/dist/chart.d.ts CHANGED
@@ -33,6 +33,32 @@ interface ChartContainerProps extends React.ComponentProps<"div">, ChartContextP
33
33
  * Data hook for automated testing (required)
34
34
  */
35
35
  dataHook: string;
36
+ /**
37
+ * Width of the chart's ResponsiveContainer.
38
+ * A number (px) skips responsive measurement and avoids the initial -1 warning.
39
+ * A percent string (e.g. "50%") keeps responsive behaviour within that fraction.
40
+ * @default "100%"
41
+ */
42
+ width?: number | `${number}%`;
43
+ /**
44
+ * Height of the chart's ResponsiveContainer.
45
+ * A number (px) skips responsive measurement and avoids the initial -1 warning.
46
+ * A percent string (e.g. "50%") keeps responsive behaviour within that fraction.
47
+ * @default "100%"
48
+ */
49
+ height?: number | `${number}%`;
50
+ /**
51
+ * Minimum width for the chart's ResponsiveContainer.
52
+ */
53
+ minWidth?: number | string;
54
+ /**
55
+ * Minimum height for the chart's ResponsiveContainer.
56
+ */
57
+ minHeight?: number | string;
58
+ /**
59
+ * Maximum height for the chart's ResponsiveContainer.
60
+ */
61
+ maxHeight?: number;
36
62
  /**
37
63
  * Tracking element identifier for analytics
38
64
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/components/chart.tsx"],"names":[],"mappings":"AAEA,OA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AAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,UAAU,GACX,CAAC;AAEF,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,GACxB,CAAC;AAGF,OAAO,EACL,IAAI,EACJ,SAAS,EACT,GAAG,EACH,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,UAAU,EACV,KAAK,IAAI,UAAU,EACnB,SAAS,EACT,MAAM,IAAI,YAAY,EACtB,IAAI,EACJ,SAAS,EACT,GAAG,EACH,QAAQ,EACR,cAAc,EACd,SAAS,EACT,eAAe,EACf,KAAK,EACL,UAAU,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,OAAO,IAAI,aAAa,EACxB,KAAK,EACL,KAAK,GACN,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/components/chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAO9C,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC/C,GAAG,CACA;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,GACjC;QAAE,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CACnD,CAAC;CACH;AAED,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAkBF;;GAEG;AACH,UAAU,mBACR,S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IAAI,YAAY,EACtB,IAAI,EACJ,SAAS,EACT,GAAG,EACH,QAAQ,EACR,cAAc,EACd,SAAS,EACT,eAAe,EACf,KAAK,EACL,UAAU,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,OAAO,IAAI,aAAa,EACxB,KAAK,EACL,KAAK,GACN,MAAM,UAAU,CAAC"}
package/dist/chart.js CHANGED
@@ -1,44 +1,60 @@
1
- import { jsx as t, jsxs as f, Fragment as R } from "react/jsx-runtime";
2
- import * as g from "react";
3
- import * as _ from "recharts";
4
- import { Area as M, AreaChart as O, Bar as q, BarChart as E, CartesianGrid as H, Cell as X, Label as Y, Legend as D, Tooltip as J, Customized as Q, LabelList as U, Line as V, LineChart as W, Pie as Z, PieChart as F, PolarAngleAxis as ee, PolarGrid as re, PolarRadiusAxis as te, Radar as ne, RadarChart as ae, RadialBar as oe, RadialBarChart as se, Rectangle as le, ReferenceLine as ce, ResponsiveContainer as ie, Sector as de, XAxis as ue, YAxis as he } from "recharts";
1
+ import { jsx as t, jsxs as m, Fragment as R } from "react/jsx-runtime";
2
+ import * as C from "react";
3
+ import * as N from "recharts";
4
+ import { Area as M, AreaChart as O, Bar as q, BarChart as D, CartesianGrid as E, Cell as H, Label as W, Legend as X, Tooltip as Y, Customized as J, LabelList as Q, Line as U, LineChart as V, Pie as Z, PieChart as F, PolarAngleAxis as ee, PolarGrid as re, PolarRadiusAxis as te, Radar as ne, RadarChart as ae, RadialBar as oe, RadialBarChart as se, Rectangle as le, ReferenceLine as ce, ResponsiveContainer as ie, Sector as de, XAxis as ue, YAxis as he } from "recharts";
5
5
  import { cn as u } from "@brightlocal/ui-components/lib/utils";
6
- const y = g.createContext(null);
7
- function $() {
8
- const n = g.useContext(y);
6
+ const $ = C.createContext(null);
7
+ function w() {
8
+ const n = C.useContext($);
9
9
  if (!n)
10
10
  throw new Error("useChart must be used within a <ChartContainer />");
11
11
  return n;
12
12
  }
13
- const j = g.forwardRef(
13
+ const j = C.forwardRef(
14
14
  ({
15
15
  id: n,
16
16
  className: a,
17
17
  children: l,
18
18
  config: r,
19
19
  dataHook: s,
20
- trackingEl: c,
21
- trackingLabel: o,
22
- ...i
23
- }, d) => {
24
- const m = g.useId(), p = `chart-${n || m.replace(/:/g, "")}`;
25
- return /* @__PURE__ */ t(y.Provider, { value: { config: r }, children: /* @__PURE__ */ f(
20
+ width: c,
21
+ height: o,
22
+ minWidth: i,
23
+ minHeight: d,
24
+ maxHeight: v,
25
+ trackingEl: k,
26
+ trackingLabel: _,
27
+ ...p
28
+ }, g) => {
29
+ const x = C.useId(), h = `chart-${n || x.replace(/:/g, "")}`;
30
+ return /* @__PURE__ */ t($.Provider, { value: { config: r }, children: /* @__PURE__ */ m(
26
31
  "div",
27
32
  {
28
- ref: d,
33
+ ref: g,
29
34
  className: u(
30
35
  "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-pie-sector]:stroke-background flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-pie-sector]:stroke-2 [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none [&_svg_g]:outline-none [&_svg_g]:focus:outline-none",
31
36
  a
32
37
  ),
33
- "data-chart": p,
38
+ "data-chart": h,
34
39
  "data-hook": s,
35
40
  "data-slot": "chart-container",
36
- "data-tracking-el": c,
37
- "data-tracking-label": o,
38
- ...i,
41
+ "data-tracking-el": k,
42
+ "data-tracking-label": _,
43
+ ...p,
39
44
  children: [
40
- /* @__PURE__ */ t(T, { config: r, id: p }),
41
- /* @__PURE__ */ t(_.ResponsiveContainer, { children: l })
45
+ /* @__PURE__ */ t(T, { config: r, id: h }),
46
+ /* @__PURE__ */ t(
47
+ N.ResponsiveContainer,
48
+ {
49
+ height: o ?? "100%",
50
+ initialDimension: { width: 1, height: 1 },
51
+ maxHeight: v,
52
+ minHeight: d,
53
+ minWidth: i ?? 0,
54
+ width: c ?? "100%",
55
+ children: l
56
+ }
57
+ )
42
58
  ]
43
59
  }
44
60
  ) });
@@ -73,7 +89,7 @@ function T({ id: n, config: a }) {
73
89
  ) : null;
74
90
  }
75
91
  function A({ ...n }) {
76
- return /* @__PURE__ */ t(_.Tooltip, { ...n });
92
+ return /* @__PURE__ */ t(N.Tooltip, { ...n });
77
93
  }
78
94
  A.displayName = "ChartTooltip";
79
95
  function P({
@@ -86,32 +102,32 @@ function P({
86
102
  label: o,
87
103
  labelFormatter: i,
88
104
  labelClassName: d,
89
- formatter: m,
90
- color: p,
91
- nameKey: w,
92
- labelKey: b
105
+ formatter: v,
106
+ color: k,
107
+ nameKey: _,
108
+ labelKey: p
93
109
  }) {
94
- const { config: C } = $(), L = g.useMemo(() => {
110
+ const { config: g } = w(), x = C.useMemo(() => {
95
111
  if (s || !a?.length)
96
112
  return null;
97
113
  const [e] = a;
98
114
  if (!e)
99
115
  return null;
100
- const k = `${b || e.dataKey || e.name || "value"}`, x = C[k], h = !b && typeof o == "string" ? C[o]?.label || o : x?.label;
101
- return i ? /* @__PURE__ */ t("div", { className: u("font-medium", d), children: i(h, a) }) : h ? /* @__PURE__ */ t("div", { className: u("font-medium", d), children: h }) : null;
116
+ const L = `${p || e.dataKey || e.name || "value"}`, b = g[L], f = !p && typeof o == "string" ? g[o]?.label || o : b?.label;
117
+ return i ? /* @__PURE__ */ t("div", { className: u("font-medium", d), children: i(f, a) }) : f ? /* @__PURE__ */ t("div", { className: u("font-medium", d), children: f }) : null;
102
118
  }, [
103
119
  o,
104
120
  i,
105
121
  a,
106
122
  s,
107
123
  d,
108
- C,
109
- b
124
+ g,
125
+ p
110
126
  ]);
111
127
  if (!n || !a?.length)
112
128
  return null;
113
- const v = a.length === 1 && r !== "dot";
114
- return /* @__PURE__ */ f(
129
+ const h = a.length === 1 && r !== "dot";
130
+ return /* @__PURE__ */ m(
115
131
  "div",
116
132
  {
117
133
  className: u(
@@ -120,9 +136,9 @@ function P({
120
136
  ),
121
137
  "data-slot": "chart-tooltip-content",
122
138
  children: [
123
- v ? null : L,
124
- /* @__PURE__ */ t("div", { className: "grid gap-1.5", children: a.map((e, k) => {
125
- const x = `${w || e.name || e.dataKey || "value"}`, h = C[x], N = p || e.color || e.payload.fill || `var(--color-${x})`;
139
+ h ? null : x,
140
+ /* @__PURE__ */ t("div", { className: "grid gap-1.5", children: a.map((e, L) => {
141
+ const b = `${_ || e.name || e.dataKey || "value"}`, f = g[b], y = k || e.color || e.payload.fill || `var(--color-${b})`;
126
142
  return /* @__PURE__ */ t(
127
143
  "div",
128
144
  {
@@ -130,33 +146,33 @@ function P({
130
146
  "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2",
131
147
  r === "dot" && "items-center"
132
148
  ),
133
- children: m && e?.value !== void 0 && e.name ? m(e.value, e.name, e, k, a) : /* @__PURE__ */ f(R, { children: [
134
- h?.icon && !c ? /* @__PURE__ */ t(h.icon, { size: 10 }) : !c && /* @__PURE__ */ t(
149
+ children: v && e?.value !== void 0 && e.name ? v(e.value, e.name, e, L, a) : /* @__PURE__ */ m(R, { children: [
150
+ f?.icon && !c ? /* @__PURE__ */ t(f.icon, { size: 10 }) : !c && /* @__PURE__ */ t(
135
151
  "div",
136
152
  {
137
153
  className: u("shrink-0 rounded-[2px]", {
138
154
  "h-2.5 w-2.5": r === "dot",
139
155
  "w-1": r === "line",
140
156
  "w-0 border-[1.5px] border-dashed bg-transparent": r === "dashed",
141
- "my-0.5": v && r === "dashed"
157
+ "my-0.5": h && r === "dashed"
142
158
  }),
143
159
  style: {
144
- backgroundColor: r === "dashed" ? "transparent" : N,
145
- borderColor: N
160
+ backgroundColor: r === "dashed" ? "transparent" : y,
161
+ borderColor: y
146
162
  }
147
163
  }
148
164
  ),
149
- /* @__PURE__ */ f(
165
+ /* @__PURE__ */ m(
150
166
  "div",
151
167
  {
152
168
  className: u(
153
169
  "flex flex-1 justify-between leading-none",
154
- v ? "items-end" : "items-center"
170
+ h ? "items-end" : "items-center"
155
171
  ),
156
172
  children: [
157
- /* @__PURE__ */ f("div", { className: "grid gap-1.5", children: [
158
- v ? L : null,
159
- /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: h?.label || e.name })
173
+ /* @__PURE__ */ m("div", { className: "grid gap-1.5", children: [
174
+ h ? x : null,
175
+ /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: f?.label || e.name })
160
176
  ] }),
161
177
  e.value && /* @__PURE__ */ t("span", { className: "text-foreground font-mono font-medium tabular-nums", children: typeof e.value == "number" ? e.value.toLocaleString() : e.value })
162
178
  ]
@@ -173,7 +189,7 @@ function P({
173
189
  }
174
190
  P.displayName = "ChartTooltipContent";
175
191
  function B({ ...n }) {
176
- return /* @__PURE__ */ t(_.Legend, { ...n });
192
+ return /* @__PURE__ */ t(N.Legend, { ...n });
177
193
  }
178
194
  B.displayName = "ChartLegend";
179
195
  function S({
@@ -183,7 +199,7 @@ function S({
183
199
  verticalAlign: r = "bottom",
184
200
  nameKey: s
185
201
  }) {
186
- const { config: c } = $();
202
+ const { config: c } = w();
187
203
  return l?.length ? /* @__PURE__ */ t(
188
204
  "div",
189
205
  {
@@ -195,7 +211,7 @@ function S({
195
211
  "data-slot": "chart-legend-content",
196
212
  children: l.map((o) => {
197
213
  const i = `${s || o.dataKey || "value"}`, d = c[i];
198
- return /* @__PURE__ */ f(
214
+ return /* @__PURE__ */ m(
199
215
  "div",
200
216
  {
201
217
  className: u(
@@ -225,22 +241,22 @@ export {
225
241
  M as Area,
226
242
  O as AreaChart,
227
243
  q as Bar,
228
- E as BarChart,
229
- H as CartesianGrid,
230
- X as Cell,
244
+ D as BarChart,
245
+ E as CartesianGrid,
246
+ H as Cell,
231
247
  j as ChartContainer,
232
- Y as ChartLabel,
248
+ W as ChartLabel,
233
249
  B as ChartLegend,
234
250
  S as ChartLegendContent,
235
251
  T as ChartStyle,
236
252
  A as ChartTooltip,
237
253
  P as ChartTooltipContent,
238
- D as ChartsLegend,
239
- J as ChartsTooltip,
240
- Q as Customized,
241
- U as LabelList,
242
- V as Line,
243
- W as LineChart,
254
+ X as ChartsLegend,
255
+ Y as ChartsTooltip,
256
+ J as Customized,
257
+ Q as LabelList,
258
+ U as Line,
259
+ V as LineChart,
244
260
  Z as Pie,
245
261
  F as PieChart,
246
262
  ee as PolarAngleAxis,
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"),b=require("./description.cjs"),h=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]]:[&_[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 w({className:e,orientation:a="vertical",variant:t="default",align:d="start",...i}){return l.jsx("div",{className:r.cn(_({orientation:a,variant:t}),d==="end"&&a==="horizontal"&&"grid-cols-[1fr_auto]",e),"data-orientation":a,"data-slot":"field","data-variant":t,role:"group",...i})}function F({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 k({className:e,htmlFor:a,dataHook:t,...d}){return l.jsx(h.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(b.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=w;exports.FieldContent=F;exports.FieldDescription=j;exports.FieldError=N;exports.FieldErrorIcon=y;exports.FieldGroup=x;exports.FieldLabel=k;exports.FieldLegend=v;exports.FieldSet=n;exports.fieldLegendVariants=m;
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"),b=require("./description.cjs"),h=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 w({className:e,orientation:a="vertical",variant:t="default",align:d="start",...i}){return l.jsx("div",{className:r.cn(_({orientation:a,variant:t}),d==="end"&&a==="horizontal"&&"grid-cols-[1fr_auto]",e),"data-orientation":a,"data-slot":"field","data-variant":t,role:"group",...i})}function F({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 k({className:e,htmlFor:a,dataHook:t,...d}){return l.jsx(h.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(b.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=w;exports.FieldContent=F;exports.FieldDescription=j;exports.FieldError=N;exports.FieldErrorIcon=y;exports.FieldGroup=x;exports.FieldLabel=k;exports.FieldLegend=v;exports.FieldSet=n;exports.fieldLegendVariants=m;
@@ -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,UA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;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAevB;AAED;;GAEG;AACH,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,UAAU,eAAgB,SAAQ,IAAI,CACpC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,CACX;IACC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;CAC5C;AAED,UAAU,mBAAoB,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IAC5D;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EAAE,IAAkB,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAQrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,QAAQ,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"}
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEl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