@gv-tech/ui-web 2.29.4 → 2.30.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/dist/chart.cjs CHANGED
@@ -4,4 +4,4 @@ ${n.map(([e,n])=>{let r=n.theme?.[t]??n.color;return r?` --color-${e}: ${r};`:n
4
4
  `)}
5
5
  }
6
6
  `).join(`
7
- `)}}):null},d=i.Tooltip;function f({active:e,payload:i,className:a,indicator:o=`dot`,hideLabel:s=!1,hideIndicator:l=!1,label:u,labelFormatter:d,labelClassName:f,formatter:p,color:m,nameKey:g,labelKey:_}){let{config:v}=c(),y=n.useMemo(()=>{if(s||!i?.length)return null;let[e]=i,n=`${_??e?.dataKey??e?.name??`value`}`,a=h(v,e,n),o=!_&&typeof u==`string`?v[u]?.label??u:a?.label;return d?(0,r.jsx)(`div`,{className:(0,t.cn)(`font-medium`,f),children:d(o,i)}):o?(0,r.jsx)(`div`,{className:(0,t.cn)(`font-medium`,f),children:o}):null},[u,d,i,s,f,v,_]);if(!e||!i?.length)return null;let b=i.length===1&&o!==`dot`;return(0,r.jsxs)(`div`,{className:(0,t.cn)(`border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl`,a),children:[b?null:y,(0,r.jsx)(`div`,{className:`grid gap-1.5`,children:i.filter(e=>e.type!==`none`).map((e,n)=>{let i=`${g??e.name??e.dataKey??`value`}`,a=h(v,e,i),s=m??e.payload?.fill??e.color;return(0,r.jsx)(`div`,{className:(0,t.cn)(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5`,o===`dot`&&`items-center`),children:p&&e?.value!==void 0&&e.name?p(e.value,e.name,e,n,e.payload):(0,r.jsxs)(r.Fragment,{children:[a?.icon?(0,r.jsx)(a.icon,{}):!l&&(0,r.jsx)(`div`,{className:(0,t.cn)(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":o===`dot`,"w-1":o===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":o===`dashed`,"my-0.5":b&&o===`dashed`}),style:{"--color-bg":s,"--color-border":s}}),(0,r.jsxs)(`div`,{className:(0,t.cn)(`flex flex-1 justify-between leading-none`,b?`items-end`:`items-center`),children:[(0,r.jsxs)(`div`,{className:`grid gap-1.5`,children:[b?y:null,(0,r.jsx)(`span`,{className:`text-muted-foreground`,children:a?.label??e.name})]}),e.value!=null&&(0,r.jsx)(`span`,{className:`text-foreground font-mono font-medium tabular-nums`,children:typeof e.value==`number`?e.value.toLocaleString():String(e.value)})]})]})},n)})})]})}var p=i.Legend;function m({className:e,hideIcon:n=!1,payload:i,verticalAlign:a=`bottom`,nameKey:o}){let{config:s}=c();return i?.length?(0,r.jsx)(`div`,{className:(0,t.cn)(`flex items-center justify-center gap-4`,a===`top`?`pb-3`:`pt-3`,e),children:i.filter(e=>e.type!==`none`).map((e,i)=>{let a=`${o??e.dataKey??`value`}`,c=h(s,e,a);return(0,r.jsxs)(`div`,{className:(0,t.cn)(`[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3`),children:[c?.icon&&!n?(0,r.jsx)(c.icon,{}):(0,r.jsx)(`div`,{className:`h-2 w-2 shrink-0 rounded-[2px]`,style:{backgroundColor:e.color}}),c?.label]},i)})}):null}function h(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}exports.ChartContainer=l,exports.ChartLegend=p,exports.ChartLegendContent=m,exports.ChartStyle=u,exports.ChartTooltip=d,exports.ChartTooltipContent=f;
7
+ `)}}):null},d=i.Tooltip;function f({active:e,payload:i,className:a,indicator:o=`dot`,hideLabel:s=!1,hideIndicator:l=!1,label:u,labelFormatter:d,labelClassName:f,formatter:p,color:m,nameKey:g,labelKey:_}){let{config:v}=c(),y=n.useMemo(()=>{if(s||!i?.length)return null;let[e]=i,n=`${_??e?.dataKey??e?.name??`value`}`,a=h(v,e,n),o=!_&&typeof u==`string`?v[u]?.label??u:a?.label;return d?(0,r.jsx)(`div`,{className:(0,t.cn)(`font-medium`,f),children:d(o,i)}):o?(0,r.jsx)(`div`,{className:(0,t.cn)(`font-medium`,f),children:o}):null},[u,d,i,s,f,v,_]);if(!e||!i?.length)return null;let b=i.length===1&&o!==`dot`;return(0,r.jsxs)(`div`,{className:(0,t.cn)(`border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl`,a),children:[b?null:y,(0,r.jsx)(`div`,{className:`grid gap-1.5`,children:i.filter(e=>e.type!==`none`).map((e,n)=>{let i=`${g??e.name??e.dataKey??`value`}`,a=h(v,e,i),s=m??e.payload?.fill??e.color;return(0,r.jsx)(`div`,{className:(0,t.cn)(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5`,o===`dot`&&`items-center`),children:p&&e?.value!==void 0&&e.name?p(e.value,e.name,e,n,e.payload):(0,r.jsxs)(r.Fragment,{children:[a?.icon?(0,r.jsx)(a.icon,{}):!l&&(0,r.jsx)(`div`,{className:(0,t.cn)(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":o===`dot`,"w-1":o===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":o===`dashed`,"my-0.5":b&&o===`dashed`}),style:{"--color-bg":s,"--color-border":s}}),(0,r.jsxs)(`div`,{className:(0,t.cn)(`flex flex-1 justify-between leading-none`,b?`items-end`:`items-center`),children:[(0,r.jsxs)(`div`,{className:`grid gap-1.5`,children:[b?y:null,(0,r.jsx)(`span`,{className:`text-muted-foreground`,children:a?.label??e.name})]}),e.value!==null&&e.value!==void 0&&(0,r.jsx)(`span`,{className:`text-foreground font-mono font-medium tabular-nums`,children:typeof e.value==`number`?e.value.toLocaleString():String(e.value)})]})]})},n)})})]})}var p=i.Legend;function m({className:e,hideIcon:n=!1,payload:i,verticalAlign:a=`bottom`,nameKey:o}){let{config:s}=c();return i?.length?(0,r.jsx)(`div`,{className:(0,t.cn)(`flex items-center justify-center gap-4`,a===`top`?`pb-3`:`pt-3`,e),children:i.filter(e=>e.type!==`none`).map((e,i)=>{let a=`${o??e.dataKey??`value`}`,c=h(s,e,a);return(0,r.jsxs)(`div`,{className:(0,t.cn)(`[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3`),children:[c?.icon&&!n?(0,r.jsx)(c.icon,{}):(0,r.jsx)(`div`,{className:`h-2 w-2 shrink-0 rounded-[2px]`,style:{backgroundColor:e.color}}),c?.label]},i)})}):null}function h(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}exports.ChartContainer=l,exports.ChartLegend=p,exports.ChartLegendContent=m,exports.ChartStyle=u,exports.ChartTooltip=d,exports.ChartTooltipContent=f;
package/dist/chart.mjs CHANGED
@@ -96,7 +96,7 @@ function p({ active: a, payload: o, className: s, indicator: c = "dot", hideLabe
96
96
  className: "text-muted-foreground",
97
97
  children: s?.label ?? t.name
98
98
  })]
99
- }), t.value != null && /* @__PURE__ */ r("span", {
99
+ }), t.value !== null && t.value !== void 0 && /* @__PURE__ */ r("span", {
100
100
  className: "text-foreground font-mono font-medium tabular-nums",
101
101
  children: typeof t.value == "number" ? t.value.toLocaleString() : String(t.value)
102
102
  })]
package/dist/field.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./label.cjs"),t=require("./separator.cjs");let n=require("cn"),r=require("react"),i=require("react/jsx-runtime"),a=require("class-variance-authority");function o({className:e,...t}){return(0,i.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,n.cn)(`flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t})}function s({className:e,variant:t=`legend`,...r}){return(0,i.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,n.cn)(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...r})}function c({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-group`,className:(0,n.cn)(`group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t})}var l=(0,a.cva)(`group/field data-[invalid=true]:text-destructive flex w-full gap-2`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function u({className:e,orientation:t=`vertical`,...r}){return(0,i.jsx)(`fieldset`,{"data-slot":`field`,"data-orientation":t,className:(0,n.cn)(l({orientation:t}),e),...r})}function d({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-content`,className:(0,n.cn)(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,e),...t})}function f({className:t,...r}){return(0,i.jsx)(e.Label,{"data-slot":`field-label`,className:(0,n.cn)(`group/field-label peer/field-label has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-2.5`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,t),...r})}function p({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-label`,className:(0,n.cn)(`flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50`,e),...t})}function m({className:e,...t}){return(0,i.jsx)(`p`,{"data-slot":`field-description`,className:(0,n.cn)(`text-muted-foreground text-start text-sm leading-normal font-normal group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t})}function h({children:e,className:r,...a}){return(0,i.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,n.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,r),...a,children:[(0,i.jsx)(t.Separator,{className:`absolute inset-0 top-1/2`}),e&&(0,i.jsx)(`span`,{className:`bg-background text-muted-foreground relative mx-auto block w-fit px-2`,"data-slot":`field-separator-content`,children:e})]})}function g({className:e,children:t,errors:a,...o}){let s=(0,r.useMemo)(()=>{if(t)return t;if(!a?.length)return null;let e=[...new Map(a.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,i.jsx)(`ul`,{className:`ms-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,i.jsx)(`li`,{children:e.message},t))})},[t,a]);return s?(0,i.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,n.cn)(`text-destructive text-sm font-normal`,e),...o,children:s}):null}exports.Field=u,exports.FieldContent=d,exports.FieldDescription=m,exports.FieldError=g,exports.FieldGroup=c,exports.FieldLabel=f,exports.FieldLegend=s,exports.FieldSeparator=h,exports.FieldSet=o,exports.FieldTitle=p;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./label.cjs"),t=require("./separator.cjs");let n=require("cn"),r=require("react"),i=require("react/jsx-runtime"),a=require("class-variance-authority");function o({className:e,...t}){return(0,i.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,n.cn)(`flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t})}function s({className:e,variant:t=`legend`,...r}){return(0,i.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,n.cn)(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...r})}function c({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-group`,className:(0,n.cn)(`group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t})}var l=(0,a.cva)(`group/field data-[invalid=true]:text-destructive flex w-full gap-2`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function u({className:e,orientation:t=`vertical`,...r}){return(0,i.jsx)(`fieldset`,{"data-slot":`field`,"data-orientation":t,className:(0,n.cn)(l({orientation:t}),e),...r})}function d({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-content`,className:(0,n.cn)(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,e),...t})}function f({className:t,...r}){return(0,i.jsx)(e.Label,{"data-slot":`field-label`,className:(0,n.cn)(`group/field-label peer/field-label has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-2.5`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,t),...r})}function p({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-label`,className:(0,n.cn)(`flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50`,e),...t})}function m({className:e,...t}){return(0,i.jsx)(`p`,{"data-slot":`field-description`,className:(0,n.cn)(`text-muted-foreground text-start text-sm leading-normal font-normal group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t})}function h({children:e,className:r,...a}){return(0,i.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,n.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,r),...a,children:[(0,i.jsx)(t.Separator,{className:`absolute inset-0 top-1/2`}),e&&(0,i.jsx)(`span`,{className:`bg-background text-muted-foreground relative mx-auto block w-fit px-2`,"data-slot":`field-separator-content`,children:e})]})}function g({className:e,children:t,errors:a,...o}){let s=(0,r.useMemo)(()=>{if(t)return t;if(!a?.length)return null;let e=[...new Map(a.map(e=>[e?.message,e])).values()];return e.length===1?e[0]?.message:(0,i.jsx)(`ul`,{className:`ms-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,i.jsx)(`li`,{children:e.message},t))})},[t,a]);return s?(0,i.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,n.cn)(`text-destructive text-sm font-normal`,e),...o,children:s}):null}exports.Field=u,exports.FieldContent=d,exports.FieldDescription=m,exports.FieldError=g,exports.FieldGroup=c,exports.FieldLabel=f,exports.FieldLegend=s,exports.FieldSeparator=h,exports.FieldSet=o,exports.FieldTitle=p;
package/dist/field.mjs CHANGED
@@ -91,7 +91,7 @@ function _({ className: e, children: t, errors: a, ...o }) {
91
91
  if (t) return t;
92
92
  if (!a?.length) return null;
93
93
  let e = [...new Map(a.map((e) => [e?.message, e])).values()];
94
- return e?.length == 1 ? e[0]?.message : /* @__PURE__ */ i("ul", {
94
+ return e.length === 1 ? e[0]?.message : /* @__PURE__ */ i("ul", {
95
95
  className: "ms-4 flex list-disc flex-col gap-1",
96
96
  children: e.map((e, t) => e?.message && /* @__PURE__ */ i("li", { children: e.message }, t))
97
97
  });
@@ -1 +1 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.js"),t=require("./button.cjs"),n=require("./dialog.cjs"),r=require("./drawer.cjs"),i=require("./utils-ChMUqofy.js");let a=require("lucide-react"),o=require("react");o=e.t(o);let s=require("react/jsx-runtime");var c=`(max-width: 767px)`,l=`https://www.buymeacoffee.com`,u=new Set([`buymeacoffee.com`,`www.buymeacoffee.com`]),d=e=>{let t=e.trim();try{let n=new URL(t),r=n.hostname.toLowerCase();return n.protocol!==`https:`||!u.has(r)?(console.warn(`Invalid supportUrl: ${e}. Falling back to default.`),l):t}catch{return console.warn(`Invalid supportUrl: ${e}. Falling back to default.`),l}},f=e=>{let t=d(e);return t.endsWith(`/`)?t.slice(0,-1):t},p=e=>e.trim().replace(/^@+/,``),m=(e,t)=>`${f(e)}/${encodeURIComponent(p(t))}`,h=(e,t)=>`${f(e)}/widget/page/${encodeURIComponent(p(t))}`,g=()=>{let[e,t]=o.useState(()=>typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(c).matches);return o.useEffect(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(c),n=e=>t(e.matches);return t(e.matches),e.addEventListener(`change`,n),()=>{e.removeEventListener(`change`,n)}},[]),e};function _({supportUrl:e=l,creatorId:c,title:u=`Buy me a coffee`,description:d=`Support the project directly from this panel.`,iframeTitle:f=`Buy Me a Coffee support form`,open:p,defaultOpen:_=!1,onOpenChange:v,positionClassName:y,buttonClassName:b,panelClassName:x,className:S,type:C,onClick:w,...T}){let E=g(),D=p!==void 0,[O,k]=o.useState(_),A=D?p:O,j=o.useCallback(e=>{D||k(e),v?.(e)},[D,v]),M=o.useMemo(()=>m(e,c),[c,e]),N=o.useMemo(()=>h(e,c),[c,e]),P=(0,s.jsxs)(`div`,{className:`flex max-h-[75vh] flex-col gap-3`,children:[(0,s.jsx)(`div`,{className:`overflow-hidden rounded-md border`,children:(0,s.jsx)(`iframe`,{title:f,src:N,className:`h-[560px] w-full border-0`,loading:`lazy`,referrerPolicy:`strict-origin-when-cross-origin`})}),(0,s.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-between gap-2 text-xs`,children:[(0,s.jsx)(`span`,{children:`If the embedded checkout is unavailable, open the support page directly.`}),(0,s.jsxs)(`a`,{href:M,target:`_blank`,rel:`noopener noreferrer`,className:`text-foreground inline-flex items-center gap-1 font-medium underline underline-offset-2`,children:[`Open Buy Me a Coffee`,(0,s.jsx)(a.ExternalLink,{className:`h-3.5 w-3.5`})]})]})]}),F=(0,s.jsx)(`div`,{className:i.t(`fixed right-6 bottom-6 z-50`,y),children:(0,s.jsxs)(t.Button,{"aria-label":`Support this project`,type:C??`button`,className:i.t(`inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95`,b,S),onClick:e=>{w?.(e),e.defaultPrevented||j(!0)},...T,children:[(0,s.jsx)(a.Coffee,{className:`h-6 w-6`}),(0,s.jsx)(`span`,{className:`sr-only`,children:`Support this project`})]})});return E?(0,s.jsxs)(s.Fragment,{children:[F,(0,s.jsx)(r.Drawer,{open:A,onOpenChange:j,children:(0,s.jsxs)(r.DrawerContent,{className:i.t(`mx-auto w-full max-w-xl`,x),children:[(0,s.jsxs)(r.DrawerHeader,{children:[(0,s.jsx)(r.DrawerTitle,{children:u}),(0,s.jsx)(r.DrawerDescription,{children:d})]}),(0,s.jsx)(`div`,{className:`px-4 pb-4`,children:P})]})})]}):(0,s.jsxs)(s.Fragment,{children:[F,(0,s.jsx)(n.Dialog,{open:A,onOpenChange:j,children:(0,s.jsxs)(n.DialogContent,{className:i.t(`max-w-xl p-5`,x),children:[(0,s.jsxs)(n.DialogHeader,{children:[(0,s.jsx)(n.DialogTitle,{children:u}),(0,s.jsx)(n.DialogDescription,{children:d})]}),P]})})]})}exports.SupportFab=_;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.js"),t=require("./button.cjs"),n=require("./dialog.cjs"),r=require("./drawer.cjs"),i=require("./utils-ChMUqofy.js");let a=require("lucide-react"),o=require("react");o=e.t(o);let s=require("react/jsx-runtime");var c=`(max-width: 767px)`,l=`https://www.buymeacoffee.com`,u=new Set([`buymeacoffee.com`,`www.buymeacoffee.com`]),d=e=>{let t=e.trim();try{let n=new URL(t),r=n.hostname.toLowerCase();return n.protocol!==`https:`||!u.has(r)?(console.warn(`Invalid supportUrl: ${e}. Falling back to default.`),l):t}catch{return console.warn(`Invalid supportUrl: ${e}. Falling back to default.`),l}},f=e=>{let t=d(e);return t.endsWith(`/`)?t.slice(0,-1):t},p=e=>e.trim().replace(/^@+/,``),m=(e,t)=>`${f(e)}/${encodeURIComponent(p(t))}`,h=(e,t)=>`${f(e)}/widget/page/${encodeURIComponent(p(t))}`,g=()=>typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(c).matches,_=()=>{let[e,t]=o.useState(g);return o.useEffect(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(c),n=e=>t(e.matches);return t(e.matches),e.addEventListener(`change`,n),()=>{e.removeEventListener(`change`,n)}},[]),e};function v({supportUrl:e=l,creatorId:c,title:u=`Buy me a coffee`,description:d=`Support the project directly from this panel.`,iframeTitle:f=`Buy Me a Coffee support form`,open:p,defaultOpen:g=!1,onOpenChange:v,positionClassName:y,buttonClassName:b,panelClassName:x,className:S,type:C,onClick:w,...T}){let E=_(),D=p!==void 0,[O,k]=o.useState(g),A=D?p:O,j=o.useCallback(e=>{D||k(e),v?.(e)},[D,v]),M=o.useMemo(()=>m(e,c),[c,e]),N=o.useMemo(()=>h(e,c),[c,e]),P=(0,s.jsxs)(`div`,{className:`flex max-h-[75vh] flex-col gap-3`,children:[(0,s.jsx)(`div`,{className:`overflow-hidden rounded-md border`,children:(0,s.jsx)(`iframe`,{title:f,src:N,className:`h-[560px] w-full border-0`,loading:`lazy`,referrerPolicy:`strict-origin-when-cross-origin`})}),(0,s.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-between gap-2 text-xs`,children:[(0,s.jsx)(`span`,{children:`If the embedded checkout is unavailable, open the support page directly.`}),(0,s.jsxs)(`a`,{href:M,target:`_blank`,rel:`noopener noreferrer`,className:`text-foreground inline-flex items-center gap-1 font-medium underline underline-offset-2`,children:[`Open Buy Me a Coffee`,(0,s.jsx)(a.ExternalLink,{className:`h-3.5 w-3.5`})]})]})]}),F=(0,s.jsx)(`div`,{className:i.t(`fixed right-6 bottom-6 z-50`,y),children:(0,s.jsxs)(t.Button,{"aria-label":`Support this project`,type:C??`button`,className:i.t(`inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95`,b,S),onClick:e=>{w?.(e),e.defaultPrevented||j(!0)},...T,children:[(0,s.jsx)(a.Coffee,{className:`h-6 w-6`}),(0,s.jsx)(`span`,{className:`sr-only`,children:`Support this project`})]})});return E?(0,s.jsxs)(s.Fragment,{children:[F,(0,s.jsx)(r.Drawer,{open:A,onOpenChange:j,children:(0,s.jsxs)(r.DrawerContent,{className:i.t(`mx-auto w-full max-w-xl`,x),children:[(0,s.jsxs)(r.DrawerHeader,{children:[(0,s.jsx)(r.DrawerTitle,{children:u}),(0,s.jsx)(r.DrawerDescription,{children:d})]}),(0,s.jsx)(`div`,{className:`px-4 pb-4`,children:P})]})})]}):(0,s.jsxs)(s.Fragment,{children:[F,(0,s.jsx)(n.Dialog,{open:A,onOpenChange:j,children:(0,s.jsxs)(n.DialogContent,{className:i.t(`max-w-xl p-5`,x),children:[(0,s.jsxs)(n.DialogHeader,{children:[(0,s.jsx)(n.DialogTitle,{children:u}),(0,s.jsx)(n.DialogDescription,{children:d})]}),P]})})]})}exports.SupportFab=v;
@@ -19,8 +19,8 @@ var v = "(max-width: 767px)", y = "https://www.buymeacoffee.com", b = /* @__PURE
19
19
  }, S = (e) => {
20
20
  let t = x(e);
21
21
  return t.endsWith("/") ? t.slice(0, -1) : t;
22
- }, C = (e) => e.trim().replace(/^@+/, ""), w = (e, t) => `${S(e)}/${encodeURIComponent(C(t))}`, T = (e, t) => `${S(e)}/widget/page/${encodeURIComponent(C(t))}`, E = () => {
23
- let [e, t] = m.useState(() => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(v).matches);
22
+ }, C = (e) => e.trim().replace(/^@+/, ""), w = (e, t) => `${S(e)}/${encodeURIComponent(C(t))}`, T = (e, t) => `${S(e)}/widget/page/${encodeURIComponent(C(t))}`, E = () => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(v).matches, D = () => {
23
+ let [e, t] = m.useState(E);
24
24
  return m.useEffect(() => {
25
25
  if (typeof window > "u" || typeof window.matchMedia != "function") return;
26
26
  let e = window.matchMedia(v), n = (e) => t(e.matches);
@@ -29,8 +29,8 @@ var v = "(max-width: 767px)", y = "https://www.buymeacoffee.com", b = /* @__PURE
29
29
  };
30
30
  }, []), e;
31
31
  };
32
- function D({ supportUrl: v = y, creatorId: b, title: x = "Buy me a coffee", description: S = "Support the project directly from this panel.", iframeTitle: C = "Buy Me a Coffee support form", open: D, defaultOpen: O = !1, onOpenChange: k, positionClassName: A, buttonClassName: j, panelClassName: M, className: N, type: P, onClick: F, ...I }) {
33
- let L = E(), R = D !== void 0, [z, B] = m.useState(O), V = R ? D : z, H = m.useCallback((e) => {
32
+ function O({ supportUrl: v = y, creatorId: b, title: x = "Buy me a coffee", description: S = "Support the project directly from this panel.", iframeTitle: C = "Buy Me a Coffee support form", open: E, defaultOpen: O = !1, onOpenChange: k, positionClassName: A, buttonClassName: j, panelClassName: M, className: N, type: P, onClick: F, ...I }) {
33
+ let L = D(), R = E !== void 0, [z, B] = m.useState(O), V = R ? E : z, H = m.useCallback((e) => {
34
34
  R || B(e), k?.(e);
35
35
  }, [R, k]), U = m.useMemo(() => w(v, b), [b, v]), W = m.useMemo(() => T(v, b), [b, v]), G = /* @__PURE__ */ _("div", {
36
36
  className: "flex max-h-[75vh] flex-col gap-3",
@@ -88,4 +88,4 @@ function D({ supportUrl: v = y, creatorId: b, title: x = "Buy me a coffee", desc
88
88
  })
89
89
  })] });
90
90
  }
91
- export { D as SupportFab };
91
+ export { O as SupportFab };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gv-tech/ui-web",
3
- "version": "2.29.4",
3
+ "version": "2.30.0",
4
4
  "description": "Web (DOM/Radix) implementations of the GV Tech design system components",
5
5
  "license": "MIT",
6
6
  "author": "Eric N. Garcia <eng618@garciaericn.com>",
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@base-ui/react": "^1.5.0",
47
- "@gv-tech/design-tokens": "^2.12.0",
48
- "@gv-tech/ui-core": "^2.12.0",
47
+ "@gv-tech/design-tokens": "^2.29.4",
48
+ "@gv-tech/ui-core": "^2.29.4",
49
49
  "@hookform/resolvers": "^5.2.2",
50
50
  "@radix-ui/react-accordion": "^1.2.12",
51
51
  "@radix-ui/react-alert-dialog": "^1.1.15",
package/src/chart.tsx CHANGED
@@ -213,7 +213,7 @@ function ChartTooltipContent({
213
213
  {nestLabel ? tooltipLabel : null}
214
214
  <span className="text-muted-foreground">{itemConfig?.label ?? item.name}</span>
215
215
  </div>
216
- {item.value != null && (
216
+ {item.value !== null && item.value !== undefined && (
217
217
  <span className="text-foreground font-mono font-medium tabular-nums">
218
218
  {typeof item.value === 'number' ? item.value.toLocaleString() : String(item.value)}
219
219
  </span>
package/src/field.tsx CHANGED
@@ -175,7 +175,7 @@ function FieldError({ className, children, errors, ...props }: React.ComponentPr
175
175
 
176
176
  const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
177
177
 
178
- if (uniqueErrors?.length == 1) {
178
+ if (uniqueErrors.length === 1) {
179
179
  return uniqueErrors[0]?.message;
180
180
  }
181
181
 
package/src/setupTests.ts CHANGED
@@ -77,8 +77,8 @@ if (!globalThis.PointerEvent) {
77
77
  this.isPrimary = params.isPrimary || false;
78
78
  }
79
79
  }
80
- globalThis.PointerEvent = PointerEvent as any;
81
- window.PointerEvent = PointerEvent as any;
80
+ globalThis.PointerEvent = PointerEvent as unknown as typeof globalThis.PointerEvent;
81
+ window.PointerEvent = PointerEvent as unknown as typeof window.PointerEvent;
82
82
  }
83
83
 
84
84
  // Layout mocks
@@ -50,15 +50,15 @@ const buildEmbedUrl = (supportUrl: string, creatorId: string) => {
50
50
  return `${base}/widget/page/${creator}`;
51
51
  };
52
52
 
53
- const useIsMobile = () => {
54
- const getInitial = () => {
55
- if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {
56
- return false;
57
- }
58
- return window.matchMedia(MOBILE_QUERY).matches;
59
- };
53
+ const getInitialIsMobile = () => {
54
+ if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {
55
+ return false;
56
+ }
57
+ return window.matchMedia(MOBILE_QUERY).matches;
58
+ };
60
59
 
61
- const [isMobile, setIsMobile] = React.useState(getInitial);
60
+ const useIsMobile = () => {
61
+ const [isMobile, setIsMobile] = React.useState(getInitialIsMobile);
62
62
 
63
63
  React.useEffect(() => {
64
64
  if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {