@xploreu/components 0.2.3 → 0.2.5

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.
Files changed (42) hide show
  1. package/dist/chunk-4YATKUEK.js +2 -0
  2. package/dist/chunk-4YATKUEK.js.map +1 -0
  3. package/dist/chunk-CN65BQBT.js +2 -0
  4. package/dist/chunk-CN65BQBT.js.map +1 -0
  5. package/dist/chunk-G3PVJ4PR.js +2 -0
  6. package/dist/chunk-G3PVJ4PR.js.map +1 -0
  7. package/dist/chunk-TED2PUK6.js +2 -0
  8. package/dist/chunk-TED2PUK6.js.map +1 -0
  9. package/dist/chunk-XRBBTMGF.js +2 -0
  10. package/dist/chunk-XRBBTMGF.js.map +1 -0
  11. package/dist/chunk-XXHHZYH6.js +2 -0
  12. package/dist/chunk-XXHHZYH6.js.map +1 -0
  13. package/dist/chunk-ZQTWDSKK.js +2 -0
  14. package/dist/chunk-ZQTWDSKK.js.map +1 -0
  15. package/dist/composites/combobox-chip-outside.d.ts +27 -0
  16. package/dist/composites/combobox-chip-outside.js +2 -0
  17. package/dist/composites/combobox-chip-outside.js.map +1 -0
  18. package/dist/composites/index.d.ts +10 -0
  19. package/dist/composites/index.js +2 -0
  20. package/dist/composites/index.js.map +1 -0
  21. package/dist/effects/index.js +1 -1
  22. package/dist/primitives/index.js +1 -1
  23. package/dist/primitives/tabs.js +1 -1
  24. package/dist/ui/badge.d.ts +20 -0
  25. package/dist/ui/badge.js +2 -0
  26. package/dist/ui/badge.js.map +1 -0
  27. package/dist/ui/button.js +1 -1
  28. package/dist/ui/combobox.d.ts +114 -0
  29. package/dist/ui/combobox.js +2 -0
  30. package/dist/ui/combobox.js.map +1 -0
  31. package/dist/ui/index.d.ts +8 -2
  32. package/dist/ui/index.js +1 -1
  33. package/dist/ui/infinite-scroll.d.ts +15 -0
  34. package/dist/ui/infinite-scroll.js +2 -0
  35. package/dist/ui/infinite-scroll.js.map +1 -0
  36. package/dist/ui/input.d.ts +17 -0
  37. package/dist/ui/input.js +2 -0
  38. package/dist/ui/input.js.map +1 -0
  39. package/dist/ui/tabs.js +1 -1
  40. package/package.json +12 -3
  41. package/dist/chunk-7K7NVV7D.js +0 -2
  42. package/dist/chunk-7K7NVV7D.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import'react';import {mergeProps}from'@base-ui/react/merge-props';import {useRender}from'@base-ui/react/use-render';import {cva}from'class-variance-authority';import {XIcon}from'lucide-react';import {cn}from'@xploreu/lib/cn';import {jsx}from'react/jsx-runtime';var m=cva("inline-flex items-center justify-center size-max whitespace-nowrap shrink-0 [&_svg]:size-3 [&>svg]:pointer-events-none overflow-hidden transition-colors ring-1 ring-inset",{variants:{type:{rounded:"rounded-xp-full",square:"rounded-xp-card-base-sm",modern:"rounded-xp-card-base-sm shadow-xp-xs"},color:{gray:"bg-utility-gray-50 text-utility-gray-700 ring-utility-gray-200",brand:"bg-utility-brand-50 text-utility-brand-700 ring-utility-brand-200",error:"bg-utility-error-50 text-utility-error-700 ring-utility-error-200",warning:"bg-utility-warning-50 text-utility-warning-700 ring-utility-warning-200",success:"bg-utility-success-50 text-utility-success-700 ring-utility-success-200","gray-blue":"bg-utility-gray-blue-50 text-utility-gray-blue-700 ring-utility-gray-blue-200","blue-light":"bg-utility-blue-light-50 text-utility-blue-light-700 ring-utility-blue-light-200",blue:"bg-utility-blue-50 text-utility-blue-700 ring-utility-blue-200",indigo:"bg-utility-indigo-50 text-utility-indigo-700 ring-utility-indigo-200",purple:"bg-utility-purple-50 text-utility-purple-700 ring-utility-purple-200",pink:"bg-utility-pink-50 text-utility-pink-700 ring-utility-pink-200",orange:"bg-utility-orange-50 text-utility-orange-700 ring-utility-orange-200"},size:{sm:"text-body-medium-3 py-0.5 has-[[data-slot=badge-close][data-align=inline-end]]:pr-0.75 has-[[data-slot=badge-close][data-align=inline-start]]:pl-0.75",md:"text-body-medium-2 py-0.5 has-[[data-slot=badge-close][data-align=inline-end]]:pr-xp-xs has-[[data-slot=badge-close][data-align=inline-start]]:pl-xp-xs",lg:"text-body-medium-2 py-1 has-[[data-slot=badge-close][data-align=inline-end]]:pr-xp-sm has-[[data-slot=badge-close][data-align=inline-start]]:pl-xp-sm"},icon:{true:void 0,false:void 0}},compoundVariants:[{type:"modern",className:"bg-primary text-secondary ring-primary"},{type:"rounded",size:"sm",className:"px-2"},{type:"rounded",size:"md",className:"px-2.5"},{type:"rounded",size:"lg",className:"px-3"},{type:"square",size:"sm",className:"px-1.5"},{type:"square",size:"md",className:"px-2"},{type:"square",size:"lg",className:"px-2.5"},{type:"modern",size:"sm",className:"px-1.5"},{type:"modern",size:"md",className:"px-2"},{type:"modern",size:"lg",className:"px-2.5"}],defaultVariants:{type:"square",color:"gray",size:"md"}});function z({className:e,type:t,color:i,size:a,icon:n,render:u,...p}){let d={className:cn(m({type:t,color:i,size:a,icon:n}),e)};return useRender({defaultTagName:"span",props:mergeProps(d,p),render:u,state:{slot:"badge",type:t,color:i,size:a,icon:n}})}function P({className:e,render:t,align:i="inline-end",...a}){let n={className:cn("p-0.5",i==="inline-start"?"mr-xp-xxs":"ml-xp-xxs",e),type:"button",children:jsx(XIcon,{})};return useRender({defaultTagName:"button",render:t,props:mergeProps(n,a),state:{slot:"badge-close",align:i}})}function w({className:e,...t}){return jsx("span",{className:cn("size-1.5 m-px shrink-0 rounded-xp-full bg-current",e),...t})}export{m as a,z as b,P as c,w as d};//# sourceMappingURL=chunk-4YATKUEK.js.map
2
+ //# sourceMappingURL=chunk-4YATKUEK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/badge.tsx"],"names":["badgeVariants","cva","Badge","className","type","color","size","icon","render","props","defaultProps","cn","useRender","mergeProps","BadgeButton","align","jsx","XIcon","BadgeDot"],"mappings":"qQASA,IAAMA,EAAgBC,GAAAA,CACpB,4KAAA,CACA,CACE,QAAA,CAAU,CACR,IAAA,CAAM,CACJ,OAAA,CAAW,iBAAA,CACX,OAAU,yBAAA,CACV,MAAA,C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AAA,CAAAM,CACF,CACF,CAAC,CACH,CAEA,SAASG,CAAAA,CAAS,CAChB,SAAA,CAAAf,CAAAA,CACA,GAAGM,CACL,EAAiC,CAC/B,OACEO,GAAAA,CAAC,MAAA,CAAA,CACC,UAAWL,EAAAA,CAAG,mDAAA,CAAqDR,CAAS,CAAA,CAC3E,GAAGM,EACN,CAEJ","file":"chunk-4YATKUEK.js","sourcesContent":["import * as React from \"react\"\r\n\r\nimport { mergeProps } from \"@base-ui/react/merge-props\"\r\nimport { useRender } from \"@base-ui/react/use-render\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\nimport { XIcon } from \"lucide-react\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\n\r\nconst badgeVariants = cva(\r\n \"inline-flex items-center justify-center size-max whitespace-nowrap shrink-0 [&_svg]:size-3 [&>svg]:pointer-events-none overflow-hidden transition-colors ring-1 ring-inset\",\r\n {\r\n variants: {\r\n type: {\r\n \"rounded\": \"rounded-xp-full\",\r\n \"square\": \"rounded-xp-card-base-sm\",\r\n \"modern\": \"rounded-xp-card-base-sm shadow-xp-xs\",\r\n },\r\n color: {\r\n gray: \"bg-utility-gray-50 text-utility-gray-700 ring-utility-gray-200\",\r\n brand: \"bg-utility-brand-50 text-utility-brand-700 ring-utility-brand-200\",\r\n error: \"bg-utility-error-50 text-utility-error-700 ring-utility-error-200\",\r\n warning: \"bg-utility-warning-50 text-utility-warning-700 ring-utility-warning-200\",\r\n success: \"bg-utility-success-50 text-utility-success-700 ring-utility-success-200\",\r\n \"gray-blue\": \"bg-utility-gray-blue-50 text-utility-gray-blue-700 ring-utility-gray-blue-200\",\r\n \"blue-light\": \"bg-utility-blue-light-50 text-utility-blue-light-700 ring-utility-blue-light-200\",\r\n blue: \"bg-utility-blue-50 text-utility-blue-700 ring-utility-blue-200\",\r\n indigo: \"bg-utility-indigo-50 text-utility-indigo-700 ring-utility-indigo-200\",\r\n purple: \"bg-utility-purple-50 text-utility-purple-700 ring-utility-purple-200\",\r\n pink: \"bg-utility-pink-50 text-utility-pink-700 ring-utility-pink-200\",\r\n orange: \"bg-utility-orange-50 text-utility-orange-700 ring-utility-orange-200\",\r\n },\r\n size: {\r\n sm: \"text-body-medium-3 py-0.5 has-[[data-slot=badge-close][data-align=inline-end]]:pr-0.75 has-[[data-slot=badge-close][data-align=inline-start]]:pl-0.75\",\r\n md: \"text-body-medium-2 py-0.5 has-[[data-slot=badge-close][data-align=inline-end]]:pr-xp-xs has-[[data-slot=badge-close][data-align=inline-start]]:pl-xp-xs\",\r\n lg: \"text-body-medium-2 py-1 has-[[data-slot=badge-close][data-align=inline-end]]:pr-xp-sm has-[[data-slot=badge-close][data-align=inline-start]]:pl-xp-sm\",\r\n },\r\n icon: {\r\n true: undefined,\r\n false: undefined,\r\n },\r\n },\r\n compoundVariants: [\r\n {\r\n type: \"modern\",\r\n className: \"bg-primary text-secondary ring-primary\",\r\n },\r\n { type: \"rounded\", size: \"sm\", className: \"px-2\" },\r\n { type: \"rounded\", size: \"md\", className: \"px-2.5\" },\r\n { type: \"rounded\", size: \"lg\", className: \"px-3\" },\r\n { type: \"square\", size: \"sm\", className: \"px-1.5\" },\r\n { type: \"square\", size: \"md\", className: \"px-2\" },\r\n { type: \"square\", size: \"lg\", className: \"px-2.5\" },\r\n { type: \"modern\", size: \"sm\", className: \"px-1.5\" },\r\n { type: \"modern\", size: \"md\", className: \"px-2\" },\r\n { type: \"modern\", size: \"lg\", className: \"px-2.5\" },\r\n ],\r\n defaultVariants: {\r\n type: \"square\",\r\n color: \"gray\",\r\n size: \"md\",\r\n },\r\n }\r\n)\r\n\r\nexport interface BadgeProps\r\n extends Omit<React.ComponentProps<\"span\">, \"color\">,\r\n VariantProps<typeof badgeVariants> {\r\n}\r\n\r\nfunction Badge({\r\n className,\r\n type,\r\n color,\r\n size,\r\n icon,\r\n render,\r\n ...props\r\n}: BadgeProps & useRender.ComponentProps<\"span\">) {\r\n const defaultProps: useRender.ElementProps<\"span\"> = {\r\n className: cn(badgeVariants({ type, color, size, icon }), className),\r\n }\r\n\r\n return useRender({\r\n defaultTagName: \"span\",\r\n props: mergeProps<\"span\">(defaultProps, props),\r\n render,\r\n state: {\r\n slot: \"badge\",\r\n type,\r\n color,\r\n size,\r\n icon,\r\n },\r\n })\r\n}\r\n\r\nfunction BadgeButton({\r\n className,\r\n render,\r\n align = \"inline-end\",\r\n ...props\r\n}: useRender.ComponentProps<\"button\"> & {\r\n align?: \"inline-end\" | \"inline-start\"\r\n}) {\r\n const defaultProps: useRender.ElementProps<\"button\"> = {\r\n className: cn(\"p-0.5\", align === \"inline-start\" ? \"mr-xp-xxs\" : \"ml-xp-xxs\", className),\r\n type: \"button\",\r\n children: (\r\n <XIcon />\r\n ),\r\n }\r\n\r\n return useRender({\r\n defaultTagName: \"button\",\r\n render,\r\n props: mergeProps<\"button\">(defaultProps, props),\r\n state: {\r\n slot: \"badge-close\",\r\n align,\r\n }\r\n })\r\n}\r\n\r\nfunction BadgeDot({\r\n className,\r\n ...props\r\n}: React.ComponentProps<\"span\">) {\r\n return (\r\n <span\r\n className={cn(\"size-1.5 m-px shrink-0 rounded-xp-full bg-current\", className)}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nexport { Badge, BadgeButton, BadgeDot, badgeVariants }\r\n"]}
@@ -0,0 +1,2 @@
1
+ import {b as b$1,c}from'./chunk-4YATKUEK.js';import {a as a$1}from'./chunk-TED2PUK6.js';import {a,b}from'./chunk-XXHHZYH6.js';import {b as b$2,c as c$1}from'./chunk-KYD4ATTG.js';import*as H from'react';import {SearchIcon,XIcon,Loader2Icon,CheckCircle2Icon}from'lucide-react';import {Combobox}from'@base-ui/react/combobox';import {AnimatePresence,motion}from'motion/react';import {useControlledState}from'@xploreu/hooks/use-controlled-state';import {useDataState}from'@xploreu/hooks/use-data-state';import {getStrictContext}from'@xploreu/lib/get-strict-context';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {cn}from'@xploreu/lib/cn';var[ao,y]=getStrictContext("ComboboxContext"),[no,T]=getStrictContext("ComboboxActiveValueContext");function k(o){let[t,b]=useControlledState({value:o?.open,defaultValue:o?.defaultOpen,onChange:o?.onOpenChange}),[m,s]=useControlledState({value:o?.inputValue?.toString(),defaultValue:o?.defaultInputValue?.toString(),onChange:o?.onInputValueChange}),[C,n]=H.useState(null),x=(P,a)=>{if(a.reason==="input-clear")return a.cancel();s(P,a);},l=(P,a)=>{let c=a.trigger?.dataset;if(a.reason==="trigger-press"&&c?.slot==="combobox-clear-input"&&!P)return a.cancel();b(P,a);};return jsx(no,{value:{highlightedValue:C,setHighlightedValue:n},children:jsx(ao,{value:{open:t,setOpen:b,inputValue:m,setInputValue:s},children:jsx(Combobox.Root,{"data-slot":"combobox",...o,onInputValueChange:x,onOpenChange:l})})})}function A(o){return jsx(Combobox.Trigger,{"data-slot":"combobox-trigger",...o})}function M(o){return jsx(Combobox.Label,{"data-slot":"combobox-label",...o})}function B(o){return jsx(Combobox.InputGroup,{"data-slot":"combobox-input-group",...o})}function v(o){return jsx(Combobox.Input,{"data-slot":"combobox-input",...o})}function E(o){return jsx(Combobox.Icon,{"data-slot":"combobox-icon",...o})}function O(o){return jsx(Combobox.Clear,{"data-slot":"combobox-clear",...o})}function z(o){return jsx(Combobox.Value,{"data-slot":"combobox-value",...o})}function F(o){return jsx(Combobox.Chips,{"data-slot":"combobox-chips",...o})}function q(o){return jsx(Combobox.Chip,{"data-slot":"combobox-chip",...o})}function U(o){return jsx(Combobox.ChipRemove,{"data-slot":"combobox-chip-remove",...o})}function d(o){let{open:t}=y();return jsx(AnimatePresence,{children:t&&jsx(Combobox.Portal,{"data-slot":"combobox-portal",keepMounted:true,...o})})}function g(o){return jsx(Combobox.Positioner,{"data-slot":"combobox-positioner",...o})}function h({initialFocus:o,finalFocus:t,transition:b={type:"spring",stiffness:300,damping:25},...m}){return jsx(Combobox.Popup,{finalFocus:t,initialFocus:o,render:jsx(motion.div,{animate:{opacity:1,scale:1},"data-slot":"combobox-popup",exit:{opacity:0,scale:.5},initial:{opacity:0,scale:.5},transition:b,...m},"combobox-popup")})}function X(o){return jsx(Combobox.Backdrop,{"data-slot":"combobox-backdrop",...o})}function $(o){return jsx(Combobox.Status,{"data-slot":"combobox-status",...o})}function J(o){return jsx(Combobox.Empty,{"data-slot":"combobox-empty",...o})}function K(o){return jsx(Combobox.List,{"data-slot":"combobox-list",...o})}function Q({transition:o={type:"spring",stiffness:350,damping:35},...t}){let{highlightedValue:b}=T();return jsx(b$2,{click:false,controlledItems:true,"data-slot":"combobox-highlight",transition:o,value:b,...t})}function W(o){return jsx(c$1,{"data-slot":"combobox-highlight-item",...o})}function Y(o){return jsx(Combobox.Row,{"data-slot":"combobox-row",...o})}function Z(o){let{setHighlightedValue:t}=T(),[,b]=useDataState("highlighted",void 0,(m,s)=>{if(m===true){let C=s.current,n=C?.dataset.value||C?.id||null;n&&t(n);}});return jsx(Combobox.Item,{ref:b,"data-slot":"combobox-item",...o})}function _(o){return jsx(Combobox.ItemIndicator,{"data-slot":"combobox-item-indicator",...o})}function j(o){return jsx(Combobox.Separator,{"data-slot":"combobox-separator",...o})}function D(o){return jsx(Combobox.Group,{"data-slot":"combobox-group",...o})}function oo(o){return jsx(Combobox.GroupLabel,{"data-slot":"combobox-group-label",...o})}function to(o){return jsx(Combobox.Collection,{"data-slot":"combobox-collection",...o})}function eo(o){return jsx(Combobox.Arrow,{"data-slot":"combobox-arrow",...o})}function Eo(o){return jsx(k,{...o})}function Po(o){let{className:t,...b}=o;return jsx(A,{className:cn("group/combobox-trigger flex items-center gap-2",t),...b})}function Oo(o){let{className:t,...b}=o;return jsx(M,{className:cn("text-label-semibold-2 text-text-secondary",t),...b})}function zo(o){let{className:t,...b}=o;return jsx(B,{className:cn("flex w-full items-center gap-2",t),...b})}function Fo(o){let{className:t,...b}=o;return jsx(v,{className:cn(a(),t),...b})}function qo({className:o,displayValueKey:t={label:"label",value:"value"},placeholder:b$1="Search and Select Company",inputProps:m,...s}){let{inputValue:C,setInputValue:n}=y(),{className:x,startContent:l,...P}=m||{};return jsxs("div",{className:cn("flex flex-col gap-2",o),children:[jsx(v,{render:jsx(b,{className:cn("h-9 text-body-regular-3 pl-9 pr-7",x),endContent:jsx(Po,{nativeButton:false,render:jsx(XIcon,{className:"!size-5 !right-1.5 data-[hidden=true]:opacity-0 opacity-100 transition-opacity duration-300 cursor-pointer","data-hidden":!C,"data-slot":"combobox-clear-input",onClick:a=>{n("",{reason:"none",event:a.nativeEvent,cancel:()=>{},allowPropagation:()=>{},isCanceled:false,isPropagationAllowed:true,trigger:void 0});}})}),placeholder:b$1,startContent:l??jsx(SearchIcon,{className:"!size-4 !text-fg-tertiary-hover"}),...P}),...s}),jsx(uo,{onMouseDown:a=>a.preventBaseUIHandler(),children:jsx(lo,{children:a=>a?.map(c=>jsxs(co,{children:[c?.[t.label]||"",jsx(yo,{})]},c?.[t.value]||""))})})]})}function Uo(o){let{className:t,...b}=o;return jsx(E,{className:cn("text-text-secondary",t),...b})}function Xo(o){return jsx(O,{render:jsx(XIcon,{}),...o})}function lo(o){return jsx(z,{...o})}function uo({className:o,...t}){return jsx(F,{className:cn("flex flex-wrap gap-2",o),...t})}function co({className:o,...t}){return jsx(b$1,{className:cn("ring-2 ring-border-brand text-body-medium-3",o),color:"brand",render:jsx(q,{...t}),size:"lg"})}function yo({className:o,...t}){return jsx(c,{className:cn("text-fg-quaternary",o),render:jsx(U,{...t})})}function $o({className:o,align:t="center",sideOffset:b=4,initialFocus:m,finalFocus:s,style:C,children:n,...x}){return jsx(d,{children:jsx(g,{align:t,className:"z-50",positionMethod:"fixed",sideOffset:b,...x,children:jsx(h,{className:cn("bg-bg-primary text-text-primary w-72 rounded-md border p-4 shadow-md outline-hidden origin-(--transform-origin)",o),finalFocus:s,initialFocus:m,style:C,children:jsx(io,{children:n})})})})}function Jo({className:o,align:t="center",sideOffset:b=4,container:m,initialFocus:s,finalFocus:C,style:n,children:x,...l}){return jsx(d,{container:m,children:jsx(g,{align:t,className:"isolate z-200",sideOffset:b,...l,children:jsx(h,{className:cn("group/combobox-content bg-bg-primary text-text-primary max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-md border border-border-primary p-xp-xs shadow-md outline-hidden",o),finalFocus:C,initialFocus:s,style:n,children:jsx(io,{children:x})})})})}function Ko(o){return jsx(d,{...o})}function Qo(o){return jsx(g,{...o})}function Wo({className:o,...t}){return jsx(h,{className:cn("bg-bg-primary text-text-primary w-72 rounded-md border shadow-md outline-hidden origin-(--transform-origin)",o),...t})}function Yo(o){let{className:t,...b}=o;return jsx(X,{className:cn("bg-black/30",t),...b})}function Zo({className:o,status:t,...b}){let{inputValue:m}=y(),s=m?.toString().trim(),n=t==="empty"&&s?`No matches for "${s}".`:t==="empty"&&!s?"No results.":t==="pending"?jsxs(Fragment,{children:[jsx(Loader2Icon,{className:"animate-spin size-4"}),jsx("span",{children:"Searching..."})]}):null;return jsx($,{className:cn("px-2 py-2.5 text-body-regular-2 text-text-disabled flex items-center gap-2",!n&&"hidden",o),...b,children:n})}function _o({className:o,...t}){return jsx(J,{className:cn("px-3 py-2 text-body-regular-2 text-text-secondary",o),...t})}function jo({className:o,...t}){return jsx(K,{className:cn("max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] overflow-auto scrollbar-thin flex flex-col gap-xp-sm",o),...t})}function io(o){let{className:t,...b}=o;return jsx(Q,{className:cn("absolute inset-0 rounded-md bg-bg-primary-hover",t),...b})}function go(o){return jsx(W,{...o})}function Do(o){let{className:t,...b}=o;return jsx(Y,{className:cn("group/combobox-row",t),...b})}function ot({className:o,children:t,...b}){let{disabled:m}=b;return jsx(go,{activeClassName:"bg-bg-primary-hover",disabled:m,children:jsxs(Z,{className:cn("flex w-full cursor-default items-center gap-xp-md rounded-md px-xp-md py-2.5 text-body-medium-2 text-text-primary outline-none",o),...b,children:[t,jsx(ho,{children:jsx(CheckCircle2Icon,{className:"size-5 text-fg-brand-primary shrink-0"})})]})})}function ho(o){return jsx(_,{...o})}function tt(o){let{className:t,...b}=o;return jsx(j,{className:cn("my-1 h-px bg-border-primary",t),...b})}function et(o){let{className:t,...b}=o;return jsx(D,{className:cn("py-1",t),...b})}function bt(o){let{className:t,...b}=o;return jsx(oo,{className:cn("px-3 py-1 text-body-semibold-sm text-text-secondary",t),...b})}function rt(o){return jsx(to,{...o})}function it(o){let{className:t,...b}=o;return jsx(eo,{className:cn("fill-bg-primary",t),...b})}function pt({hasMore:o,threshold:t=.5,...b}){return jsx(a$1,{hasMore:o,threshold:t,...b,children:o&&jsxs("div",{className:"px-2 py-2.5 text-body-regular-2 text-text-disabled flex items-center gap-2",children:[jsx(Loader2Icon,{className:"animate-spin size-4"}),jsx("span",{children:"Loading more..."})]})})}export{ho as A,tt as B,et as C,bt as D,rt as E,it as F,pt as G,v as a,Eo as b,Po as c,Oo as d,zo as e,Fo as f,qo as g,Uo as h,Xo as i,lo as j,uo as k,co as l,yo as m,$o as n,Jo as o,Ko as p,Qo as q,Wo as r,Yo as s,Zo as t,_o as u,jo as v,io as w,go as x,Do as y,ot as z};//# sourceMappingURL=chunk-CN65BQBT.js.map
2
+ //# sourceMappingURL=chunk-CN65BQBT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/primitives/combobox.tsx","../src/ui/combobox.tsx"],"names":["ComboboxProvider","useCombobox","getStrictContext","ComboboxActiveValueProvider","useComboboxActiveValue","Combobox","props","open","setOpen","useControlledState","inputValue","setInputValue","highlightedValue","setHighlightedValue","handleInputValueChange","eventDetails","handleOpenChange","dataSet","jsx","ComboboxPrimitive","ComboboxTrigger","ComboboxLabel","ComboboxInputGroup","ComboboxInput","ComboboxIcon","ComboboxClear","ComboboxValue","ComboboxChips","ComboboxChip","ComboboxChipRemove","ComboboxPortal","AnimatePresence","ComboboxPositioner","ComboboxPopup","initialFocus","finalFocus","transition","motion","ComboboxBackdrop","ComboboxStatus","ComboboxEmpty","ComboboxList","ComboboxHighlight","Highlight","ComboboxHighlightItem","HighlightItem","ComboboxRow","ComboboxItem","highlightedRef","useDataState","value","ref","el","v","ComboboxItemIndicator","ComboboxSeparator","ComboboxGroup","ComboboxGroupLabel","ComboboxCollection","ComboboxArrow","className","rest","cn","inputVariants","ComboboxInputFilter","displayValueKey","placeholder","inputProps","inputClassName","startContent","restInputProps","jsxs","Input","XIcon","event","SearchIcon","e","item","Badge","BadgeButton","ComboboxPanel","align","sideOffset","style","children","ComboboxContent","container","status","trimmedInputValue","text","Fragment","Loader2Icon","disabled","CheckCircle2Icon","ComboboxInfiniteScroll","hasMore","threshold","InfiniteScroll"],"mappings":"ooBAiCA,GAAM,CAACA,EAAAA,CAAkBC,CAAW,CAAA,CAClCC,gBAAAA,CAA+C,iBAAiB,EAE5D,CAACC,EAAAA,CAA6BC,CAAsB,CAAA,CACxDF,gBAAAA,CAAiD,4BAA4B,EAI/E,SAASG,CAAAA,CAA8DC,EAAuC,CAC5G,GAAM,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAIC,kBAAAA,CAAmB,CACzC,KAAA,CAAOH,GAAO,IAAA,CACd,YAAA,CAAcA,CAAAA,EAAO,WAAA,CACrB,QAAA,CAAUA,CAAAA,EAAO,YACnB,CAAC,CAAA,CAEK,CAACI,CAAAA,CAAYC,CAAa,CAAA,CAAIF,mBAAmB,CACrD,KAAA,CAAOH,CAAAA,EAAO,UAAA,EAAY,QAAA,EAAS,CACnC,aAAcA,CAAAA,EAAO,iBAAA,EAAmB,QAAA,EAAS,CACjD,QAAA,CAAUA,CAAAA,EAAO,kBACnB,CAAC,CAAA,CAEK,CAACM,CAAAA,CAAkBC,CAAmB,CAAA,CAAU,WACpD,IACF,CAAA,CAEMC,CAAAA,CAA+E,CAACJ,CAAAA,CAAYK,CAAAA,GAAiB,CACjH,GAAIA,CAAAA,CAAa,SAAW,aAAA,CAAe,OAAOA,EAAa,MAAA,EAAO,CAEtEJ,CAAAA,CAAcD,CAAAA,CAAYK,CAAY,EACxC,EAEMC,CAAAA,CAAmE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CAAA,CAAI,SAAA,CAAU,4EAAA,CACb,UAAArD,GAAAA,CAACyE,WAAAA,CAAA,CAAY,SAAA,CAAU,qBAAA,CAAsB,CAAA,CAC7CzE,IAAC,MAAA,CAAA,CAAK,QAAA,CAAA,iBAAA,CAEN,CAAA,CAAA,CACF,CAAA,CAEJ,CAEJ","file":"chunk-CN65BQBT.js","sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\n\r\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\r\nimport {\r\n AnimatePresence,\r\n type HTMLMotionProps,\r\n motion\r\n} from \"motion/react\"\r\n\r\nimport {\r\n Highlight,\r\n HighlightItem,\r\n type HighlightItemProps,\r\n type HighlightProps,\r\n} from \"../effects/highlight\"\r\nimport { useControlledState } from \"@xploreu/hooks/use-controlled-state\"\r\nimport { useDataState } from \"@xploreu/hooks/use-data-state\"\r\nimport { getStrictContext } from \"@xploreu/lib/get-strict-context\"\r\n\r\ntype ComboboxContextType<Value, Multiple extends boolean | undefined = false> = {\r\n open: ComboboxProps<Value, Multiple>[\"open\"];\r\n setOpen: NonNullable<ComboboxProps<Value, Multiple>[\"onOpenChange\"]>;\r\n inputValue: ComboboxProps<Value, Multiple>[\"inputValue\"];\r\n setInputValue: NonNullable<ComboboxProps<Value, Multiple>[\"onInputValueChange\"]>;\r\n}\r\n\r\ntype ComboboxActiveValueContextType = {\r\n highlightedValue: string | null;\r\n setHighlightedValue: (value: string | null) => void;\r\n}\r\n\r\nconst [ComboboxProvider, useCombobox] =\r\n getStrictContext<ComboboxContextType<unknown>>(\"ComboboxContext\")\r\n\r\nconst [ComboboxActiveValueProvider, useComboboxActiveValue] =\r\n getStrictContext<ComboboxActiveValueContextType>(\"ComboboxActiveValueContext\")\r\n\r\ntype ComboboxProps<Value, Multiple extends boolean | undefined = false> = ComboboxPrimitive.Root.Props<Value, Multiple>\r\n\r\nfunction Combobox<Value, Multiple extends boolean | undefined = false>(props: ComboboxProps<Value, Multiple>) {\r\n const [open, setOpen] = useControlledState({\r\n value: props?.open,\r\n defaultValue: props?.defaultOpen,\r\n onChange: props?.onOpenChange,\r\n })\r\n\r\n const [inputValue, setInputValue] = useControlledState({\r\n value: props?.inputValue?.toString(),\r\n defaultValue: props?.defaultInputValue?.toString(),\r\n onChange: props?.onInputValueChange,\r\n })\r\n\r\n const [highlightedValue, setHighlightedValue] = React.useState<string | null>(\r\n null,\r\n )\r\n\r\n const handleInputValueChange: ComboboxProps<Value, Multiple>[\"onInputValueChange\"] = (inputValue, eventDetails) => {\r\n if (eventDetails.reason === \"input-clear\") return eventDetails.cancel()\r\n\r\n setInputValue(inputValue, eventDetails)\r\n }\r\n\r\n const handleOpenChange: ComboboxProps<Value, Multiple>[\"onOpenChange\"] = (open, eventDetails) => {\r\n const dataSet = (eventDetails.trigger as HTMLElement)?.dataset\r\n\r\n if (\r\n eventDetails.reason === \"trigger-press\"\r\n && dataSet?.slot === \"combobox-clear-input\"\r\n && !open\r\n ) return eventDetails.cancel()\r\n\r\n setOpen(open, eventDetails)\r\n }\r\n\r\n return (\r\n <ComboboxActiveValueProvider value={{ highlightedValue, setHighlightedValue }}>\r\n <ComboboxProvider value={{ open, setOpen, inputValue, setInputValue }}>\r\n <ComboboxPrimitive.Root\r\n data-slot=\"combobox\"\r\n {...props}\r\n onInputValueChange={handleInputValueChange}\r\n onOpenChange={handleOpenChange}\r\n />\r\n </ComboboxProvider>\r\n </ComboboxActiveValueProvider>\r\n )\r\n}\r\n\r\ntype ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props\r\n\r\nfunction ComboboxTrigger(props: ComboboxTriggerProps) {\r\n return <ComboboxPrimitive.Trigger\r\n data-slot=\"combobox-trigger\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxLabelProps = ComboboxPrimitive.Label.Props\r\n\r\nfunction ComboboxLabel(props: ComboboxLabelProps) {\r\n return <ComboboxPrimitive.Label\r\n data-slot=\"combobox-label\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxInputGroupProps = ComboboxPrimitive.InputGroup.Props\r\n\r\nfunction ComboboxInputGroup(props: ComboboxInputGroupProps) {\r\n return <ComboboxPrimitive.InputGroup\r\n data-slot=\"combobox-input-group\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxInputProps = ComboboxPrimitive.Input.Props\r\n\r\nfunction ComboboxInput(props: ComboboxInputProps) {\r\n return <ComboboxPrimitive.Input\r\n data-slot=\"combobox-input\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxIconProps = ComboboxPrimitive.Icon.Props\r\n\r\nfunction ComboboxIcon(props: ComboboxIconProps) {\r\n return <ComboboxPrimitive.Icon\r\n data-slot=\"combobox-icon\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxClearProps = ComboboxPrimitive.Clear.Props\r\n\r\nfunction ComboboxClear(props: ComboboxClearProps) {\r\n return <ComboboxPrimitive.Clear\r\n data-slot=\"combobox-clear\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxValueProps = ComboboxPrimitive.Value.Props\r\n\r\nfunction ComboboxValue(props: ComboboxValueProps) {\r\n return <ComboboxPrimitive.Value\r\n data-slot=\"combobox-value\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxChipsProps = ComboboxPrimitive.Chips.Props\r\n\r\nfunction ComboboxChips(props: ComboboxChipsProps) {\r\n return <ComboboxPrimitive.Chips\r\n data-slot=\"combobox-chips\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxChipProps = ComboboxPrimitive.Chip.Props\r\n\r\nfunction ComboboxChip(props: ComboboxChipProps) {\r\n return <ComboboxPrimitive.Chip\r\n data-slot=\"combobox-chip\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxChipRemoveProps = ComboboxPrimitive.ChipRemove.Props\r\n\r\nfunction ComboboxChipRemove(props: ComboboxChipRemoveProps) {\r\n return <ComboboxPrimitive.ChipRemove\r\n data-slot=\"combobox-chip-remove\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxPortalProps = Omit<\r\n ComboboxPrimitive.Portal.Props,\r\n \"keepMounted\"\r\n>\r\n\r\nfunction ComboboxPortal(props: ComboboxPortalProps) {\r\n const { open } = useCombobox()\r\n\r\n return (\r\n <AnimatePresence>\r\n {open && (\r\n <ComboboxPrimitive.Portal\r\n data-slot=\"combobox-portal\"\r\n keepMounted\r\n {...props}\r\n />\r\n )}\r\n </AnimatePresence>\r\n )\r\n}\r\n\r\ntype ComboboxPositionerProps = ComboboxPrimitive.Positioner.Props\r\n\r\nfunction ComboboxPositioner(props: ComboboxPositionerProps) {\r\n return (\r\n <ComboboxPrimitive.Positioner\r\n data-slot=\"combobox-positioner\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxPopupProps = Omit<\r\n ComboboxPrimitive.Popup.Props,\r\n \"render\"\r\n> &\r\n HTMLMotionProps<\"div\">\r\n\r\nfunction ComboboxPopup({\r\n initialFocus,\r\n finalFocus,\r\n transition = { type: \"spring\", stiffness: 300, damping: 25 },\r\n ...props\r\n}: ComboboxPopupProps) {\r\n return (\r\n <ComboboxPrimitive.Popup\r\n finalFocus={finalFocus}\r\n initialFocus={initialFocus}\r\n render={\r\n <motion.div\r\n key=\"combobox-popup\"\r\n animate={{ opacity: 1, scale: 1 }}\r\n data-slot=\"combobox-popup\"\r\n exit={{ opacity: 0, scale: 0.5 }}\r\n initial={{ opacity: 0, scale: 0.5 }}\r\n transition={transition}\r\n {...props}\r\n />\r\n }\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxBackdropProps = ComboboxPrimitive.Backdrop.Props\r\n\r\nfunction ComboboxBackdrop(props: ComboboxBackdropProps) {\r\n return <ComboboxPrimitive.Backdrop\r\n data-slot=\"combobox-backdrop\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxStatusProps = ComboboxPrimitive.Status.Props\r\n\r\nfunction ComboboxStatus(props: ComboboxStatusProps) {\r\n return <ComboboxPrimitive.Status\r\n data-slot=\"combobox-status\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxEmptyProps = ComboboxPrimitive.Empty.Props\r\n\r\nfunction ComboboxEmpty(props: ComboboxEmptyProps) {\r\n return <ComboboxPrimitive.Empty\r\n data-slot=\"combobox-empty\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxListProps = ComboboxPrimitive.List.Props\r\n\r\nfunction ComboboxList(props: ComboboxListProps) {\r\n return <ComboboxPrimitive.List\r\n data-slot=\"combobox-list\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxHighlightProps = Omit<\r\n HighlightProps,\r\n \"controlledItems\" | \"enabled\" | \"hover\"\r\n>\r\n\r\nfunction ComboboxHighlight({\r\n transition = { type: \"spring\", stiffness: 350, damping: 35 },\r\n ...props\r\n}: ComboboxHighlightProps) {\r\n const { highlightedValue } = useComboboxActiveValue()\r\n\r\n return (\r\n <Highlight\r\n click={false}\r\n controlledItems\r\n data-slot=\"combobox-highlight\"\r\n transition={transition}\r\n value={highlightedValue}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxHighlightItemProps = HighlightItemProps\r\n\r\nfunction ComboboxHighlightItem(props: ComboboxHighlightItemProps) {\r\n return (\r\n <HighlightItem\r\n data-slot=\"combobox-highlight-item\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxRowProps = ComboboxPrimitive.Row.Props\r\n\r\nfunction ComboboxRow(props: ComboboxRowProps) {\r\n return <ComboboxPrimitive.Row\r\n data-slot=\"combobox-row\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxItemProps = ComboboxPrimitive.Item.Props\r\n\r\nfunction ComboboxItem(props: ComboboxItemProps) {\r\n const { setHighlightedValue } = useComboboxActiveValue()\r\n const [, highlightedRef] = useDataState<HTMLDivElement>(\r\n \"highlighted\",\r\n undefined,\r\n (value, ref) => {\r\n if (value === true) {\r\n const el = ref.current\r\n const v = el?.dataset.value || el?.id || null\r\n if (v) setHighlightedValue(v)\r\n }\r\n },\r\n )\r\n\r\n return <ComboboxPrimitive.Item\r\n ref={highlightedRef}\r\n data-slot=\"combobox-item\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxItemIndicatorProps = ComboboxPrimitive.ItemIndicator.Props\r\n\r\nfunction ComboboxItemIndicator(props: ComboboxItemIndicatorProps) {\r\n return <ComboboxPrimitive.ItemIndicator\r\n data-slot=\"combobox-item-indicator\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxSeparatorProps = ComboboxPrimitive.Separator.Props\r\n\r\nfunction ComboboxSeparator(props: ComboboxSeparatorProps) {\r\n return <ComboboxPrimitive.Separator\r\n data-slot=\"combobox-separator\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxGroupProps = ComboboxPrimitive.Group.Props\r\n\r\nfunction ComboboxGroup(props: ComboboxGroupProps) {\r\n return <ComboboxPrimitive.Group\r\n data-slot=\"combobox-group\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxGroupLabelProps = ComboboxPrimitive.GroupLabel.Props\r\n\r\nfunction ComboboxGroupLabel(props: ComboboxGroupLabelProps) {\r\n return <ComboboxPrimitive.GroupLabel\r\n data-slot=\"combobox-group-label\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxCollectionProps = ComboboxPrimitive.Collection.Props\r\n\r\nfunction ComboboxCollection(props: ComboboxCollectionProps) {\r\n return <ComboboxPrimitive.Collection\r\n data-slot=\"combobox-collection\"\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxArrowProps = ComboboxPrimitive.Arrow.Props\r\n\r\nfunction ComboboxArrow(props: ComboboxArrowProps) {\r\n return <ComboboxPrimitive.Arrow\r\n data-slot=\"combobox-arrow\"\r\n {...props}\r\n />\r\n}\r\n\r\nexport {\r\n Combobox,\r\n type ComboboxActiveValueContextType,\r\n ComboboxArrow,\r\n type ComboboxArrowProps,\r\n ComboboxBackdrop,\r\n type ComboboxBackdropProps,\r\n ComboboxChip,\r\n type ComboboxChipProps,\r\n ComboboxChipRemove,\r\n type ComboboxChipRemoveProps,\r\n ComboboxChips,\r\n type ComboboxChipsProps,\r\n ComboboxClear,\r\n type ComboboxClearProps,\r\n ComboboxCollection,\r\n type ComboboxCollectionProps,\r\n type ComboboxContextType,\r\n ComboboxEmpty,\r\n type ComboboxEmptyProps,\r\n ComboboxGroup,\r\n ComboboxGroupLabel,\r\n type ComboboxGroupLabelProps,\r\n type ComboboxGroupProps,\r\n ComboboxHighlight,\r\n ComboboxHighlightItem,\r\n type ComboboxHighlightItemProps,\r\n type ComboboxHighlightProps,\r\n ComboboxIcon,\r\n type ComboboxIconProps,\r\n ComboboxInput,\r\n ComboboxInputGroup,\r\n type ComboboxInputGroupProps,\r\n type ComboboxInputProps,\r\n ComboboxItem,\r\n ComboboxItemIndicator,\r\n type ComboboxItemIndicatorProps,\r\n type ComboboxItemProps,\r\n ComboboxLabel,\r\n type ComboboxLabelProps,\r\n ComboboxList,\r\n type ComboboxListProps,\r\n ComboboxPopup,\r\n type ComboboxPopupProps,\r\n ComboboxPortal,\r\n type ComboboxPortalProps,\r\n ComboboxPositioner,\r\n type ComboboxPositionerProps,\r\n type ComboboxProps,\r\n ComboboxRow,\r\n type ComboboxRowProps,\r\n ComboboxSeparator,\r\n type ComboboxSeparatorProps,\r\n ComboboxStatus,\r\n type ComboboxStatusProps,\r\n ComboboxTrigger,\r\n type ComboboxTriggerProps,\r\n ComboboxValue,\r\n type ComboboxValueProps,\r\n useCombobox,\r\n useComboboxActiveValue,\r\n}","import * as React from \"react\"\r\n\r\nimport {\r\n CheckCircle2Icon,\r\n Loader2Icon,\r\n SearchIcon,\r\n XIcon\r\n} from \"lucide-react\"\r\n\r\nimport {\r\n Combobox as ComboboxPrimitive,\r\n ComboboxArrow as ComboboxArrowPrimitive,\r\n type ComboboxArrowProps as ComboboxArrowPrimitiveProps,\r\n ComboboxBackdrop as ComboboxBackdropPrimitive,\r\n type ComboboxBackdropProps as ComboboxBackdropPrimitiveProps,\r\n ComboboxChip as ComboboxChipPrimitive,\r\n type ComboboxChipProps as ComboboxChipPrimitiveProps,\r\n ComboboxChipRemove as ComboboxChipRemovePrimitive,\r\n type ComboboxChipRemoveProps as ComboboxChipRemovePrimitiveProps,\r\n ComboboxChips as ComboboxChipsPrimitive,\r\n type ComboboxChipsProps as ComboboxChipsPrimitiveProps,\r\n ComboboxClear as ComboboxClearPrimitive,\r\n type ComboboxClearProps as ComboboxClearPrimitiveProps,\r\n ComboboxCollection as ComboboxCollectionPrimitive,\r\n type ComboboxCollectionProps as ComboboxCollectionPrimitiveProps,\r\n ComboboxEmpty as ComboboxEmptyPrimitive,\r\n type ComboboxEmptyProps as ComboboxEmptyPrimitiveProps,\r\n ComboboxGroup as ComboboxGroupPrimitive,\r\n ComboboxGroupLabel as ComboboxGroupLabelPrimitive,\r\n type ComboboxGroupLabelProps as ComboboxGroupLabelPrimitiveProps,\r\n type ComboboxGroupProps as ComboboxGroupPrimitiveProps,\r\n ComboboxHighlight as ComboboxHighlightPrimitive,\r\n ComboboxHighlightItem as ComboboxHighlightItemPrimitive,\r\n type ComboboxHighlightItemProps as ComboboxHighlightItemPrimitiveProps,\r\n type ComboboxHighlightProps as ComboboxHighlightPrimitiveProps,\r\n ComboboxIcon as ComboboxIconPrimitive,\r\n type ComboboxIconProps as ComboboxIconPrimitiveProps,\r\n ComboboxInput as ComboboxInputPrimitive,\r\n ComboboxInputGroup as ComboboxInputGroupPrimitive,\r\n type ComboboxInputGroupProps as ComboboxInputGroupPrimitiveProps,\r\n type ComboboxInputProps as ComboboxInputPrimitiveProps,\r\n ComboboxItem as ComboboxItemPrimitive,\r\n ComboboxItemIndicator as ComboboxItemIndicatorPrimitive,\r\n type ComboboxItemIndicatorProps as ComboboxItemIndicatorPrimitiveProps,\r\n type ComboboxItemProps as ComboboxItemPrimitiveProps,\r\n ComboboxLabel as ComboboxLabelPrimitive,\r\n type ComboboxLabelProps as ComboboxLabelPrimitiveProps,\r\n ComboboxList as ComboboxListPrimitive,\r\n type ComboboxListProps as ComboboxListPrimitiveProps,\r\n ComboboxPopup as ComboboxPopupPrimitive,\r\n type ComboboxPopupProps as ComboboxPopupPrimitiveProps,\r\n ComboboxPortal as ComboboxPortalPrimitive,\r\n type ComboboxPortalProps as ComboboxPortalPrimitiveProps,\r\n ComboboxPositioner as ComboboxPositionerPrimitive,\r\n type ComboboxPositionerProps as ComboboxPositionerPrimitiveProps,\r\n type ComboboxProps as ComboboxPrimitiveProps,\r\n ComboboxRow as ComboboxRowPrimitive,\r\n type ComboboxRowProps as ComboboxRowPrimitiveProps,\r\n ComboboxSeparator as ComboboxSeparatorPrimitive,\r\n type ComboboxSeparatorProps as ComboboxSeparatorPrimitiveProps,\r\n ComboboxStatus as ComboboxStatusPrimitive,\r\n type ComboboxStatusProps as ComboboxStatusPrimitiveProps,\r\n ComboboxTrigger as ComboboxTriggerPrimitive,\r\n type ComboboxTriggerProps as ComboboxTriggerPrimitiveProps,\r\n ComboboxValue as ComboboxValuePrimitive,\r\n type ComboboxValueProps as ComboboxValuePrimitiveProps,\r\n useCombobox,\r\n} from \"../primitives/combobox\"\r\nimport { cn } from \"@xploreu/lib/cn\"\r\n\r\nimport { Badge, BadgeButton } from \"./badge\"\r\nimport { InfiniteScroll } from \"./infinite-scroll\"\r\nimport { Input, inputVariants } from \"./input\"\r\n\r\ntype ComboboxProps<Value, Multiple extends boolean | undefined = false> = ComboboxPrimitiveProps<Value, Multiple>\r\n\r\nfunction Combobox<Value, Multiple extends boolean | undefined = false>(props: ComboboxProps<Value, Multiple>) {\r\n return (\r\n <ComboboxPrimitive {...props} />\r\n )\r\n}\r\n\r\ntype ComboboxTriggerProps = ComboboxTriggerPrimitiveProps\r\n\r\nfunction ComboboxTrigger(props: ComboboxTriggerProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxTriggerPrimitive\r\n className={cn(\r\n \"group/combobox-trigger flex items-center gap-2\",\r\n className,\r\n )}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxLabelProps = ComboboxLabelPrimitiveProps\r\n\r\nfunction ComboboxLabel(props: ComboboxLabelProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxLabelPrimitive\r\n className={cn(\r\n \"text-label-semibold-2 text-text-secondary\",\r\n className,\r\n )}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxInputGroupProps = ComboboxInputGroupPrimitiveProps\r\n\r\nfunction ComboboxInputGroup(props: ComboboxInputGroupProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxInputGroupPrimitive\r\n className={cn(\r\n \"flex w-full items-center gap-2\",\r\n className,\r\n )}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxInputProps = ComboboxInputPrimitiveProps\r\n\r\nfunction ComboboxInput(props: ComboboxInputProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxInputPrimitive\r\n className={cn(inputVariants(), className)}\r\n {...rest}\r\n />\r\n}\r\n\r\nfunction ComboboxInputFilter({\r\n className,\r\n displayValueKey = { label: \"label\", value: \"value\" },\r\n placeholder = \"Search and Select Company\",\r\n inputProps,\r\n ...props\r\n}: ComboboxInputProps & {\r\n displayValueKey?: {\r\n label: string\r\n value: string\r\n }\r\n placeholder?: string\r\n inputProps?: React.ComponentProps<typeof Input>\r\n}) {\r\n const { inputValue, setInputValue } = useCombobox()\r\n const { className: inputClassName, startContent, ...restInputProps } = inputProps || {}\r\n\r\n return (\r\n <div className={cn(\"flex flex-col gap-2\", className)}>\r\n <ComboboxInputPrimitive\r\n render={\r\n <Input\r\n className={cn(\"h-9 text-body-regular-3 pl-9 pr-7\", inputClassName)}\r\n endContent={\r\n <ComboboxTrigger\r\n nativeButton={false}\r\n render={(\r\n <XIcon\r\n className=\"!size-5 !right-1.5 data-[hidden=true]:opacity-0 opacity-100 transition-opacity duration-300 cursor-pointer\"\r\n data-hidden={!inputValue}\r\n data-slot=\"combobox-clear-input\"\r\n onClick={(event) => {\r\n setInputValue(\"\", {\r\n reason: \"none\",\r\n event: event.nativeEvent,\r\n cancel: () => { },\r\n allowPropagation: () => { },\r\n isCanceled: false,\r\n isPropagationAllowed: true,\r\n trigger: undefined,\r\n })\r\n }}\r\n />\r\n )}\r\n />\r\n }\r\n placeholder={placeholder}\r\n startContent={startContent ?? <SearchIcon className=\"!size-4 !text-fg-tertiary-hover\" />}\r\n {...restInputProps}\r\n />\r\n }\r\n {...props}\r\n />\r\n <ComboboxChips onMouseDown={(e) => e.preventBaseUIHandler()}>\r\n <ComboboxValue>\r\n {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}\r\n {(value) => value?.map((item: any) => (\r\n <ComboboxChip key={item?.[displayValueKey.value] || \"\"}>\r\n {item?.[displayValueKey.label] || \"\"}\r\n <ComboboxChipRemove />\r\n </ComboboxChip>\r\n ))}\r\n </ComboboxValue>\r\n </ComboboxChips>\r\n </div>\r\n )\r\n}\r\n\r\ntype ComboboxIconProps = ComboboxIconPrimitiveProps\r\n\r\nfunction ComboboxIcon(props: ComboboxIconProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxIconPrimitive\r\n className={cn(\"text-text-secondary\", className)}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxClearProps = ComboboxClearPrimitiveProps\r\n\r\nfunction ComboboxClear(props: ComboboxClearProps) {\r\n\r\n return (\r\n <ComboboxClearPrimitive\r\n render={<XIcon />}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxValueProps = ComboboxValuePrimitiveProps\r\n\r\nfunction ComboboxValue(props: ComboboxValueProps) {\r\n return <ComboboxValuePrimitive {...props} />\r\n}\r\n\r\ntype ComboboxChipsProps = ComboboxChipsPrimitiveProps\r\n\r\nfunction ComboboxChips({\r\n className,\r\n ...props\r\n}: ComboboxChipsProps) {\r\n return <ComboboxChipsPrimitive\r\n className={cn(\"flex flex-wrap gap-2\", className)}\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxChipProps = ComboboxChipPrimitiveProps\r\n\r\nfunction ComboboxChip({\r\n className,\r\n ...props\r\n}: ComboboxChipProps) {\r\n return (\r\n <Badge\r\n className={cn(\"ring-2 ring-border-brand text-body-medium-3\", className)}\r\n color=\"brand\"\r\n render={(\r\n <ComboboxChipPrimitive\r\n {...props}\r\n />\r\n )}\r\n size=\"lg\"\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxChipRemoveProps = ComboboxChipRemovePrimitiveProps\r\n\r\nfunction ComboboxChipRemove({\r\n className,\r\n ...props\r\n}: ComboboxChipRemoveProps) {\r\n return (\r\n <BadgeButton\r\n className={cn(\"text-fg-quaternary\", className)}\r\n render={(\r\n <ComboboxChipRemovePrimitive\r\n {...props}\r\n />\r\n )}\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxPanelProps = ComboboxPositionerPrimitiveProps &\r\n ComboboxPopupPrimitiveProps\r\n\r\nfunction ComboboxPanel({\r\n className,\r\n align = \"center\",\r\n sideOffset = 4,\r\n initialFocus,\r\n finalFocus,\r\n style,\r\n children,\r\n ...props\r\n}: ComboboxPanelProps) {\r\n return (\r\n <ComboboxPortalPrimitive>\r\n <ComboboxPositionerPrimitive\r\n align={align}\r\n className=\"z-50\"\r\n positionMethod=\"fixed\"\r\n sideOffset={sideOffset}\r\n {...props}\r\n >\r\n <ComboboxPopupPrimitive\r\n className={cn(\r\n \"bg-bg-primary text-text-primary w-72 rounded-md border p-4 shadow-md outline-hidden origin-(--transform-origin)\",\r\n className,\r\n )}\r\n finalFocus={finalFocus}\r\n initialFocus={initialFocus}\r\n style={style}\r\n >\r\n <ComboboxHighlight>\r\n {children}\r\n </ComboboxHighlight>\r\n </ComboboxPopupPrimitive>\r\n </ComboboxPositionerPrimitive>\r\n </ComboboxPortalPrimitive>\r\n )\r\n}\r\n\r\ntype ComboboxContentProps = ComboboxPositionerPrimitiveProps &\r\n ComboboxPopupPrimitiveProps & {\r\n container?: React.ComponentProps<typeof ComboboxPortal>[\"container\"]\r\n }\r\n\r\nfunction ComboboxContent({\r\n className,\r\n align = \"center\",\r\n sideOffset = 4,\r\n container,\r\n initialFocus,\r\n finalFocus,\r\n style,\r\n children,\r\n ...props\r\n}: ComboboxContentProps) {\r\n return (\r\n <ComboboxPortalPrimitive container={container}>\r\n <ComboboxPositionerPrimitive\r\n align={align}\r\n className=\"isolate z-200\"\r\n sideOffset={sideOffset}\r\n {...props}\r\n >\r\n <ComboboxPopupPrimitive\r\n className={cn(\r\n \"group/combobox-content bg-bg-primary text-text-primary max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-md border border-border-primary p-xp-xs shadow-md outline-hidden\",\r\n className,\r\n )}\r\n finalFocus={finalFocus}\r\n initialFocus={initialFocus}\r\n style={style}\r\n >\r\n <ComboboxHighlight>\r\n {children}\r\n </ComboboxHighlight>\r\n </ComboboxPopupPrimitive>\r\n </ComboboxPositionerPrimitive>\r\n </ComboboxPortalPrimitive>\r\n )\r\n}\r\n\r\ntype ComboboxPortalProps = ComboboxPortalPrimitiveProps\r\n\r\nfunction ComboboxPortal(props: ComboboxPortalProps) {\r\n return <ComboboxPortalPrimitive {...props} />\r\n}\r\n\r\ntype ComboboxPositionerProps = ComboboxPositionerPrimitiveProps\r\n\r\nfunction ComboboxPositioner(props: ComboboxPositionerProps) {\r\n return <ComboboxPositionerPrimitive {...props} />\r\n}\r\n\r\ntype ComboboxPopupProps = ComboboxPopupPrimitiveProps\r\n\r\nfunction ComboboxPopup({ className, ...props }: ComboboxPopupProps) {\r\n return <ComboboxPopupPrimitive\r\n className={cn(\r\n \"bg-bg-primary text-text-primary w-72 rounded-md border shadow-md outline-hidden origin-(--transform-origin)\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxBackdropProps = ComboboxBackdropPrimitiveProps\r\n\r\nfunction ComboboxBackdrop(props: ComboboxBackdropProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxBackdropPrimitive\r\n className={cn(\"bg-black/30\", className)}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxStatusProps = ComboboxStatusPrimitiveProps\r\n\r\nfunction ComboboxStatus({\r\n className,\r\n status,\r\n ...props\r\n}: Omit<ComboboxStatusProps, \"children\"> & {\r\n status?: \"empty\" | \"pending\" | null\r\n}) {\r\n const { inputValue } = useCombobox()\r\n\r\n const trimmedInputValue = inputValue?.toString().trim()\r\n\r\n const getText = () => {\r\n if (status === \"empty\" && trimmedInputValue)\r\n return `No matches for \"${trimmedInputValue}\".`\r\n\r\n if (status === \"empty\" && !trimmedInputValue)\r\n return \"No results.\"\r\n\r\n if (status === \"pending\")\r\n return (\r\n <>\r\n <Loader2Icon className=\"animate-spin size-4\" />\r\n <span>\r\n Searching...\r\n </span>\r\n </>\r\n )\r\n\r\n return null\r\n }\r\n\r\n const text = getText()\r\n\r\n return (\r\n <ComboboxStatusPrimitive\r\n className={cn(\r\n \"px-2 py-2.5 text-body-regular-2 text-text-disabled flex items-center gap-2\",\r\n !text && \"hidden\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {text}\r\n </ComboboxStatusPrimitive>\r\n )\r\n}\r\n\r\ntype ComboboxLoadingProps = React.ComponentProps<\"div\">\r\n\r\ntype ComboboxEmptyProps = ComboboxEmptyPrimitiveProps\r\n\r\nfunction ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\r\n return <ComboboxEmptyPrimitive\r\n className={cn(\"px-3 py-2 text-body-regular-2 text-text-secondary\", className)}\r\n {...props}\r\n />\r\n}\r\n\r\ntype ComboboxListProps = ComboboxListPrimitiveProps\r\n\r\nfunction ComboboxList({\r\n className,\r\n ...props\r\n}: ComboboxListProps) {\r\n return (\r\n <ComboboxListPrimitive\r\n className={cn(\"max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] overflow-auto scrollbar-thin flex flex-col gap-xp-sm\", className)}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxHighlightProps = ComboboxHighlightPrimitiveProps\r\n\r\nfunction ComboboxHighlight(props: ComboboxHighlightProps) {\r\n const { className, ...rest } = props\r\n\r\n return (\r\n <ComboboxHighlightPrimitive\r\n className={cn(\"absolute inset-0 rounded-md bg-bg-primary-hover\", className)}\r\n {...rest}\r\n />\r\n )\r\n}\r\n\r\ntype ComboboxHighlightItemProps = ComboboxHighlightItemPrimitiveProps\r\n\r\nfunction ComboboxHighlightItem(props: ComboboxHighlightItemProps) {\r\n return <ComboboxHighlightItemPrimitive {...props} />\r\n}\r\n\r\ntype ComboboxRowProps = ComboboxRowPrimitiveProps\r\n\r\nfunction ComboboxRow(props: ComboboxRowProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxRowPrimitive\r\n className={cn(\"group/combobox-row\", className)}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxItemProps = ComboboxItemPrimitiveProps\r\n\r\nfunction ComboboxItem({\r\n className,\r\n children,\r\n ...props\r\n}: ComboboxItemProps) {\r\n const { disabled } = props\r\n\r\n return (\r\n <ComboboxHighlightItem\r\n activeClassName=\"bg-bg-primary-hover\"\r\n disabled={disabled}\r\n >\r\n <ComboboxItemPrimitive\r\n className={cn(\r\n \"flex w-full cursor-default items-center gap-xp-md rounded-md px-xp-md py-2.5 text-body-medium-2 text-text-primary outline-none\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ComboboxItemIndicator>\r\n <CheckCircle2Icon className=\"size-5 text-fg-brand-primary shrink-0\" />\r\n </ComboboxItemIndicator>\r\n </ComboboxItemPrimitive>\r\n </ComboboxHighlightItem>\r\n )\r\n}\r\n\r\ntype ComboboxItemIndicatorProps = ComboboxItemIndicatorPrimitiveProps\r\n\r\nfunction ComboboxItemIndicator(props: ComboboxItemIndicatorProps) {\r\n return (\r\n <ComboboxItemIndicatorPrimitive {...props} />\r\n )\r\n}\r\n\r\ntype ComboboxSeparatorProps = ComboboxSeparatorPrimitiveProps\r\n\r\nfunction ComboboxSeparator(props: ComboboxSeparatorProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxSeparatorPrimitive\r\n className={cn(\"my-1 h-px bg-border-primary\", className)}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxGroupProps = ComboboxGroupPrimitiveProps\r\n\r\nfunction ComboboxGroup(props: ComboboxGroupProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxGroupPrimitive\r\n className={cn(\"py-1\", className)}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxGroupLabelProps = ComboboxGroupLabelPrimitiveProps\r\n\r\nfunction ComboboxGroupLabel(props: ComboboxGroupLabelProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxGroupLabelPrimitive\r\n className={cn(\"px-3 py-1 text-body-semibold-sm text-text-secondary\", className)}\r\n {...rest}\r\n />\r\n}\r\n\r\ntype ComboboxCollectionProps = ComboboxCollectionPrimitiveProps\r\n\r\nfunction ComboboxCollection(props: ComboboxCollectionProps) {\r\n return <ComboboxCollectionPrimitive {...props} />\r\n}\r\n\r\ntype ComboboxArrowProps = ComboboxArrowPrimitiveProps\r\n\r\nfunction ComboboxArrow(props: ComboboxArrowProps) {\r\n const { className, ...rest } = props\r\n\r\n return <ComboboxArrowPrimitive\r\n className={cn(\"fill-bg-primary\", className)}\r\n {...rest}\r\n />\r\n}\r\n\r\nfunction ComboboxInfiniteScroll({\r\n hasMore,\r\n threshold = 0.5,\r\n ...props\r\n}: Omit<React.ComponentProps<typeof InfiniteScroll>, \"children\">) {\r\n return (\r\n <InfiniteScroll\r\n hasMore={hasMore}\r\n threshold={threshold}\r\n {...props}\r\n >\r\n {hasMore && (\r\n <div className=\"px-2 py-2.5 text-body-regular-2 text-text-disabled flex items-center gap-2\">\r\n <Loader2Icon className=\"animate-spin size-4\" />\r\n <span>\r\n Loading more...\r\n </span>\r\n </div>\r\n )}\r\n </InfiniteScroll>\r\n )\r\n}\r\n\r\nexport {\r\n Combobox,\r\n ComboboxArrow,\r\n type ComboboxArrowProps,\r\n ComboboxBackdrop,\r\n type ComboboxBackdropProps,\r\n ComboboxChip,\r\n type ComboboxChipProps,\r\n ComboboxChipRemove,\r\n type ComboboxChipRemoveProps,\r\n ComboboxChips,\r\n type ComboboxChipsProps,\r\n ComboboxClear,\r\n type ComboboxClearProps,\r\n ComboboxCollection,\r\n type ComboboxCollectionProps,\r\n ComboboxContent,\r\n type ComboboxContentProps,\r\n ComboboxEmpty,\r\n type ComboboxEmptyProps,\r\n ComboboxGroup,\r\n ComboboxGroupLabel,\r\n type ComboboxGroupLabelProps,\r\n type ComboboxGroupProps,\r\n ComboboxHighlight,\r\n ComboboxHighlightItem,\r\n type ComboboxHighlightItemProps,\r\n type ComboboxHighlightProps,\r\n ComboboxIcon,\r\n type ComboboxIconProps,\r\n ComboboxInfiniteScroll,\r\n ComboboxInput,\r\n ComboboxInputFilter,\r\n ComboboxInputGroup,\r\n type ComboboxInputGroupProps,\r\n type ComboboxInputProps,\r\n ComboboxItem,\r\n ComboboxItemIndicator,\r\n type ComboboxItemIndicatorProps,\r\n type ComboboxItemProps,\r\n ComboboxLabel,\r\n type ComboboxLabelProps,\r\n ComboboxList,\r\n type ComboboxListProps,\r\n type ComboboxLoadingProps,\r\n ComboboxPanel,\r\n type ComboboxPanelProps,\r\n ComboboxPopup,\r\n type ComboboxPopupProps,\r\n ComboboxPortal,\r\n type ComboboxPortalProps,\r\n ComboboxPositioner,\r\n type ComboboxPositionerProps,\r\n type ComboboxProps,\r\n ComboboxRow,\r\n type ComboboxRowProps,\r\n ComboboxSeparator,\r\n type ComboboxSeparatorProps,\r\n ComboboxStatus,\r\n type ComboboxStatusProps,\r\n ComboboxTrigger,\r\n type ComboboxTriggerProps,\r\n ComboboxValue,\r\n type ComboboxValueProps\r\n}"]}
@@ -0,0 +1,2 @@
1
+ import {b,a,c,k,j,l,m,o,t,v,z,G}from'./chunk-CN65BQBT.js';import {b as b$1}from'./chunk-XXHHZYH6.js';import'react';import'@xploreu/lib/cn';import {SearchIcon,XIcon}from'lucide-react';import {useControlledState}from'@xploreu/hooks/use-controlled-state';import {jsxs,jsx}from'react/jsx-runtime';function X({multiple:I=true,inputPlaceholder:P="Search...",container:y,items:l$1,infiniteScroll:S,isPending:N,...a$1}){let[w,i]=useControlledState({value:a$1?.inputValue?.toString(),defaultValue:a$1?.defaultInputValue?.toString(),onChange:a$1?.onInputValueChange}),[k$1,u]=useControlledState({value:a$1?.value??[],defaultValue:a$1?.defaultValue??[],onChange:a$1?.onValueChange});return jsxs(b,{...a$1,multiple:true,isItemEqualToValue:(o,t)=>o.value===t.value,onValueChange:(o,t)=>{u(I?o:[o[o.length-1]],t);},onInputValueChange:i,children:[jsxs("div",{className:"flex flex-col gap-2",children:[jsx(a,{render:jsx(b$1,{className:"h-9 text-body-regular-3 pl-9 pr-7",endContent:jsx(c,{nativeButton:false,render:jsx(XIcon,{className:"!size-5 !right-1.5 data-[hidden=true]:opacity-0 opacity-100 transition-opacity duration-300 cursor-pointer","data-hidden":!w,"data-slot":"combobox-clear-input",onClick:o=>{i("",{reason:"none",event:o.nativeEvent,cancel:()=>{},allowPropagation:()=>{},isCanceled:false,isPropagationAllowed:true,trigger:void 0});}})}),placeholder:P,startContent:jsx(SearchIcon,{className:"!size-4 !text-fg-tertiary-hover"})})}),jsx(k,{onMouseDown:o=>o.preventBaseUIHandler(),children:jsx(j,{children:o=>o?.map(t=>jsxs(l,{children:[t?.label||"",jsx(m,{})]},t?.value||""))})})]}),jsxs(o,{container:y,children:[jsx(t,{status:N||l$1===void 0?"pending":l$1?.length===0?"empty":null}),jsxs(v,{children:[l$1?.map(o=>jsx(z,{value:{label:o.label,value:o.value},children:jsx("div",{className:"flex items-center gap-2 w-full min-w-0",children:jsx("span",{className:"truncate",children:o.label})})},o.value)),jsx(G,{...S})]})]})]})}export{X as a};//# sourceMappingURL=chunk-G3PVJ4PR.js.map
2
+ //# sourceMappingURL=chunk-G3PVJ4PR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/composites/combobox-chip-outside.tsx"],"names":["ComboboxChipOutside","multiple","inputPlaceholder","container","items","infiniteScroll","isPending","props","inputValue","setInputValue","useControlledState","value","setValue","jsxs","Combobox","a","b","eventDetails","jsx","ComboboxInput","Input","ComboboxTrigger","XIcon","event","SearchIcon","ComboboxChips","e","ComboboxValue","item","ComboboxChip","ComboboxChipRemove","ComboboxContent","ComboboxStatus","ComboboxList","ComboboxItem","ComboboxInfiniteScroll"],"mappings":"qSAiCA,SAASA,CAAAA,CAAoE,CAC3E,QAAA,CAAAC,EAAW,IAAA,CACX,gBAAA,CAAAC,CAAAA,CAAmB,WAAA,CACnB,UAAAC,CAAAA,CACA,KAAA,CAAAC,GAAAA,CACA,cAAA,CAAAC,EACA,SAAA,CAAAC,CAAAA,CACA,GAAGC,GACL,CAAA,CAAoC,CAClC,GAAM,CAACC,EAAYC,CAAa,CAAA,CAAIC,kBAAAA,CAAmB,CACrD,KAAA,CAAOH,GAAAA,EAAO,UAAA,EAAY,QAAA,GAC1B,YAAA,CAAcA,GAAAA,EAAO,iBAAA,EAAmB,QAAA,EAAS,CACjD,QAAA,CAAUA,GAAAA,EAAO,kBACnB,CAAC,CAAA,CAEK,CAACI,GAAAA,CAAOC,CAAQ,EAAIF,kBAAAA,CAAmB,CAC3C,KAAA,CAAOH,GAAAA,EAAO,OAAS,EAAC,CACxB,YAAA,CAAcA,GAAAA,EAAO,YAAA,EAAgB,EAAC,CACtC,QAAA,CAAUA,KAAO,aACnB,CAAC,CAAA,CAWD,OACEM,IAAAA,CAACC,CAAAA,CAAA,CACE,GAAGP,IACJ,QAAA,CAAQ,IAAA,CACR,kBAAA,CAAoB,CAACQ,CAAAA,CAAGC,CAAAA,GAAMD,CAAAA,CAAE,KAAA,GAAUC,EAAE,KAAA,CAC5C,aAAA,CAdmE,CAACL,CAAAA,CAAOM,IAAiB,CAK5FL,CAAAA,CAHGX,CAAAA,CAGMU,CAAAA,CAFA,CAACA,CAAAA,CAAMA,CAAAA,CAAM,MAAA,CAAS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CACD,CAAA,CACH,CAAA,CACF,CAAA,CAAA,CACF,EACAf,IAAAA,CAACkB,CAAAA,CAAA,CAAgB,SAAA,CAAW5B,CAAAA,CAC1B,QAAA,CAAA,CAAAe,GAAAA,CAACc,CAAAA,CAAA,CACC,MAAA,CACE1B,CAAAA,EAAaF,GAAAA,GAAU,MAAA,CACnB,SAAA,CACAA,GAAAA,EAAO,MAAA,GAAW,CAAA,CAChB,QACA,IAAA,CAEV,CAAA,CACAS,IAAAA,CAACoB,CAAAA,CAAA,CACE,QAAA,CAAA,CAAA7B,GAAAA,EAAO,GAAA,CAAKwB,CAAAA,EACXV,IAACgB,CAAAA,CAAA,CAEC,KAAA,CAAO,CAAE,KAAA,CAAON,CAAAA,CAAK,KAAA,CAAO,KAAA,CAAOA,EAAK,KAAM,CAAA,CAE9C,QAAA,CAAAV,GAAAA,CAAC,OAAI,SAAA,CAAU,wCAAA,CACb,QAAA,CAAAA,GAAAA,CAAC,QAAK,SAAA,CAAU,UAAA,CACb,QAAA,CAAAU,CAAAA,CAAK,KAAA,CACR,CAAA,CACF,CAAA,CAAA,CAPKA,CAAAA,CAAK,KAQZ,CACD,CAAA,CACDV,GAAAA,CAACiB,CAAAA,CAAA,CAAwB,GAAG9B,CAAAA,CAAgB,CAAA,CAAA,CAC9C,CAAA,CAAA,CACF,GACF,CAEJ","file":"chunk-G3PVJ4PR.js","sourcesContent":["import * as React from \"react\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport { ComboboxInput as ComboboxInputPrimitive } from \"../primitives/combobox\"\r\nimport { Input } from \"../ui\"\r\nimport {\r\n Combobox,\r\n ComboboxChip,\r\n ComboboxChipRemove,\r\n ComboboxChips,\r\n ComboboxContent,\r\n ComboboxInfiniteScroll,\r\n ComboboxInputFilter,\r\n ComboboxItem,\r\n ComboboxList,\r\n ComboboxPortal,\r\n ComboboxStatus,\r\n ComboboxTrigger,\r\n ComboboxValue,\r\n type ComboboxProps\r\n} from \"../ui/combobox\"\r\nimport { SearchIcon, XIcon } from \"lucide-react\"\r\nimport { useControlledState } from \"@xploreu/hooks/use-controlled-state\"\r\n\r\ntype ComboboxChipOutsideProps<Value> = Omit<ComboboxProps<Value, true>, \"multiple\"> & {\r\n multiple?: boolean\r\n inputPlaceholder?: string\r\n container?: React.ComponentProps<typeof ComboboxPortal>[\"container\"]\r\n items: ({ label: string; value: string }[]) | undefined\r\n infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>\r\n isPending?: boolean\r\n}\r\n\r\nfunction ComboboxChipOutside<Value extends { label: string; value: string }>({\r\n multiple = true,\r\n inputPlaceholder = \"Search...\",\r\n container,\r\n items,\r\n infiniteScroll,\r\n isPending,\r\n ...props\r\n}: ComboboxChipOutsideProps<Value>) {\r\n const [inputValue, setInputValue] = useControlledState({\r\n value: props?.inputValue?.toString(),\r\n defaultValue: props?.defaultInputValue?.toString(),\r\n onChange: props?.onInputValueChange,\r\n })\r\n\r\n const [value, setValue] = useControlledState({\r\n value: props?.value ?? [],\r\n defaultValue: props?.defaultValue ?? [],\r\n onChange: props?.onValueChange,\r\n })\r\n\r\n const handleValueChange: ComboboxProps<Value, true>[\"onValueChange\"] = (value, eventDetails) => {\r\n // if multiple is false, we need to replace the value with the new value instead of adding to it\r\n if (!multiple) {\r\n setValue([value[value.length - 1]], eventDetails)\r\n } else {\r\n setValue(value, eventDetails)\r\n }\r\n }\r\n\r\n return (\r\n <Combobox\r\n {...props}\r\n multiple\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n onValueChange={handleValueChange}\r\n onInputValueChange={setInputValue}\r\n >\r\n <div className=\"flex flex-col gap-2\">\r\n <ComboboxInputPrimitive\r\n render={\r\n <Input\r\n className=\"h-9 text-body-regular-3 pl-9 pr-7\"\r\n endContent={\r\n <ComboboxTrigger\r\n nativeButton={false}\r\n render={(\r\n <XIcon\r\n className=\"!size-5 !right-1.5 data-[hidden=true]:opacity-0 opacity-100 transition-opacity duration-300 cursor-pointer\"\r\n data-hidden={!inputValue}\r\n data-slot=\"combobox-clear-input\"\r\n onClick={(event) => {\r\n setInputValue(\"\", {\r\n reason: \"none\",\r\n event: event.nativeEvent,\r\n cancel: () => { },\r\n allowPropagation: () => { },\r\n isCanceled: false,\r\n isPropagationAllowed: true,\r\n trigger: undefined,\r\n })\r\n }}\r\n />\r\n )}\r\n />\r\n }\r\n placeholder={inputPlaceholder}\r\n startContent={<SearchIcon className=\"!size-4 !text-fg-tertiary-hover\" />}\r\n />\r\n }\r\n />\r\n <ComboboxChips onMouseDown={(e) => e.preventBaseUIHandler()}>\r\n <ComboboxValue>\r\n {(value: Value[]) => value?.map((item) => (\r\n <ComboboxChip key={item?.value || \"\"}>\r\n {item?.label || \"\"}\r\n <ComboboxChipRemove />\r\n </ComboboxChip>\r\n ))}\r\n </ComboboxValue>\r\n </ComboboxChips>\r\n </div>\r\n <ComboboxContent container={container}>\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : items?.length === 0\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {items?.map((item) => (\r\n <ComboboxItem\r\n key={item.value}\r\n value={{ label: item.label, value: item.value }}\r\n >\r\n <div className=\"flex items-center gap-2 w-full min-w-0\">\r\n <span className=\"truncate\">\r\n {item.label}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n ))}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </ComboboxContent>\r\n </Combobox>\r\n )\r\n}\r\n\r\nexport { ComboboxChipOutside }"]}
@@ -0,0 +1,2 @@
1
+ import*as e from'react';import {jsx,Fragment}from'react/jsx-runtime';function h({isLoading:o=false,hasMore:s=false,next:a,threshold:t=1,root:c=null,rootMargin:i="0px",reverse:v,children:u}){let l=e.useRef(null),R=e.useCallback(n=>{let r=t;(t<0||t>1)&&(console.warn("threshold should be between 0 and 1. You are exceed the range. will use default value: 1"),r=1),!o&&(l.current&&l.current.disconnect(),n&&(l.current=new IntersectionObserver(b=>{b[0].isIntersecting&&s&&a?.();},{threshold:r,root:c,rootMargin:i}),l.current.observe(n)));},[s,o,a,t,c,i]),f=e.useMemo(()=>e.Children.toArray(u),[u]);return jsx(Fragment,{children:f.map((n,r)=>{if(!e.isValidElement(n))return process.env.NODE_ENV==="development"&&console.warn("You should use a valid element with InfiniteScroll"),n;let d=(v?r===0:r===f.length-1)?R:null;return e.cloneElement(n,{ref:d})})})}export{h as a};//# sourceMappingURL=chunk-TED2PUK6.js.map
2
+ //# sourceMappingURL=chunk-TED2PUK6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/infinite-scroll.tsx"],"names":["InfiniteScroll","isLoading","hasMore","next","threshold","root","rootMargin","reverse","children","observer","observerRef","element","safeThreshold","entries","flattenChildren","jsx","Fragment","child","index","ref"],"mappings":"qEAcA,SAASA,CAAAA,CAAe,CACtB,UAAAC,CAAAA,CAAY,KAAA,CACZ,OAAA,CAAAC,CAAAA,CAAU,MACV,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAY,EACZ,IAAA,CAAAC,CAAAA,CAAO,IAAA,CACP,UAAA,CAAAC,EAAa,KAAA,CACb,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CACF,CAAA,CAAwB,CACtB,IAAMC,CAAAA,CAAiB,CAAA,CAAA,MAAA,CAA6B,IAAI,CAAA,CAGlDC,CAAAA,CAAoB,CAAA,CAAA,WAAA,CACvBC,CAAAA,EAAgC,CAC/B,IAAIC,CAAAA,CAAgBR,CAAAA,CAAAA,CAChBA,CAAAA,CAAY,GAAKA,CAAAA,CAAY,CAAA,IAC/B,OAAA,CAAQ,IAAA,CACN,0FACF,CAAA,CACAQ,CAAAA,CAAgB,CAAA,CAAA,CAKd,CAAAX,IAEAQ,CAAAA,CAAS,OAAA,EAASA,CAAAA,CAAS,OAAA,CAAQ,YAAW,CAC7CE,CAAAA,GAGLF,CAAAA,CAAS,OAAA,CAAU,IAAI,oBAAA,CACpBI,CAAAA,EAAY,CACPA,CAAAA,CAAQ,CAAC,CAAA,CAAE,cAAA,EAAkBX,GAC/BC,CAAAA,KAEJ,EACA,CAAE,SAAA,CAAWS,CAAAA,CAAe,IAAA,CAAAP,EAAM,UAAA,CAAAC,CAAW,CAC/C,CAAA,CACAG,EAAS,OAAA,CAAQ,OAAA,CAAQE,CAAO,CAAA,CAAA,EAClC,EACA,CAACT,CAAAA,CAASD,CAAAA,CAAWE,CAAAA,CAAMC,EAAWC,CAAAA,CAAMC,CAAU,CACxD,CAAA,CAEMQ,EAAwB,CAAA,CAAA,OAAA,CAAQ,IAAY,CAAA,CAAA,QAAA,CAAS,OAAA,CAAQN,CAAQ,CAAA,CAAG,CAACA,CAAQ,CAAC,EAExF,OACEO,GAAAA,CAAAC,SAAA,CACG,QAAA,CAAAF,EAAgB,GAAA,CAAI,CAACG,CAAAA,CAAOC,CAAAA,GAAU,CAErC,GAAI,CAAO,CAAA,CAAA,cAAA,CAAeD,CAAK,EAC7B,OAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,GAAa,eAC3B,OAAA,CAAQ,IAAA,CAAK,oDAAoD,CAAA,CAE5DA,EAIT,IAAME,CAAAA,CAAAA,CADkBZ,CAAAA,CAAUW,CAAAA,GAAU,EAAIA,CAAAA,GAAUJ,CAAAA,CAAgB,MAAA,CAAS,CAAA,EACrDJ,EAAc,IAAA,CAE5C,OAAa,CAAA,CAAA,YAAA,CAAaO,CAAAA,CAAO,CAAE,GAAA,CAAAE,CAAI,CAAC,CAC1C,CAAC,EACH,CAEJ","file":"chunk-TED2PUK6.js","sourcesContent":["/* eslint-disable react-hooks/refs */\r\nimport * as React from \"react\"\r\n\r\ntype InfiniteScrollProps = {\r\n isLoading?: boolean;\r\n hasMore?: boolean;\r\n next?: () => unknown;\r\n threshold?: number;\r\n root?: Element | Document | null;\r\n rootMargin?: string;\r\n reverse?: boolean;\r\n children?: React.ReactNode;\r\n}\r\n\r\nfunction InfiniteScroll({\r\n isLoading = false,\r\n hasMore = false,\r\n next,\r\n threshold = 1,\r\n root = null,\r\n rootMargin = \"0px\",\r\n reverse,\r\n children,\r\n}: InfiniteScrollProps) {\r\n const observer = React.useRef<IntersectionObserver>(null)\r\n // This callback ref will be called when it is dispatched to an element or detached from an element,\r\n // or when the callback function changes.\r\n const observerRef = React.useCallback(\r\n (element: HTMLElement | null) => {\r\n let safeThreshold = threshold\r\n if (threshold < 0 || threshold > 1) {\r\n console.warn(\r\n \"threshold should be between 0 and 1. You are exceed the range. will use default value: 1\",\r\n )\r\n safeThreshold = 1\r\n }\r\n // When isLoading is true, this callback will do nothing.\r\n // It means that the next function will never be called.\r\n // It is safe because the intersection observer has disconnected the previous element.\r\n if (isLoading) return\r\n\r\n if (observer.current) observer.current.disconnect()\r\n if (!element) return\r\n\r\n // Create a new IntersectionObserver instance because hasMore or next may be changed.\r\n observer.current = new IntersectionObserver(\r\n (entries) => {\r\n if (entries[0].isIntersecting && hasMore) {\r\n next?.()\r\n }\r\n },\r\n { threshold: safeThreshold, root, rootMargin },\r\n )\r\n observer.current.observe(element)\r\n },\r\n [hasMore, isLoading, next, threshold, root, rootMargin],\r\n )\r\n\r\n const flattenChildren = React.useMemo(() => React.Children.toArray(children), [children])\r\n\r\n return (\r\n <>\r\n {flattenChildren.map((child, index) => {\r\n\r\n if (!React.isValidElement(child)) {\r\n if (process.env.NODE_ENV === \"development\") {\r\n console.warn(\"You should use a valid element with InfiniteScroll\")\r\n }\r\n return child\r\n }\r\n\r\n const isObserveTarget = reverse ? index === 0 : index === flattenChildren.length - 1\r\n const ref = isObserveTarget ? observerRef : null\r\n // @ts-expect-error ignore ref type\r\n return React.cloneElement(child, { ref })\r\n })}\r\n </>\r\n )\r\n}\r\n\r\nexport { InfiniteScroll }\r\n"]}
@@ -0,0 +1,2 @@
1
+ import {cva}from'class-variance-authority';import {Loader2}from'lucide-react';import {Button}from'@base-ui/react/button';import {cn}from'@xploreu/lib/cn';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var m=cva(cn("group relative inline-flex h-max w-fit cursor-pointer items-center justify-center whitespace-nowrap outline-brand transition duration-100 ease-linear before:absolute focus-visible:outline-2 focus-visible:outline-offset-2 rounded-xp-buttons [&_svg]:shrink-0","disabled:cursor-not-allowed"),{variants:{color:{default:"focus-visible:outline-focus-ring",destructive:"focus-visible:outline-focus-ring-error","gradient-ai":"focus-visible:outline-focus-ring","linear-green":"focus-visible:outline-focus-ring-success","linear-overlay":"focus-visible:outline-focus-ring","linear-destructive":"focus-visible:outline-focus-ring-error"},variant:{primary:"before:rounded-lg before:absolute before:inset-0 before:border-1 before:border-white/12 before:mask-b-from-0% after:absolute after:inset-0 after:rounded-xp-buttons hover:after:bg-alpha-gray-20 after:bg-transparent after:transition-colors disabled:text-fg-disabled disabled:bg-none disabled:bg-bg-disabled disabled:hover:after:bg-transparent disabled:before:border-border-disabled disabled:before:mask-none disabled:before:border-1 shadow-xp-md hover:shadow-xp-brand ",secondary:"border-1 shadow-xp-md hover:shadow-xp-brand disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle disabled:border-border-disabled disabled:hover:text-fg-disabled disabled:hover:[&_svg]:text-fg-disabled-subtle","secondary-accent":"disabled:border-border-disabled disabled:bg-bg-disabled disabled:text-fg-disabled",tertiary:"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-bg-disabled","tertiary-accent":"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle",link:"underline decoration-transparent hover:decoration-inherit transition-colors disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle disabled:hover:no-underline"},icon:{true:void 0,false:void 0},size:{sm:"text-label-semibold-3 px-xp-lg gap-xp-sm h-9 data-[icon]:size-9 data-[variant=link]:h-5 data-[variant=link]:px-0 [&_svg]:size-5",md:"text-label-semibold-3 px-3.5 gap-xp-sm h-10 data-[icon]:size-10 data-[variant=link]:h-5 data-[variant=link]:px-0 [&_svg]:size-5",lg:"text-label-semibold-2 px-xp-xl gap-xp-md h-11 data-[icon]:size-11 data-[variant=link]:h-[22px] data-[variant=link]:px-0 [&_svg]:size-5",xl:"text-label-semibold-2 px-4.5 gap-xp-md h-12 data-[icon]:size-12 data-[variant=link]:h-[22px] data-[variant=link]:px-0 [&_svg]:size-5"}},compoundVariants:[{variant:"primary",color:"default",className:"bg-gradient-buttons-gradient-blue text-text-primary-on-brand"},{variant:"secondary",color:"default",className:"bg-bg-primary text-text-secondary [&_svg]:text-fg-secondary border-border-primary-icon hover:bg-bg-brand-solid hover:border-border-white hover:text-text-primary-on-brand hover:[&_svg]:text-fg-white"},{variant:"secondary-accent",color:"default",className:"border-1 border-border-primary-icon text-fg-primary hover:bg-bg-brand-primary"},{variant:"tertiary",color:"default",className:"text-text-tertiary [&_svg]:text-fg-quaternary hover:bg-bg-primary-hover hover:text-text-tertiary-hover hover:[&_svg]:text-fg-quaternary-hover"},{variant:"tertiary-accent",color:"default",className:"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"link",color:"default",className:"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"primary",color:"destructive",className:"bg-bg-error-solid text-text-primary-on-brand"},{variant:"secondary",color:"destructive",className:"bg-bg-primary text-text-error-primary [&_svg]:text-fg-error-secondary border-border-error hover:bg-bg-error-primary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-secondary"},{variant:"secondary-accent",color:"destructive",className:"border-1 border-border-error text-fg-error-primary hover:bg-bg-error-primary"},{variant:"tertiary",color:"destructive",className:"text-text-error-primary [&_svg]:text-fg-error-secondary hover:bg-bg-error-primary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary"},{variant:"tertiary-accent",color:"destructive",className:"bg-bg-error-primary text-text-error-tertiary [&_svg]:text-fg-error-secondary hover:bg-bg-error-secondary hover:text-text-error-tertiary hover:[&_svg]:text-fg-error-secondary-hover"},{variant:"link",color:"destructive",className:"text-text-error-secondary [&_svg]:text-fg-error-secondary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary"},{variant:"primary",color:"gradient-ai",className:"bg-gradient-buttons-button-ai text-text-primary-on-brand"},{variant:"secondary",color:"gradient-ai",className:"relative shadow-transparent border-transparent hover:bg-bg-primary bg-[linear-gradient(90deg,var(--color-bg-primary),var(--color-bg-primary)),var(--gradient-buttons-button-ai)] [background-clip:padding-box,border-box] [background-origin:padding-box,border-box] [&>span]:bg-gradient-buttons-button-ai [&>span]:bg-clip-text [&>span]:text-transparent after:absolute after:inset-0 after:rounded-md hover:after:bg-gradient-buttons-button-ai hover:after:opacity-10 disabled:hover:after:bg-transparent disabled:after:opacity-0 disabled:[&>span]:bg-none disabled:[&>span]:text-fg-disabled"},{variant:"secondary-accent",color:"gradient-ai",className:"border-1 border-border-brand text-fg-brand-primary hover:bg-bg-brand-primary"},{variant:"tertiary",color:"gradient-ai",className:"relative [&>span]:bg-gradient-buttons-button-ai [&>span]:bg-clip-text [&>span]:text-transparent after:absolute after:inset-0 after:rounded-md hover:after:bg-gradient-buttons-button-ai hover:after:opacity-10 disabled:hover:after:bg-transparent disabled:after:opacity-0 disabled:[&>span]:bg-none disabled:[&>span]:text-fg-disabled"},{variant:"tertiary-accent",color:"gradient-ai",className:"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"link",color:"gradient-ai",className:"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"primary",color:"linear-green",className:"bg-gradient-buttons-gradient-green text-text-primary-on-brand"},{variant:"secondary",color:"linear-green",className:"bg-bg-primary text-text-secondary [&_svg]:text-green-500 border-border-primary hover:text-text-secondary-hover hover:[&_svg]:text-green-900"},{variant:"secondary-accent",color:"linear-green",className:"border-1 border-border-primary text-fg-primary hover:bg-bg-primary"},{variant:"tertiary",color:"linear-green",className:"text-text-success-primary [&_svg]:text-green-500 hover:bg-bg-success-primary hover:[&_svg]:text-green-900"},{variant:"tertiary-accent",color:"linear-green",className:"bg-bg-success-primary text-text-success-tertiary [&_svg]:text-fg-success-secondary hover:bg-bg-success-secondary hover:text-text-success-tertiary hover:[&_svg]:text-fg-success-secondary-hover"},{variant:"link",color:"linear-green",className:"text-text-success-secondary [&_svg]:text-fg-success-secondary hover:text-text-success-primary-hover hover:[&_svg]:text-fg-success-primary"},{variant:"primary",color:"linear-overlay",className:"relative bg-bg-brand-solid text-text-primary-on-brand [&_svg]:text-button-primary-icon hover:[&_svg]:text-button-primary-icon-hover after:absolute after:inset-0 after:rounded-xp-buttons after:bg-gradient-skuemorphic-gradient-border after:hover:bg-gradient-skuemorphic-gradient-border"},{variant:"secondary",color:"linear-overlay",className:"bg-bg-brand-solid-hover text-text-secondary [&_svg]:text-fg-quaternary border-border-primary hover:bg-bg-primary-hover hover:text-text-secondary-hover hover:[&_svg]:text-text-quaternary-hover"},{variant:"secondary-accent",color:"linear-overlay",className:"border-1 border-border-brand text-fg-brand-primary hover:bg-bg-brand-primary"},{variant:"tertiary",color:"linear-overlay",className:"text-text-tertiary [&_svg]:text-fg-quaternary hover:bg-bg-primary-hover hover:text-text-tertiary-hover hover:[&_svg]:text-fg-quaternary-hover"},{variant:"tertiary-accent",color:"linear-overlay",className:"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"link",color:"linear-overlay",className:"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"primary",color:"linear-destructive",className:"relative bg-bg-error-solid text-text-primary-on-brand [&_svg]:text-button-destructive-primary-icon hover:[&_svg]:text-button-destructive-primary-icon-hover after:absolute after:inset-0 after:rounded-xp-buttons after:bg-gradient-skuemorphic-gradient-border after:hover:bg-gradient-skuemorphic-gradient-border"},{variant:"secondary",color:"linear-destructive",className:"bg-bg-error-solid-hover text-text-secondary [&_svg]:text-fg-quaternary border-border-primary hover:bg-bg-primary-hover hover:text-text-secondary-hover hover:[&_svg]:text-text-quaternary-hover"},{variant:"secondary-accent",color:"linear-destructive",className:"border-1 border-border-error text-fg-error-primary hover:bg-bg-error-primary"},{variant:"tertiary",color:"linear-destructive",className:"text-text-error-primary [&_svg]:text-fg-error-secondary hover:bg-bg-error-primary hover:text-text-tertiary-hover hover:[&_svg]:text-fg-error-secondary"},{variant:"tertiary-accent",color:"linear-destructive",className:"bg-bg-error-primary text-text-error-tertiary [&_svg]:text-fg-error-secondary hover:bg-bg-error-secondary hover:text-text-error-tertiary hover:[&_svg]:text-fg-error-secondary-hover"},{variant:"link",color:"linear-destructive",className:"text-text-error-primary [&_svg]:text-fg-error-secondary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary"}],defaultVariants:{variant:"primary",color:"default",size:"sm"}});function w({className:s,color:i,variant:e,size:n,loading:t=false,children:d,disabled:b,icon:g,nativeButton:l,render:a,...v}){let c=a!=null?false:l;return jsx(Button,{className:cn(m({color:i,variant:e,size:n,className:s})),"data-icon":g?"":void 0,"data-variant":e,disabled:b||t,nativeButton:c,render:a,...v,children:t?jsxs(Fragment,{children:[jsx(Loader2,{className:"size-4 animate-spin"}),jsx("span",{children:"Loading..."})]}):d})}export{m as a,w as b};//# sourceMappingURL=chunk-XRBBTMGF.js.map
2
+ //# sourceMappingURL=chunk-XRBBTMGF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/button.tsx"],"names":["buttonVariants","cva","cn","Button","className","color","variant","size","loading","children","disabled","icon","nativeButton","render","props","resolvedNativeButton","jsx","ButtonPrimitive","jsxs","Fragment","Loader2"],"mappings":"4MAMA,IAAMA,CAAAA,CAAiBC,GAAAA,CACrBC,EAAAA,CACE,kQAAA,CACA,6BACF,CAAA,CACA,CACE,QAAA,CAAU,CACR,KAAA,CAAO,CACL,OAAA,CAAS,kCAAA,CACT,WAAA,CAAa,wCAAA,CACb,aAAA,CAAe,kCAAA,CACf,cAAA,CAAgB,0CAAA,CAChB,iBAAkB,kCAAA,CAClB,oBAAA,CAAsB,wCACxB,CAAA,CACA,OAAA,CAAS,CACP,OAAA,CAAS,odAAA,CACT,SAAA,CAAW,uPAAA,CACX,kBAAA,CAAoB,mFAAA,CACpB,QAAA,CAAU,qFAAA,CACV,kBAAmB,4FAAA,CACnB,IAAA,CAAM,oMACR,CAAA,CACA,IAAA,CAAM,CACJ,KAAM,MAAA,CACN,KAAA,CAAO,MACT,CAAA,CACA,IAAA,CAAM,CACJ,GAAI,iIAAA,CACJ,EAAA,CAAI,iIAAA,CACJ,EAAA,CAAI,wIAAA,CACJ,EAAA,CAAI,sIACN,CACF,CAAA,CACA,gBAAA,CAAkB,CAEhB,CACE,OAAA,CAAS,SAAA,CACT,MAAO,SAAA,CACP,SAAA,CAAW,8DACb,CAAA,CACA,CACE,OAAA,CAAS,WAAA,CACT,KAAA,CAAO,SAAA,CACP,SAAA,CAAW,uMACb,CAAA,CACA,CACE,OAAA,CAAS,mBACT,KAAA,CAAO,SAAA,CACP,SAAA,CAAW,+EACb,CAAA,CACA,CACE,OAAA,CAAS,UAAA,CACT,KAAA,CAAO,SAAA,CACP,SAAA,CAAW,+IACb,CAAA,CACA,CACE,QAAS,iBAAA,CACT,KAAA,CAAO,SAAA,CACP,SAAA,CAAW,qLACb,CAAA,CACA,CACE,OAAA,CAAS,MAAA,CACT,KAAA,CAAO,SAAA,CACP,SAAA,CAAW,iJACb,EAGA,CACE,OAAA,CAAS,SAAA,CACT,KAAA,CAAO,aAAA,CACP,SAAA,CAA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CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,MACV,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAGK,CAEH,IAAMC,CAAAA,CAAuBF,CAAAA,EAAU,IAAA,CAAO,KAAA,CAAQD,CAAAA,CAEtD,OACEI,GAAAA,CAACC,MAAAA,CAAA,CACC,SAAA,CAAWf,EAAAA,CAAGF,CAAAA,CAAe,CAAE,KAAA,CAAAK,EAAO,OAAA,CAAAC,CAAAA,CAAS,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAH,CAAU,CAAC,CAAC,CAAA,CACjE,WAAA,CAAWO,CAAAA,CAAO,EAAA,CAAK,MAAA,CACvB,cAAA,CAAcL,EACd,QAAA,CAAUI,CAAAA,EAAYF,CAAAA,CACtB,YAAA,CAAcO,CAAAA,CACd,MAAA,CAAQF,CAAAA,CACP,GAAGC,CAAAA,CAEH,QAAA,CAAAN,CAAAA,CACCU,IAAAA,CAAAC,QAAAA,CAAA,CACE,UAAAH,GAAAA,CAACI,OAAAA,CAAA,CAAQ,SAAA,CAAU,qBAAA,CAAsB,CAAA,CACzCJ,GAAAA,CAAC,MAAA,CAAA,CAAK,QAAA,CAAA,YAAA,CAAU,CAAA,CAAA,CAClB,CAAA,CAEAP,CAAAA,CAEJ,CAEJ","file":"chunk-XRBBTMGF.js","sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\"\nimport { Loader2 } from \"lucide-react\"\n\nimport { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cn } from \"@xploreu/lib/cn\"\n\nconst buttonVariants = cva(\n cn(\n \"group relative inline-flex h-max w-fit cursor-pointer items-center justify-center whitespace-nowrap outline-brand transition duration-100 ease-linear before:absolute focus-visible:outline-2 focus-visible:outline-offset-2 rounded-xp-buttons [&_svg]:shrink-0\",\n \"disabled:cursor-not-allowed\",\n ),\n {\n variants: {\n color: {\n default: \"focus-visible:outline-focus-ring\",\n destructive: \"focus-visible:outline-focus-ring-error\",\n \"gradient-ai\": \"focus-visible:outline-focus-ring\",\n \"linear-green\": \"focus-visible:outline-focus-ring-success\",\n \"linear-overlay\": \"focus-visible:outline-focus-ring\",\n \"linear-destructive\": \"focus-visible:outline-focus-ring-error\",\n },\n variant: {\n primary: \"before:rounded-lg before:absolute before:inset-0 before:border-1 before:border-white/12 before:mask-b-from-0% after:absolute after:inset-0 after:rounded-xp-buttons hover:after:bg-alpha-gray-20 after:bg-transparent after:transition-colors disabled:text-fg-disabled disabled:bg-none disabled:bg-bg-disabled disabled:hover:after:bg-transparent disabled:before:border-border-disabled disabled:before:mask-none disabled:before:border-1 shadow-xp-md hover:shadow-xp-brand \",\n secondary: \"border-1 shadow-xp-md hover:shadow-xp-brand disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle disabled:border-border-disabled disabled:hover:text-fg-disabled disabled:hover:[&_svg]:text-fg-disabled-subtle\",\n \"secondary-accent\": \"disabled:border-border-disabled disabled:bg-bg-disabled disabled:text-fg-disabled\",\n tertiary: \"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-bg-disabled\",\n \"tertiary-accent\": \"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle\",\n link: \"underline decoration-transparent hover:decoration-inherit transition-colors disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle disabled:hover:no-underline\",\n },\n icon: {\n true: undefined,\n false: undefined\n },\n size: {\n sm: \"text-label-semibold-3 px-xp-lg gap-xp-sm h-9 data-[icon]:size-9 data-[variant=link]:h-5 data-[variant=link]:px-0 [&_svg]:size-5\",\n md: \"text-label-semibold-3 px-3.5 gap-xp-sm h-10 data-[icon]:size-10 data-[variant=link]:h-5 data-[variant=link]:px-0 [&_svg]:size-5\",\n lg: \"text-label-semibold-2 px-xp-xl gap-xp-md h-11 data-[icon]:size-11 data-[variant=link]:h-[22px] data-[variant=link]:px-0 [&_svg]:size-5\",\n xl: \"text-label-semibold-2 px-4.5 gap-xp-md h-12 data-[icon]:size-12 data-[variant=link]:h-[22px] data-[variant=link]:px-0 [&_svg]:size-5\",\n }\n },\n compoundVariants: [\n // Default Color Variants\n {\n variant: \"primary\",\n color: \"default\",\n className: \"bg-gradient-buttons-gradient-blue text-text-primary-on-brand\"\n },\n {\n variant: \"secondary\",\n color: \"default\",\n className: \"bg-bg-primary text-text-secondary [&_svg]:text-fg-secondary border-border-primary-icon hover:bg-bg-brand-solid hover:border-border-white hover:text-text-primary-on-brand hover:[&_svg]:text-fg-white\"\n },\n {\n variant: \"secondary-accent\",\n color: \"default\",\n className: \"border-1 border-border-primary-icon text-fg-primary hover:bg-bg-brand-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"default\",\n className: \"text-text-tertiary [&_svg]:text-fg-quaternary hover:bg-bg-primary-hover hover:text-text-tertiary-hover hover:[&_svg]:text-fg-quaternary-hover\"\n },\n {\n variant: \"tertiary-accent\",\n color: \"default\",\n className: \"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n {\n variant: \"link\",\n color: \"default\",\n className: \"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n\n // Destructive Color Variants\n {\n variant: \"primary\",\n color: \"destructive\",\n className: \"bg-bg-error-solid text-text-primary-on-brand\"\n },\n {\n variant: \"secondary\",\n color: \"destructive\",\n className: \"bg-bg-primary text-text-error-primary [&_svg]:text-fg-error-secondary border-border-error hover:bg-bg-error-primary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-secondary\"\n },\n {\n // Not existing in design system yet\n variant: \"secondary-accent\",\n color: \"destructive\",\n className: \"border-1 border-border-error text-fg-error-primary hover:bg-bg-error-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"destructive\",\n className: \"text-text-error-primary [&_svg]:text-fg-error-secondary hover:bg-bg-error-primary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary\"\n },\n {\n // Not existing in design system yet\n variant: \"tertiary-accent\",\n color: \"destructive\",\n className: \"bg-bg-error-primary text-text-error-tertiary [&_svg]:text-fg-error-secondary hover:bg-bg-error-secondary hover:text-text-error-tertiary hover:[&_svg]:text-fg-error-secondary-hover\"\n },\n {\n variant: \"link\",\n color: \"destructive\",\n className: \"text-text-error-secondary [&_svg]:text-fg-error-secondary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary\"\n },\n\n // Gradient AI\n {\n variant: \"primary\",\n color: \"gradient-ai\",\n className: \"bg-gradient-buttons-button-ai text-text-primary-on-brand\"\n },\n {\n variant: \"secondary\",\n color: \"gradient-ai\",\n className: \"relative shadow-transparent border-transparent hover:bg-bg-primary bg-[linear-gradient(90deg,var(--color-bg-primary),var(--color-bg-primary)),var(--gradient-buttons-button-ai)] [background-clip:padding-box,border-box] [background-origin:padding-box,border-box] [&>span]:bg-gradient-buttons-button-ai [&>span]:bg-clip-text [&>span]:text-transparent after:absolute after:inset-0 after:rounded-md hover:after:bg-gradient-buttons-button-ai hover:after:opacity-10 disabled:hover:after:bg-transparent disabled:after:opacity-0 disabled:[&>span]:bg-none disabled:[&>span]:text-fg-disabled\"\n },\n {\n // Not existing in design system yet\n variant: \"secondary-accent\",\n color: \"gradient-ai\",\n className: \"border-1 border-border-brand text-fg-brand-primary hover:bg-bg-brand-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"gradient-ai\",\n className: \"relative [&>span]:bg-gradient-buttons-button-ai [&>span]:bg-clip-text [&>span]:text-transparent after:absolute after:inset-0 after:rounded-md hover:after:bg-gradient-buttons-button-ai hover:after:opacity-10 disabled:hover:after:bg-transparent disabled:after:opacity-0 disabled:[&>span]:bg-none disabled:[&>span]:text-fg-disabled\"\n },\n {\n // Not existing in design system yet\n variant: \"tertiary-accent\",\n color: \"gradient-ai\",\n className: \"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n {\n // Not existing in design system yet\n variant: \"link\",\n color: \"gradient-ai\",\n className: \"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n\n // Linear Green Color Variants\n {\n variant: \"primary\",\n color: \"linear-green\",\n className: \"bg-gradient-buttons-gradient-green text-text-primary-on-brand\"\n },\n {\n variant: \"secondary\",\n color: \"linear-green\",\n className: \"bg-bg-primary text-text-secondary [&_svg]:text-green-500 border-border-primary hover:text-text-secondary-hover hover:[&_svg]:text-green-900\"\n },\n {\n // Not existing in design system yet\n variant: \"secondary-accent\",\n color: \"linear-green\",\n className: \"border-1 border-border-primary text-fg-primary hover:bg-bg-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"linear-green\",\n className: \"text-text-success-primary [&_svg]:text-green-500 hover:bg-bg-success-primary hover:[&_svg]:text-green-900\"\n },\n {\n // Not existing in design system yet\n variant: \"tertiary-accent\",\n color: \"linear-green\",\n className: \"bg-bg-success-primary text-text-success-tertiary [&_svg]:text-fg-success-secondary hover:bg-bg-success-secondary hover:text-text-success-tertiary hover:[&_svg]:text-fg-success-secondary-hover\"\n },\n {\n // Not existing in design system yet\n variant: \"link\",\n color: \"linear-green\",\n className: \"text-text-success-secondary [&_svg]:text-fg-success-secondary hover:text-text-success-primary-hover hover:[&_svg]:text-fg-success-primary\"\n },\n\n // Linear Overlay Color Variants\n {\n variant: \"primary\",\n color: \"linear-overlay\",\n className: \"relative bg-bg-brand-solid text-text-primary-on-brand [&_svg]:text-button-primary-icon hover:[&_svg]:text-button-primary-icon-hover after:absolute after:inset-0 after:rounded-xp-buttons after:bg-gradient-skuemorphic-gradient-border after:hover:bg-gradient-skuemorphic-gradient-border\"\n },\n {\n variant: \"secondary\",\n color: \"linear-overlay\",\n className: \"bg-bg-brand-solid-hover text-text-secondary [&_svg]:text-fg-quaternary border-border-primary hover:bg-bg-primary-hover hover:text-text-secondary-hover hover:[&_svg]:text-text-quaternary-hover\"\n },\n {\n variant: \"secondary-accent\",\n color: \"linear-overlay\",\n className: \"border-1 border-border-brand text-fg-brand-primary hover:bg-bg-brand-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"linear-overlay\",\n className: \"text-text-tertiary [&_svg]:text-fg-quaternary hover:bg-bg-primary-hover hover:text-text-tertiary-hover hover:[&_svg]:text-fg-quaternary-hover\"\n },\n {\n variant: \"tertiary-accent\",\n color: \"linear-overlay\",\n className: \"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n {\n variant: \"link\",\n color: \"linear-overlay\",\n className: \"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n\n // Linear Destructive Color Variants\n {\n variant: \"primary\",\n color: \"linear-destructive\",\n className: \"relative bg-bg-error-solid text-text-primary-on-brand [&_svg]:text-button-destructive-primary-icon hover:[&_svg]:text-button-destructive-primary-icon-hover after:absolute after:inset-0 after:rounded-xp-buttons after:bg-gradient-skuemorphic-gradient-border after:hover:bg-gradient-skuemorphic-gradient-border\"\n },\n {\n variant: \"secondary\",\n color: \"linear-destructive\",\n className: \"bg-bg-error-solid-hover text-text-secondary [&_svg]:text-fg-quaternary border-border-primary hover:bg-bg-primary-hover hover:text-text-secondary-hover hover:[&_svg]:text-text-quaternary-hover\"\n },\n {\n // Not existing in design system yet\n variant: \"secondary-accent\",\n color: \"linear-destructive\",\n className: \"border-1 border-border-error text-fg-error-primary hover:bg-bg-error-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"linear-destructive\",\n className: \"text-text-error-primary [&_svg]:text-fg-error-secondary hover:bg-bg-error-primary hover:text-text-tertiary-hover hover:[&_svg]:text-fg-error-secondary\"\n },\n {\n // Not existing in design system yet\n variant: \"tertiary-accent\",\n color: \"linear-destructive\",\n className: \"bg-bg-error-primary text-text-error-tertiary [&_svg]:text-fg-error-secondary hover:bg-bg-error-secondary hover:text-text-error-tertiary hover:[&_svg]:text-fg-error-secondary-hover\"\n },\n {\n variant: \"link\",\n color: \"linear-destructive\",\n className: \"text-text-error-primary [&_svg]:text-fg-error-secondary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary\"\n },\n ],\n defaultVariants: {\n variant: \"primary\",\n color: \"default\",\n size: \"sm\",\n },\n }\n)\n\nfunction Button({\n className,\n color,\n variant,\n size,\n loading = false,\n children,\n disabled,\n icon,\n nativeButton,\n render,\n ...props\n}: ButtonPrimitive.Props &\n VariantProps<typeof buttonVariants> & {\n loading?: boolean\n }) {\n // ponytail: auto-detect nativeButton when render is provided\n const resolvedNativeButton = render != null ? false : nativeButton\n\n return (\n <ButtonPrimitive\n className={cn(buttonVariants({ color, variant, size, className }))}\n data-icon={icon ? \"\" : undefined}\n data-variant={variant}\n disabled={disabled || loading}\n nativeButton={resolvedNativeButton}\n render={render}\n {...props}\n >\n {loading ? (\n <>\n <Loader2 className=\"size-4 animate-spin\" />\n <span>Loading...</span>\n </>\n ) : (\n children\n )}\n </ButtonPrimitive>\n )\n}\n\nexport { Button, buttonVariants }"]}
@@ -0,0 +1,2 @@
1
+ import*as s from'react';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {cn}from'@xploreu/lib/cn';import {jsxs,jsx}from'react/jsx-runtime';var x=cva(cn("peer/input text-text-primary placeholder:text-text-placeholder data-[placeholder]:text-text-placeholder border-border-primary flex w-full min-w-0 rounded-xp-card-base border bg-bg-primary px-3 text-body-regular-2 transition-[color,box-shadow,border] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-bg-disabled disabled:text-text-disabled","focus-visible:border-border-brand focus-visible:border-2","aria-invalid:border-content-on-error-subtle-action"),{variants:{size:{sm:"h-10",md:"h-11"},variant:{password:void 0},withStartContent:{true:"pl-9.5"},withEndContent:{true:"pr-9.5"}},defaultVariants:{size:"md"}}),p=cva("absolute top-1/2 -translate-y-1/2 size-4.5 text-fg-quaternary",{variants:{side:{start:"left-3",end:"right-3"}}});function v({className:c,wrapperClassName:b,type:m,startContent:a,endContent:r,variant:e,size:u,...w}){let[i,f]=s.useState(false),n=!!a||!!r||e==="password";return jsxs(n?"div":s.Fragment,{...n?{className:cn("relative",b)}:{},children:[jsx("input",{className:cn(x({withStartContent:!!a,withEndContent:!!r||e==="password",size:u}),c),"data-slot":"input",type:e==="password"?i?"text":"password":m,...w}),a&&jsx(Slot,{className:cn(p({side:"start"})),children:a}),r&&e!=="password"&&jsx(Slot,{className:cn(p({side:"end"})),children:r}),e==="password"&&jsx(Slot,{"aria-label":i?"Hide password":"Show password",className:"cursor-pointer select-none","data-slot":"toggle-password",onClick:()=>f(h=>!h)})]})}export{x as a,v as b};//# sourceMappingURL=chunk-XXHHZYH6.js.map
2
+ //# sourceMappingURL=chunk-XXHHZYH6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/input.tsx"],"names":["inputVariants","cva","cn","inputIconVariants","Input","className","wrapperClassName","type","startContent","endContent","variant","size","props","showPassword","setShowPassword","isWrapped","jsxs","jsx","Slot","prev"],"mappings":"qLAUA,IAAMA,CAAAA,CAAgBC,GAAAA,CACpBC,EAAAA,CACE,qXAAA,CACA,0DAAA,CACA,oDACF,CAAA,CACA,CACE,QAAA,CAAU,CACR,IAAA,CAAM,CACJ,GAAI,MAAA,CACJ,EAAA,CAAI,MACN,CAAA,CACA,OAAA,CAAS,CACP,SAAU,MACZ,CAAA,CACA,gBAAA,CAAkB,CAChB,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AAA,CAAWhB,EAAAA,CAAGC,CAAAA,CAAkB,CAAE,IAAA,CAAM,OAAQ,CAAC,CAAC,CAAA,CACrD,QAAA,CAAAK,EACH,CAAA,CAEAC,CAAAA,EAAcC,CAAAA,GAAY,UAAA,EAC1BO,GAAAA,CAACC,IAAAA,CAAA,CAAK,SAAA,CAAWhB,EAAAA,CAAGC,CAAAA,CAAkB,CAAE,IAAA,CAAM,KAAM,CAAC,CAAC,CAAA,CACnD,QAAA,CAAAM,CAAAA,CACH,CAAA,CAEDC,CAAAA,GAAY,YACXO,GAAAA,CAACC,IAAAA,CAAA,CACC,YAAA,CAAYL,CAAAA,CAAe,eAAA,CAAkB,gBAC7C,SAAA,CAAU,4BAAA,CACV,WAAA,CAAU,iBAAA,CACV,OAAA,CAAS,IAAMC,CAAAA,CAAiBK,CAAAA,EAAS,CAACA,CAAI,CAAA,CAOhD,CAAA,CAAA,CAEJ,CAEJ","file":"chunk-XXHHZYH6.js","sourcesContent":["\"use client\"\r\nimport * as React from \"react\"\r\n\r\nimport { Slot } from \"@radix-ui/react-slot\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\n\r\n// import { HidePasswords, ShowPasswords } from \"../new\"\r\n\r\nconst inputVariants = cva(\r\n cn(\r\n \"peer/input text-text-primary placeholder:text-text-placeholder data-[placeholder]:text-text-placeholder border-border-primary flex w-full min-w-0 rounded-xp-card-base border bg-bg-primary px-3 text-body-regular-2 transition-[color,box-shadow,border] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-bg-disabled disabled:text-text-disabled\",\r\n \"focus-visible:border-border-brand focus-visible:border-2\",\r\n \"aria-invalid:border-content-on-error-subtle-action\"\r\n ),\r\n {\r\n variants: {\r\n size: {\r\n sm: \"h-10\",\r\n md: \"h-11\",\r\n },\r\n variant: {\r\n password: undefined,\r\n },\r\n withStartContent: {\r\n true: \"pl-9.5\",\r\n },\r\n withEndContent: {\r\n true: \"pr-9.5\",\r\n },\r\n },\r\n defaultVariants: {\r\n size: \"md\",\r\n }\r\n }\r\n)\r\n\r\nconst inputIconVariants = cva(\r\n \"absolute top-1/2 -translate-y-1/2 size-4.5 text-fg-quaternary\",\r\n {\r\n variants: {\r\n side: {\r\n start: \"left-3\",\r\n end: \"right-3\",\r\n },\r\n },\r\n }\r\n)\r\n\r\nfunction Input({\r\n className,\r\n wrapperClassName,\r\n type,\r\n startContent,\r\n endContent,\r\n variant,\r\n size,\r\n ...props\r\n}: Omit<React.ComponentProps<\"input\">, \"size\"> &\r\n VariantProps<typeof inputVariants> & {\r\n startContent?: React.ReactNode\r\n endContent?: React.ReactNode\r\n wrapperClassName?: string\r\n }\r\n) {\r\n const [showPassword, setShowPassword] = React.useState(false)\r\n\r\n const isWrapped = !!startContent || !!endContent || variant === \"password\"\r\n\r\n const Comp = isWrapped ? \"div\" : React.Fragment\r\n\r\n return (\r\n <Comp {...(isWrapped ? { className: cn(\"relative\", wrapperClassName) } : {})}>\r\n <input\r\n className={cn(inputVariants({ withStartContent: !!startContent, withEndContent: (!!endContent || variant === \"password\"), size }), className)}\r\n data-slot=\"input\"\r\n type={variant === \"password\" ? (showPassword ? \"text\" : \"password\") : type}\r\n {...props}\r\n />\r\n {startContent && (\r\n <Slot className={cn(inputIconVariants({ side: \"start\" }))}>\r\n {startContent}\r\n </Slot>\r\n )}\r\n {(endContent && variant !== \"password\") && (\r\n <Slot className={cn(inputIconVariants({ side: \"end\" }))}>\r\n {endContent}\r\n </Slot>\r\n )}\r\n {variant === \"password\" && (\r\n <Slot\r\n aria-label={showPassword ? \"Hide password\" : \"Show password\"}\r\n className=\"cursor-pointer select-none\"\r\n data-slot=\"toggle-password\"\r\n onClick={() => setShowPassword((prev) => !prev)}\r\n >\r\n {/* {showPassword ? (\r\n <ShowPasswords className={cn(inputIconVariants({ side: \"end\" }))} />\r\n ) : (\r\n <HidePasswords className={cn(inputIconVariants({ side: \"end\" }))} />\r\n )} */}\r\n </Slot>\r\n )}\r\n </Comp>\r\n )\r\n}\r\n\r\nexport { Input, inputVariants }\r\n\r\n"]}
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=chunk-ZQTWDSKK.js.map
2
+ //# sourceMappingURL=chunk-ZQTWDSKK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-ZQTWDSKK.js"}
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import { ComboboxProps, ComboboxPortal, ComboboxInfiniteScroll } from '../ui/combobox.js';
3
+ import '@base-ui/react/combobox';
4
+ import 'motion/react';
5
+ import '../effects/highlight.js';
6
+ import '../ui/infinite-scroll.js';
7
+ import '../ui/input.js';
8
+ import 'class-variance-authority/types';
9
+ import 'class-variance-authority';
10
+
11
+ type ComboboxChipOutsideProps<Value> = Omit<ComboboxProps<Value, true>, "multiple"> & {
12
+ multiple?: boolean;
13
+ inputPlaceholder?: string;
14
+ container?: React.ComponentProps<typeof ComboboxPortal>["container"];
15
+ items: ({
16
+ label: string;
17
+ value: string;
18
+ }[]) | undefined;
19
+ infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>;
20
+ isPending?: boolean;
21
+ };
22
+ declare function ComboboxChipOutside<Value extends {
23
+ label: string;
24
+ value: string;
25
+ }>({ multiple, inputPlaceholder, container, items, infiniteScroll, isPending, ...props }: ComboboxChipOutsideProps<Value>): React.JSX.Element;
26
+
27
+ export { ComboboxChipOutside };
@@ -0,0 +1,2 @@
1
+ export{a as ComboboxChipOutside}from'../chunk-G3PVJ4PR.js';import'../chunk-ZQTWDSKK.js';import'../chunk-XRBBTMGF.js';import'../chunk-CN65BQBT.js';import'../chunk-4YATKUEK.js';import'../chunk-52U7K5UV.js';import'../chunk-5YDJTHDG.js';import'../chunk-TED2PUK6.js';import'../chunk-XXHHZYH6.js';import'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-KYD4ATTG.js';//# sourceMappingURL=combobox-chip-outside.js.map
2
+ //# sourceMappingURL=combobox-chip-outside.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"combobox-chip-outside.js"}
@@ -0,0 +1,10 @@
1
+ export { ComboboxChipOutside } from './combobox-chip-outside.js';
2
+ import 'react';
3
+ import '../ui/combobox.js';
4
+ import '@base-ui/react/combobox';
5
+ import 'motion/react';
6
+ import '../effects/highlight.js';
7
+ import '../ui/infinite-scroll.js';
8
+ import '../ui/input.js';
9
+ import 'class-variance-authority/types';
10
+ import 'class-variance-authority';
@@ -0,0 +1,2 @@
1
+ export{a as ComboboxChipOutside}from'../chunk-G3PVJ4PR.js';import'../chunk-ZQTWDSKK.js';import'../chunk-XRBBTMGF.js';import'../chunk-CN65BQBT.js';import'../chunk-4YATKUEK.js';import'../chunk-52U7K5UV.js';import'../chunk-5YDJTHDG.js';import'../chunk-TED2PUK6.js';import'../chunk-XXHHZYH6.js';import'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-KYD4ATTG.js';//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,2 +1,2 @@
1
- export{a as AutoHeight}from'../chunk-ZVME3JB3.js';export{b as Highlight,c as HighlightItem,a as useHighlight}from'../chunk-KYD4ATTG.js';import'../chunk-2TUGHMFW.js';//# sourceMappingURL=index.js.map
1
+ export{a as AutoHeight}from'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';export{b as Highlight,c as HighlightItem,a as useHighlight}from'../chunk-KYD4ATTG.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export{b as Dialog,e as DialogBackdrop,g as DialogClose,k as DialogDescription,i as DialogFooter,h as DialogHeader,f as DialogPopup,d as DialogPortal,j as DialogTitle,c as DialogTrigger,a as useDialog}from'../chunk-5YDJTHDG.js';export{a as Tabs,b as TabsHighlight,d as TabsHighlightItem,c as TabsList,f as TabsPanel,g as TabsPanels,e as TabsTab}from'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-KYD4ATTG.js';export{a as Slot}from'../chunk-2TUGHMFW.js';//# sourceMappingURL=index.js.map
1
+ export{b as Dialog,e as DialogBackdrop,g as DialogClose,k as DialogDescription,i as DialogFooter,h as DialogHeader,f as DialogPopup,d as DialogPortal,j as DialogTitle,c as DialogTrigger,a as useDialog}from'../chunk-5YDJTHDG.js';export{a as Tabs,b as TabsHighlight,d as TabsHighlightItem,c as TabsList,f as TabsPanel,g as TabsPanels,e as TabsTab}from'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';export{a as Slot}from'../chunk-2TUGHMFW.js';import'../chunk-KYD4ATTG.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export{a as Tabs,b as TabsHighlight,d as TabsHighlightItem,c as TabsList,f as TabsPanel,g as TabsPanels,e as TabsTab}from'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-KYD4ATTG.js';import'../chunk-2TUGHMFW.js';//# sourceMappingURL=tabs.js.map
1
+ export{a as Tabs,b as TabsHighlight,d as TabsHighlightItem,c as TabsList,f as TabsPanel,g as TabsPanels,e as TabsTab}from'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-KYD4ATTG.js';//# sourceMappingURL=tabs.js.map
2
2
  //# sourceMappingURL=tabs.js.map
@@ -0,0 +1,20 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { useRender } from '@base-ui/react/use-render';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const badgeVariants: (props?: ({
7
+ type?: "rounded" | "square" | "modern" | null | undefined;
8
+ color?: "gray" | "brand" | "error" | "warning" | "success" | "gray-blue" | "blue-light" | "blue" | "indigo" | "purple" | "pink" | "orange" | null | undefined;
9
+ size?: "sm" | "md" | "lg" | null | undefined;
10
+ icon?: boolean | null | undefined;
11
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
12
+ interface BadgeProps extends Omit<React.ComponentProps<"span">, "color">, VariantProps<typeof badgeVariants> {
13
+ }
14
+ declare function Badge({ className, type, color, size, icon, render, ...props }: BadgeProps & useRender.ComponentProps<"span">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
15
+ declare function BadgeButton({ className, render, align, ...props }: useRender.ComponentProps<"button"> & {
16
+ align?: "inline-end" | "inline-start";
17
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
18
+ declare function BadgeDot({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
19
+
20
+ export { Badge, BadgeButton, BadgeDot, type BadgeProps, badgeVariants };
@@ -0,0 +1,2 @@
1
+ export{b as Badge,c as BadgeButton,d as BadgeDot,a as badgeVariants}from'../chunk-4YATKUEK.js';//# sourceMappingURL=badge.js.map
2
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"badge.js"}
package/dist/ui/button.js CHANGED
@@ -1,2 +1,2 @@
1
- export{b as Button,a as buttonVariants}from'../chunk-7K7NVV7D.js';//# sourceMappingURL=button.js.map
1
+ export{b as Button,a as buttonVariants}from'../chunk-XRBBTMGF.js';//# sourceMappingURL=button.js.map
2
2
  //# sourceMappingURL=button.js.map
@@ -0,0 +1,114 @@
1
+ import * as React from 'react';
2
+ import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
3
+ import { HTMLMotionProps } from 'motion/react';
4
+ import { HighlightProps, HighlightItemProps } from '../effects/highlight.js';
5
+ import { InfiniteScroll } from './infinite-scroll.js';
6
+ import { Input } from './input.js';
7
+ import 'class-variance-authority/types';
8
+ import 'class-variance-authority';
9
+
10
+ type ComboboxProps$1<Value, Multiple extends boolean | undefined = false> = Combobox$1.Root.Props<Value, Multiple>;
11
+ type ComboboxTriggerProps$1 = Combobox$1.Trigger.Props;
12
+ type ComboboxLabelProps$1 = Combobox$1.Label.Props;
13
+ type ComboboxInputGroupProps$1 = Combobox$1.InputGroup.Props;
14
+ type ComboboxInputProps$1 = Combobox$1.Input.Props;
15
+ type ComboboxIconProps$1 = Combobox$1.Icon.Props;
16
+ type ComboboxClearProps$1 = Combobox$1.Clear.Props;
17
+ type ComboboxValueProps$1 = Combobox$1.Value.Props;
18
+ type ComboboxChipsProps$1 = Combobox$1.Chips.Props;
19
+ type ComboboxChipProps$1 = Combobox$1.Chip.Props;
20
+ type ComboboxChipRemoveProps$1 = Combobox$1.ChipRemove.Props;
21
+ type ComboboxPortalProps$1 = Omit<Combobox$1.Portal.Props, "keepMounted">;
22
+ type ComboboxPositionerProps$1 = Combobox$1.Positioner.Props;
23
+ type ComboboxPopupProps$1 = Omit<Combobox$1.Popup.Props, "render"> & HTMLMotionProps<"div">;
24
+ type ComboboxBackdropProps$1 = Combobox$1.Backdrop.Props;
25
+ type ComboboxStatusProps$1 = Combobox$1.Status.Props;
26
+ type ComboboxEmptyProps$1 = Combobox$1.Empty.Props;
27
+ type ComboboxListProps$1 = Combobox$1.List.Props;
28
+ type ComboboxHighlightProps$1 = Omit<HighlightProps, "controlledItems" | "enabled" | "hover">;
29
+ type ComboboxHighlightItemProps$1 = HighlightItemProps;
30
+ type ComboboxRowProps$1 = Combobox$1.Row.Props;
31
+ type ComboboxItemProps$1 = Combobox$1.Item.Props;
32
+ type ComboboxItemIndicatorProps$1 = Combobox$1.ItemIndicator.Props;
33
+ type ComboboxSeparatorProps$1 = Combobox$1.Separator.Props;
34
+ type ComboboxGroupProps$1 = Combobox$1.Group.Props;
35
+ type ComboboxGroupLabelProps$1 = Combobox$1.GroupLabel.Props;
36
+ type ComboboxCollectionProps$1 = Combobox$1.Collection.Props;
37
+ type ComboboxArrowProps$1 = Combobox$1.Arrow.Props;
38
+
39
+ type ComboboxProps<Value, Multiple extends boolean | undefined = false> = ComboboxProps$1<Value, Multiple>;
40
+ declare function Combobox<Value, Multiple extends boolean | undefined = false>(props: ComboboxProps<Value, Multiple>): React.JSX.Element;
41
+ type ComboboxTriggerProps = ComboboxTriggerProps$1;
42
+ declare function ComboboxTrigger(props: ComboboxTriggerProps): React.JSX.Element;
43
+ type ComboboxLabelProps = ComboboxLabelProps$1;
44
+ declare function ComboboxLabel(props: ComboboxLabelProps): React.JSX.Element;
45
+ type ComboboxInputGroupProps = ComboboxInputGroupProps$1;
46
+ declare function ComboboxInputGroup(props: ComboboxInputGroupProps): React.JSX.Element;
47
+ type ComboboxInputProps = ComboboxInputProps$1;
48
+ declare function ComboboxInput(props: ComboboxInputProps): React.JSX.Element;
49
+ declare function ComboboxInputFilter({ className, displayValueKey, placeholder, inputProps, ...props }: ComboboxInputProps & {
50
+ displayValueKey?: {
51
+ label: string;
52
+ value: string;
53
+ };
54
+ placeholder?: string;
55
+ inputProps?: React.ComponentProps<typeof Input>;
56
+ }): React.JSX.Element;
57
+ type ComboboxIconProps = ComboboxIconProps$1;
58
+ declare function ComboboxIcon(props: ComboboxIconProps): React.JSX.Element;
59
+ type ComboboxClearProps = ComboboxClearProps$1;
60
+ declare function ComboboxClear(props: ComboboxClearProps): React.JSX.Element;
61
+ type ComboboxValueProps = ComboboxValueProps$1;
62
+ declare function ComboboxValue(props: ComboboxValueProps): React.JSX.Element;
63
+ type ComboboxChipsProps = ComboboxChipsProps$1;
64
+ declare function ComboboxChips({ className, ...props }: ComboboxChipsProps): React.JSX.Element;
65
+ type ComboboxChipProps = ComboboxChipProps$1;
66
+ declare function ComboboxChip({ className, ...props }: ComboboxChipProps): React.JSX.Element;
67
+ type ComboboxChipRemoveProps = ComboboxChipRemoveProps$1;
68
+ declare function ComboboxChipRemove({ className, ...props }: ComboboxChipRemoveProps): React.JSX.Element;
69
+ type ComboboxPanelProps = ComboboxPositionerProps$1 & ComboboxPopupProps$1;
70
+ declare function ComboboxPanel({ className, align, sideOffset, initialFocus, finalFocus, style, children, ...props }: ComboboxPanelProps): React.JSX.Element;
71
+ type ComboboxContentProps = ComboboxPositionerProps$1 & ComboboxPopupProps$1 & {
72
+ container?: React.ComponentProps<typeof ComboboxPortal>["container"];
73
+ };
74
+ declare function ComboboxContent({ className, align, sideOffset, container, initialFocus, finalFocus, style, children, ...props }: ComboboxContentProps): React.JSX.Element;
75
+ type ComboboxPortalProps = ComboboxPortalProps$1;
76
+ declare function ComboboxPortal(props: ComboboxPortalProps): React.JSX.Element;
77
+ type ComboboxPositionerProps = ComboboxPositionerProps$1;
78
+ declare function ComboboxPositioner(props: ComboboxPositionerProps): React.JSX.Element;
79
+ type ComboboxPopupProps = ComboboxPopupProps$1;
80
+ declare function ComboboxPopup({ className, ...props }: ComboboxPopupProps): React.JSX.Element;
81
+ type ComboboxBackdropProps = ComboboxBackdropProps$1;
82
+ declare function ComboboxBackdrop(props: ComboboxBackdropProps): React.JSX.Element;
83
+ type ComboboxStatusProps = ComboboxStatusProps$1;
84
+ declare function ComboboxStatus({ className, status, ...props }: Omit<ComboboxStatusProps, "children"> & {
85
+ status?: "empty" | "pending" | null;
86
+ }): React.JSX.Element;
87
+ type ComboboxLoadingProps = React.ComponentProps<"div">;
88
+ type ComboboxEmptyProps = ComboboxEmptyProps$1;
89
+ declare function ComboboxEmpty({ className, ...props }: ComboboxEmptyProps): React.JSX.Element;
90
+ type ComboboxListProps = ComboboxListProps$1;
91
+ declare function ComboboxList({ className, ...props }: ComboboxListProps): React.JSX.Element;
92
+ type ComboboxHighlightProps = ComboboxHighlightProps$1;
93
+ declare function ComboboxHighlight(props: ComboboxHighlightProps): React.JSX.Element;
94
+ type ComboboxHighlightItemProps = ComboboxHighlightItemProps$1;
95
+ declare function ComboboxHighlightItem(props: ComboboxHighlightItemProps): React.JSX.Element;
96
+ type ComboboxRowProps = ComboboxRowProps$1;
97
+ declare function ComboboxRow(props: ComboboxRowProps): React.JSX.Element;
98
+ type ComboboxItemProps = ComboboxItemProps$1;
99
+ declare function ComboboxItem({ className, children, ...props }: ComboboxItemProps): React.JSX.Element;
100
+ type ComboboxItemIndicatorProps = ComboboxItemIndicatorProps$1;
101
+ declare function ComboboxItemIndicator(props: ComboboxItemIndicatorProps): React.JSX.Element;
102
+ type ComboboxSeparatorProps = ComboboxSeparatorProps$1;
103
+ declare function ComboboxSeparator(props: ComboboxSeparatorProps): React.JSX.Element;
104
+ type ComboboxGroupProps = ComboboxGroupProps$1;
105
+ declare function ComboboxGroup(props: ComboboxGroupProps): React.JSX.Element;
106
+ type ComboboxGroupLabelProps = ComboboxGroupLabelProps$1;
107
+ declare function ComboboxGroupLabel(props: ComboboxGroupLabelProps): React.JSX.Element;
108
+ type ComboboxCollectionProps = ComboboxCollectionProps$1;
109
+ declare function ComboboxCollection(props: ComboboxCollectionProps): React.JSX.Element;
110
+ type ComboboxArrowProps = ComboboxArrowProps$1;
111
+ declare function ComboboxArrow(props: ComboboxArrowProps): React.JSX.Element;
112
+ declare function ComboboxInfiniteScroll({ hasMore, threshold, ...props }: Omit<React.ComponentProps<typeof InfiniteScroll>, "children">): React.JSX.Element;
113
+
114
+ export { Combobox, ComboboxArrow, type ComboboxArrowProps, ComboboxBackdrop, type ComboboxBackdropProps, ComboboxChip, type ComboboxChipProps, ComboboxChipRemove, type ComboboxChipRemoveProps, ComboboxChips, type ComboboxChipsProps, ComboboxClear, type ComboboxClearProps, ComboboxCollection, type ComboboxCollectionProps, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, type ComboboxEmptyProps, ComboboxGroup, ComboboxGroupLabel, type ComboboxGroupLabelProps, type ComboboxGroupProps, ComboboxHighlight, ComboboxHighlightItem, type ComboboxHighlightItemProps, type ComboboxHighlightProps, ComboboxIcon, type ComboboxIconProps, ComboboxInfiniteScroll, ComboboxInput, ComboboxInputFilter, ComboboxInputGroup, type ComboboxInputGroupProps, type ComboboxInputProps, ComboboxItem, ComboboxItemIndicator, type ComboboxItemIndicatorProps, type ComboboxItemProps, ComboboxLabel, type ComboboxLabelProps, ComboboxList, type ComboboxListProps, type ComboboxLoadingProps, ComboboxPanel, type ComboboxPanelProps, ComboboxPopup, type ComboboxPopupProps, ComboboxPortal, type ComboboxPortalProps, ComboboxPositioner, type ComboboxPositionerProps, type ComboboxProps, ComboboxRow, type ComboboxRowProps, ComboboxSeparator, type ComboboxSeparatorProps, ComboboxStatus, type ComboboxStatusProps, ComboboxTrigger, type ComboboxTriggerProps, ComboboxValue, type ComboboxValueProps };
@@ -0,0 +1,2 @@
1
+ export{b as Combobox,F as ComboboxArrow,s as ComboboxBackdrop,l as ComboboxChip,m as ComboboxChipRemove,k as ComboboxChips,i as ComboboxClear,E as ComboboxCollection,o as ComboboxContent,u as ComboboxEmpty,C as ComboboxGroup,D as ComboboxGroupLabel,w as ComboboxHighlight,x as ComboboxHighlightItem,h as ComboboxIcon,G as ComboboxInfiniteScroll,f as ComboboxInput,g as ComboboxInputFilter,e as ComboboxInputGroup,z as ComboboxItem,A as ComboboxItemIndicator,d as ComboboxLabel,v as ComboboxList,n as ComboboxPanel,r as ComboboxPopup,p as ComboboxPortal,q as ComboboxPositioner,y as ComboboxRow,B as ComboboxSeparator,t as ComboboxStatus,c as ComboboxTrigger,j as ComboboxValue}from'../chunk-CN65BQBT.js';import'../chunk-4YATKUEK.js';import'../chunk-TED2PUK6.js';import'../chunk-XXHHZYH6.js';import'../chunk-KYD4ATTG.js';//# sourceMappingURL=combobox.js.map
2
+ //# sourceMappingURL=combobox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"combobox.js"}
@@ -1,15 +1,21 @@
1
1
  export { Button, buttonVariants } from './button.js';
2
+ export { Badge, BadgeButton, BadgeDot, badgeVariants } from './badge.js';
3
+ export { Combobox, ComboboxArrow, ComboboxArrowProps, ComboboxBackdrop, ComboboxBackdropProps, ComboboxChip, ComboboxChipProps, ComboboxChipRemove, ComboboxChipRemoveProps, ComboboxChips, ComboboxChipsProps, ComboboxClear, ComboboxClearProps, ComboboxCollection, ComboboxCollectionProps, ComboboxContent, ComboboxContentProps, ComboboxEmpty, ComboboxEmptyProps, ComboboxGroup, ComboboxGroupLabel, ComboboxGroupLabelProps, ComboboxGroupProps, ComboboxHighlight, ComboboxHighlightItem, ComboboxHighlightItemProps, ComboboxHighlightProps, ComboboxIcon, ComboboxIconProps, ComboboxInfiniteScroll, ComboboxInput, ComboboxInputFilter, ComboboxInputGroup, ComboboxInputGroupProps, ComboboxInputProps, ComboboxItem, ComboboxItemIndicator, ComboboxItemIndicatorProps, ComboboxItemProps, ComboboxLabel, ComboboxLabelProps, ComboboxList, ComboboxListProps, ComboboxLoadingProps, ComboboxPanel, ComboboxPanelProps, ComboboxPopup, ComboboxPopupProps, ComboboxPortal, ComboboxPortalProps, ComboboxPositioner, ComboboxPositionerProps, ComboboxProps, ComboboxRow, ComboboxRowProps, ComboboxSeparator, ComboboxSeparatorProps, ComboboxStatus, ComboboxStatusProps, ComboboxTrigger, ComboboxTriggerProps, ComboboxValue, ComboboxValueProps } from './combobox.js';
2
4
  export { Dialog, DialogClose, DialogCloseProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogPopup, DialogPopupProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps } from './dialog.js';
5
+ export { InfiniteScroll } from './infinite-scroll.js';
6
+ export { Input, inputVariants } from './input.js';
3
7
  export { Tabs, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsPanels, TabsPanelsProps, TabsProps, TabsTab, TabsTabProps } from './tabs.js';
4
8
  import 'react';
5
9
  import 'class-variance-authority/types';
6
10
  import 'class-variance-authority';
7
11
  import '@base-ui/react/button';
12
+ import '@base-ui/react/use-render';
13
+ import '@base-ui/react/combobox';
14
+ import 'motion/react';
15
+ import '../effects/highlight.js';
8
16
  import '../primitives/dialog.js';
9
17
  import '@base-ui/react/dialog';
10
- import 'motion/react';
11
18
  import '../primitives/tabs.js';
12
19
  import '@base-ui/react/tabs';
13
- import '../effects/highlight.js';
14
20
  import '../effects/auto-height.js';
15
21
  import '../primitives/slot.js';
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{b as Button,a as buttonVariants}from'../chunk-7K7NVV7D.js';export{a as Dialog,c as DialogClose,h as DialogDescription,f as DialogFooter,e as DialogHeader,d as DialogPopup,g as DialogTitle,b as DialogTrigger}from'../chunk-52U7K5UV.js';export{a as Tabs,b as TabsList,e as TabsPanel,d as TabsPanels,c as TabsTab}from'../chunk-WIUYDPXB.js';import'../chunk-5YDJTHDG.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-KYD4ATTG.js';import'../chunk-2TUGHMFW.js';//# sourceMappingURL=index.js.map
1
+ import'../chunk-ZQTWDSKK.js';export{b as Button,a as buttonVariants}from'../chunk-XRBBTMGF.js';export{b as Combobox,F as ComboboxArrow,s as ComboboxBackdrop,l as ComboboxChip,m as ComboboxChipRemove,k as ComboboxChips,i as ComboboxClear,E as ComboboxCollection,o as ComboboxContent,u as ComboboxEmpty,C as ComboboxGroup,D as ComboboxGroupLabel,w as ComboboxHighlight,x as ComboboxHighlightItem,h as ComboboxIcon,G as ComboboxInfiniteScroll,f as ComboboxInput,g as ComboboxInputFilter,e as ComboboxInputGroup,z as ComboboxItem,A as ComboboxItemIndicator,d as ComboboxLabel,v as ComboboxList,n as ComboboxPanel,r as ComboboxPopup,p as ComboboxPortal,q as ComboboxPositioner,y as ComboboxRow,B as ComboboxSeparator,t as ComboboxStatus,c as ComboboxTrigger,j as ComboboxValue}from'../chunk-CN65BQBT.js';export{b as Badge,c as BadgeButton,d as BadgeDot,a as badgeVariants}from'../chunk-4YATKUEK.js';export{a as Dialog,c as DialogClose,h as DialogDescription,f as DialogFooter,e as DialogHeader,d as DialogPopup,g as DialogTitle,b as DialogTrigger}from'../chunk-52U7K5UV.js';import'../chunk-5YDJTHDG.js';export{a as InfiniteScroll}from'../chunk-TED2PUK6.js';export{b as Input,a as inputVariants}from'../chunk-XXHHZYH6.js';export{a as Tabs,b as TabsList,e as TabsPanel,d as TabsPanels,c as TabsTab}from'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-KYD4ATTG.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ type InfiniteScrollProps = {
4
+ isLoading?: boolean;
5
+ hasMore?: boolean;
6
+ next?: () => unknown;
7
+ threshold?: number;
8
+ root?: Element | Document | null;
9
+ rootMargin?: string;
10
+ reverse?: boolean;
11
+ children?: React.ReactNode;
12
+ };
13
+ declare function InfiniteScroll({ isLoading, hasMore, next, threshold, root, rootMargin, reverse, children, }: InfiniteScrollProps): React.JSX.Element;
14
+
15
+ export { InfiniteScroll };
@@ -0,0 +1,2 @@
1
+ export{a as InfiniteScroll}from'../chunk-TED2PUK6.js';//# sourceMappingURL=infinite-scroll.js.map
2
+ //# sourceMappingURL=infinite-scroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"infinite-scroll.js"}
@@ -0,0 +1,17 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const inputVariants: (props?: ({
6
+ size?: "sm" | "md" | null | undefined;
7
+ variant?: "password" | null | undefined;
8
+ withStartContent?: boolean | null | undefined;
9
+ withEndContent?: boolean | null | undefined;
10
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
11
+ declare function Input({ className, wrapperClassName, type, startContent, endContent, variant, size, ...props }: Omit<React.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants> & {
12
+ startContent?: React.ReactNode;
13
+ endContent?: React.ReactNode;
14
+ wrapperClassName?: string;
15
+ }): React.JSX.Element;
16
+
17
+ export { Input, inputVariants };
@@ -0,0 +1,2 @@
1
+ export{b as Input,a as inputVariants}from'../chunk-XXHHZYH6.js';//# sourceMappingURL=input.js.map
2
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"input.js"}
package/dist/ui/tabs.js CHANGED
@@ -1,2 +1,2 @@
1
- export{a as Tabs,b as TabsList,e as TabsPanel,d as TabsPanels,c as TabsTab}from'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-KYD4ATTG.js';import'../chunk-2TUGHMFW.js';//# sourceMappingURL=tabs.js.map
1
+ export{a as Tabs,b as TabsList,e as TabsPanel,d as TabsPanels,c as TabsTab}from'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-KYD4ATTG.js';//# sourceMappingURL=tabs.js.map
2
2
  //# sourceMappingURL=tabs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xploreu/components",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Shared UI components for XploreU apps",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -35,6 +35,14 @@
35
35
  "./effects/*": {
36
36
  "types": "./dist/effects/*.d.ts",
37
37
  "import": "./dist/effects/*.js"
38
+ },
39
+ "./composites": {
40
+ "types": "./dist/composites/index.d.ts",
41
+ "import": "./dist/composites/index.js"
42
+ },
43
+ "./composites/*": {
44
+ "types": "./dist/composites/*.d.ts",
45
+ "import": "./dist/composites/*.js"
38
46
  }
39
47
  },
40
48
  "files": [
@@ -45,7 +53,7 @@
45
53
  "lucide-react": "^0.477.0",
46
54
  "react": ">=18",
47
55
  "react-dom": ">=18",
48
- "@xploreu/hooks": "0.2.0",
56
+ "@xploreu/hooks": "0.2.1",
49
57
  "@xploreu/lib": "0.1.2"
50
58
  },
51
59
  "dependencies": {
@@ -58,6 +66,7 @@
58
66
  },
59
67
  "devDependencies": {
60
68
  "@base-ui/react": "^1.6.0",
69
+ "@types/node": "^20",
61
70
  "@types/react": "19.2.17",
62
71
  "@types/react-dom": "19.2.3",
63
72
  "lucide-react": "^0.477.0",
@@ -65,7 +74,7 @@
65
74
  "react-dom": "^19.2.4",
66
75
  "tsup": "^8.4.0",
67
76
  "typescript": "^5",
68
- "@xploreu/hooks": "0.2.0",
77
+ "@xploreu/hooks": "0.2.1",
69
78
  "@xploreu/lib": "0.1.2"
70
79
  },
71
80
  "scripts": {
@@ -1,2 +0,0 @@
1
- import {cva}from'class-variance-authority';import {Loader2}from'lucide-react';import {Button}from'@base-ui/react/button';import {cn}from'@xploreu/lib/cn';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var m=cva(cn("group relative inline-flex h-max w-fit cursor-pointer items-center justify-center whitespace-nowrap outline-brand transition duration-100 ease-linear before:absolute focus-visible:outline-2 focus-visible:outline-offset-2 rounded-xp-buttons [&_svg]:shrink-0","disabled:cursor-not-allowed"),{variants:{color:{default:"focus-visible:outline-focus-ring",destructive:"focus-visible:outline-focus-ring-error","gradient-ai":"focus-visible:outline-focus-ring","linear-green":"focus-visible:outline-focus-ring-success","linear-overlay":"focus-visible:outline-focus-ring","linear-destructive":"focus-visible:outline-focus-ring-error"},variant:{primary:"before:rounded-lg before:absolute before:inset-0 before:border-1 before:border-white/12 before:mask-b-from-0% after:absolute after:inset-0 after:rounded-xp-buttons hover:after:bg-alpha-gray-20 after:bg-transparent after:transition-colors disabled:text-fg-disabled disabled:bg-none disabled:bg-[#F5F5F5] disabled:hover:after:bg-transparent disabled:before:border-border-disabled disabled:before:mask-none disabled:before:border-1 shadow-xp-md hover:shadow-xp-brand ",secondary:"border-1 shadow-xp-md hover:shadow-xp-brand disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle disabled:border-border-disabled disabled:hover:text-fg-disabled disabled:hover:[&_svg]:text-fg-disabled-subtle","secondary-accent":"disabled:border-border-disabled disabled:bg-bg-disabled disabled:text-fg-disabled",tertiary:"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-bg-disabled","tertiary-accent":"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle",link:"underline decoration-transparent hover:decoration-inherit transition-colors disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle disabled:hover:no-underline"},icon:{true:void 0,false:void 0},size:{sm:"text-label-semibold-3 px-xp-lg gap-xp-sm h-9 data-[icon]:size-9 data-[variant=link]:h-5 data-[variant=link]:px-0 [&_svg]:size-5",md:"text-label-semibold-3 px-3.5 gap-xp-sm h-10 data-[icon]:size-10 data-[variant=link]:h-5 data-[variant=link]:px-0 [&_svg]:size-5",lg:"text-label-semibold-2 px-xp-xl gap-xp-md h-11 data-[icon]:size-11 data-[variant=link]:h-[22px] data-[variant=link]:px-0 [&_svg]:size-5",xl:"text-label-semibold-2 px-4.5 gap-xp-md h-12 data-[icon]:size-12 data-[variant=link]:h-[22px] data-[variant=link]:px-0 [&_svg]:size-5"}},compoundVariants:[{variant:"primary",color:"default",className:"bg-gradient-buttons-gradient-blue text-text-primary-on-brand"},{variant:"secondary",color:"default",className:"bg-bg-primary text-text-secondary [&_svg]:text-fg-secondary border-border-primary-icon hover:bg-bg-brand-solid hover:border-border-white hover:text-text-primary-on-brand hover:[&_svg]:text-fg-white"},{variant:"secondary-accent",color:"default",className:"border-1 border-border-primary-icon text-fg-primary hover:bg-bg-brand-primary"},{variant:"tertiary",color:"default",className:"text-text-tertiary [&_svg]:text-fg-quaternary hover:bg-bg-primary-hover hover:text-text-tertiary-hover hover:[&_svg]:text-fg-quaternary-hover"},{variant:"tertiary-accent",color:"default",className:"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"link",color:"default",className:"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"primary",color:"destructive",className:"bg-bg-error-solid text-text-primary-on-brand"},{variant:"secondary",color:"destructive",className:"bg-bg-primary text-text-error-primary [&_svg]:text-fg-error-secondary border-border-error hover:bg-bg-error-primary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-secondary"},{variant:"secondary-accent",color:"destructive",className:"border-1 border-border-error text-fg-error-primary hover:bg-bg-error-primary"},{variant:"tertiary",color:"destructive",className:"text-text-error-primary [&_svg]:text-fg-error-secondary hover:bg-bg-error-primary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary"},{variant:"tertiary-accent",color:"destructive",className:"bg-bg-error-primary text-text-error-tertiary [&_svg]:text-fg-error-secondary hover:bg-bg-error-secondary hover:text-text-error-tertiary hover:[&_svg]:text-fg-error-secondary-hover"},{variant:"link",color:"destructive",className:"text-text-error-secondary [&_svg]:text-fg-error-secondary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary"},{variant:"primary",color:"gradient-ai",className:"bg-gradient-buttons-button-ai text-text-primary-on-brand"},{variant:"secondary",color:"gradient-ai",className:"relative shadow-transparent border-transparent hover:bg-bg-primary bg-[linear-gradient(90deg,var(--color-bg-primary),var(--color-bg-primary)),var(--gradient-buttons-button-ai)] [background-clip:padding-box,border-box] [background-origin:padding-box,border-box] [&>span]:bg-gradient-buttons-button-ai [&>span]:bg-clip-text [&>span]:text-transparent after:absolute after:inset-0 after:rounded-md hover:after:bg-gradient-buttons-button-ai hover:after:opacity-10 disabled:hover:after:bg-transparent disabled:after:opacity-0 disabled:[&>span]:bg-none disabled:[&>span]:text-fg-disabled"},{variant:"secondary-accent",color:"gradient-ai",className:"border-1 border-border-brand text-fg-brand-primary hover:bg-bg-brand-primary"},{variant:"tertiary",color:"gradient-ai",className:"relative [&>span]:bg-gradient-buttons-button-ai [&>span]:bg-clip-text [&>span]:text-transparent after:absolute after:inset-0 after:rounded-md hover:after:bg-gradient-buttons-button-ai hover:after:opacity-10 disabled:hover:after:bg-transparent disabled:after:opacity-0 disabled:[&>span]:bg-none disabled:[&>span]:text-fg-disabled"},{variant:"tertiary-accent",color:"gradient-ai",className:"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"link",color:"gradient-ai",className:"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"primary",color:"linear-green",className:"bg-gradient-buttons-gradient-green text-text-primary-on-brand"},{variant:"secondary",color:"linear-green",className:"bg-bg-primary text-text-secondary [&_svg]:text-green-500 border-border-primary hover:text-text-secondary-hover hover:[&_svg]:text-green-900"},{variant:"secondary-accent",color:"linear-green",className:"border-1 border-border-primary text-fg-primary hover:bg-bg-primary"},{variant:"tertiary",color:"linear-green",className:"text-text-success-primary [&_svg]:text-green-500 hover:bg-bg-success-primary hover:[&_svg]:text-green-900"},{variant:"tertiary-accent",color:"linear-green",className:"bg-bg-success-primary text-text-success-tertiary [&_svg]:text-fg-success-secondary hover:bg-bg-success-secondary hover:text-text-success-tertiary hover:[&_svg]:text-fg-success-secondary-hover"},{variant:"link",color:"linear-green",className:"text-text-success-secondary [&_svg]:text-fg-success-secondary hover:text-text-success-primary-hover hover:[&_svg]:text-fg-success-primary"},{variant:"primary",color:"linear-overlay",className:"relative bg-bg-brand-solid text-text-primary-on-brand [&_svg]:text-button-primary-icon hover:[&_svg]:text-button-primary-icon-hover after:absolute after:inset-0 after:rounded-xp-buttons after:bg-gradient-skuemorphic-gradient-border after:hover:bg-gradient-skuemorphic-gradient-border"},{variant:"secondary",color:"linear-overlay",className:"bg-bg-brand-solid-hover text-text-secondary [&_svg]:text-fg-quaternary border-border-primary hover:bg-bg-primary-hover hover:text-text-secondary-hover hover:[&_svg]:text-text-quaternary-hover"},{variant:"secondary-accent",color:"linear-overlay",className:"border-1 border-border-brand text-fg-brand-primary hover:bg-bg-brand-primary"},{variant:"tertiary",color:"linear-overlay",className:"text-text-tertiary [&_svg]:text-fg-quaternary hover:bg-bg-primary-hover hover:text-text-tertiary-hover hover:[&_svg]:text-fg-quaternary-hover"},{variant:"tertiary-accent",color:"linear-overlay",className:"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"link",color:"linear-overlay",className:"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover"},{variant:"primary",color:"linear-destructive",className:"relative bg-bg-error-solid text-text-primary-on-brand [&_svg]:text-button-destructive-primary-icon hover:[&_svg]:text-button-destructive-primary-icon-hover after:absolute after:inset-0 after:rounded-xp-buttons after:bg-gradient-skuemorphic-gradient-border after:hover:bg-gradient-skuemorphic-gradient-border"},{variant:"secondary",color:"linear-destructive",className:"bg-bg-error-solid-hover text-text-secondary [&_svg]:text-fg-quaternary border-border-primary hover:bg-bg-primary-hover hover:text-text-secondary-hover hover:[&_svg]:text-text-quaternary-hover"},{variant:"secondary-accent",color:"linear-destructive",className:"border-1 border-border-error text-fg-error-primary hover:bg-bg-error-primary"},{variant:"tertiary",color:"linear-destructive",className:"text-text-error-primary [&_svg]:text-fg-error-secondary hover:bg-bg-error-primary hover:text-text-tertiary-hover hover:[&_svg]:text-fg-error-secondary"},{variant:"tertiary-accent",color:"linear-destructive",className:"bg-bg-error-primary text-text-error-tertiary [&_svg]:text-fg-error-secondary hover:bg-bg-error-secondary hover:text-text-error-tertiary hover:[&_svg]:text-fg-error-secondary-hover"},{variant:"link",color:"linear-destructive",className:"text-text-error-primary [&_svg]:text-fg-error-secondary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary"}],defaultVariants:{variant:"primary",color:"default",size:"sm"}});function w({className:s,color:i,variant:e,size:n,loading:t=false,children:d,disabled:b,icon:g,nativeButton:v,render:a,...l}){let c=a!=null?false:v;return jsx(Button,{className:cn(m({color:i,variant:e,size:n,className:s})),"data-icon":g?"":void 0,"data-variant":e,disabled:b||t,nativeButton:c,render:a,...l,children:t?jsxs(Fragment,{children:[jsx(Loader2,{className:"size-4 animate-spin"}),jsx("span",{children:"Loading..."})]}):d})}export{m as a,w as b};//# sourceMappingURL=chunk-7K7NVV7D.js.map
2
- //# sourceMappingURL=chunk-7K7NVV7D.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ui/button.tsx"],"names":["buttonVariants","cva","cn","Button","className","color","variant","size","loading","children","disabled","icon","nativeButton","render","props","resolvedNativeButton","jsx","ButtonPrimitive","jsxs","Fragment","Loader2"],"mappings":"4MAMA,IAAMA,CAAAA,CAAiBC,GAAAA,CACrBC,EAAAA,CACE,kQAAA,CACA,6BACF,CAAA,CACA,CACE,QAAA,CAAU,CACR,KAAA,CAAO,CACL,OAAA,CAAS,kCAAA,CACT,WAAA,CAAa,wCAAA,CACb,aAAA,CAAe,kCAAA,CACf,cAAA,CAAgB,0CAAA,CAChB,iBAAkB,kCAAA,CAClB,oBAAA,CAAsB,wCACxB,CAAA,CACA,OAAA,CAAS,CACP,OAAA,CAAS,kdAAA,CACT,SAAA,CAAW,uPAAA,CACX,kBAAA,CAAoB,mFAAA,CACpB,QAAA,CAAU,qFAAA,CACV,kBAAmB,4FAAA,CACnB,IAAA,CAAM,oMACR,CAAA,CACA,IAAA,CAAM,CACJ,KAAM,MAAA,CACN,KAAA,CAAO,MACT,CAAA,CACA,IAAA,CAAM,CACJ,GAAI,iIAAA,CACJ,EAAA,CAAI,iIAAA,CACJ,EAAA,CAAI,wIAAA,CACJ,EAAA,CAAI,s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,CAEH,QAAA,CAAAN,CAAAA,CACCU,IAAAA,CAAAC,QAAAA,CAAA,CACE,UAAAH,GAAAA,CAACI,OAAAA,CAAA,CAAQ,SAAA,CAAU,qBAAA,CAAsB,CAAA,CACzCJ,GAAAA,CAAC,MAAA,CAAA,CAAK,QAAA,CAAA,YAAA,CAAU,CAAA,CAAA,CAClB,CAAA,CAEAP,CAAAA,CAEJ,CAEJ","file":"chunk-7K7NVV7D.js","sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\"\nimport { Loader2 } from \"lucide-react\"\n\nimport { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cn } from \"@xploreu/lib/cn\"\n\nconst buttonVariants = cva(\n cn(\n \"group relative inline-flex h-max w-fit cursor-pointer items-center justify-center whitespace-nowrap outline-brand transition duration-100 ease-linear before:absolute focus-visible:outline-2 focus-visible:outline-offset-2 rounded-xp-buttons [&_svg]:shrink-0\",\n \"disabled:cursor-not-allowed\",\n ),\n {\n variants: {\n color: {\n default: \"focus-visible:outline-focus-ring\",\n destructive: \"focus-visible:outline-focus-ring-error\",\n \"gradient-ai\": \"focus-visible:outline-focus-ring\",\n \"linear-green\": \"focus-visible:outline-focus-ring-success\",\n \"linear-overlay\": \"focus-visible:outline-focus-ring\",\n \"linear-destructive\": \"focus-visible:outline-focus-ring-error\",\n },\n variant: {\n primary: \"before:rounded-lg before:absolute before:inset-0 before:border-1 before:border-white/12 before:mask-b-from-0% after:absolute after:inset-0 after:rounded-xp-buttons hover:after:bg-alpha-gray-20 after:bg-transparent after:transition-colors disabled:text-fg-disabled disabled:bg-none disabled:bg-[#F5F5F5] disabled:hover:after:bg-transparent disabled:before:border-border-disabled disabled:before:mask-none disabled:before:border-1 shadow-xp-md hover:shadow-xp-brand \",\n secondary: \"border-1 shadow-xp-md hover:shadow-xp-brand disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle disabled:border-border-disabled disabled:hover:text-fg-disabled disabled:hover:[&_svg]:text-fg-disabled-subtle\",\n \"secondary-accent\": \"disabled:border-border-disabled disabled:bg-bg-disabled disabled:text-fg-disabled\",\n tertiary: \"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-bg-disabled\",\n \"tertiary-accent\": \"disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle\",\n link: \"underline decoration-transparent hover:decoration-inherit transition-colors disabled:bg-bg-disabled disabled:text-fg-disabled disabled:[&_svg]:text-fg-disabled-subtle disabled:hover:no-underline\",\n },\n icon: {\n true: undefined,\n false: undefined\n },\n size: {\n sm: \"text-label-semibold-3 px-xp-lg gap-xp-sm h-9 data-[icon]:size-9 data-[variant=link]:h-5 data-[variant=link]:px-0 [&_svg]:size-5\",\n md: \"text-label-semibold-3 px-3.5 gap-xp-sm h-10 data-[icon]:size-10 data-[variant=link]:h-5 data-[variant=link]:px-0 [&_svg]:size-5\",\n lg: \"text-label-semibold-2 px-xp-xl gap-xp-md h-11 data-[icon]:size-11 data-[variant=link]:h-[22px] data-[variant=link]:px-0 [&_svg]:size-5\",\n xl: \"text-label-semibold-2 px-4.5 gap-xp-md h-12 data-[icon]:size-12 data-[variant=link]:h-[22px] data-[variant=link]:px-0 [&_svg]:size-5\",\n }\n },\n compoundVariants: [\n // Default Color Variants\n {\n variant: \"primary\",\n color: \"default\",\n className: \"bg-gradient-buttons-gradient-blue text-text-primary-on-brand\"\n },\n {\n variant: \"secondary\",\n color: \"default\",\n className: \"bg-bg-primary text-text-secondary [&_svg]:text-fg-secondary border-border-primary-icon hover:bg-bg-brand-solid hover:border-border-white hover:text-text-primary-on-brand hover:[&_svg]:text-fg-white\"\n },\n {\n variant: \"secondary-accent\",\n color: \"default\",\n className: \"border-1 border-border-primary-icon text-fg-primary hover:bg-bg-brand-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"default\",\n className: \"text-text-tertiary [&_svg]:text-fg-quaternary hover:bg-bg-primary-hover hover:text-text-tertiary-hover hover:[&_svg]:text-fg-quaternary-hover\"\n },\n {\n variant: \"tertiary-accent\",\n color: \"default\",\n className: \"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n {\n variant: \"link\",\n color: \"default\",\n className: \"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n\n // Destructive Color Variants\n {\n variant: \"primary\",\n color: \"destructive\",\n className: \"bg-bg-error-solid text-text-primary-on-brand\"\n },\n {\n variant: \"secondary\",\n color: \"destructive\",\n className: \"bg-bg-primary text-text-error-primary [&_svg]:text-fg-error-secondary border-border-error hover:bg-bg-error-primary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-secondary\"\n },\n {\n // Not existing in design system yet\n variant: \"secondary-accent\",\n color: \"destructive\",\n className: \"border-1 border-border-error text-fg-error-primary hover:bg-bg-error-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"destructive\",\n className: \"text-text-error-primary [&_svg]:text-fg-error-secondary hover:bg-bg-error-primary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary\"\n },\n {\n // Not existing in design system yet\n variant: \"tertiary-accent\",\n color: \"destructive\",\n className: \"bg-bg-error-primary text-text-error-tertiary [&_svg]:text-fg-error-secondary hover:bg-bg-error-secondary hover:text-text-error-tertiary hover:[&_svg]:text-fg-error-secondary-hover\"\n },\n {\n variant: \"link\",\n color: \"destructive\",\n className: \"text-text-error-secondary [&_svg]:text-fg-error-secondary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary\"\n },\n\n // Gradient AI\n {\n variant: \"primary\",\n color: \"gradient-ai\",\n className: \"bg-gradient-buttons-button-ai text-text-primary-on-brand\"\n },\n {\n variant: \"secondary\",\n color: \"gradient-ai\",\n className: \"relative shadow-transparent border-transparent hover:bg-bg-primary bg-[linear-gradient(90deg,var(--color-bg-primary),var(--color-bg-primary)),var(--gradient-buttons-button-ai)] [background-clip:padding-box,border-box] [background-origin:padding-box,border-box] [&>span]:bg-gradient-buttons-button-ai [&>span]:bg-clip-text [&>span]:text-transparent after:absolute after:inset-0 after:rounded-md hover:after:bg-gradient-buttons-button-ai hover:after:opacity-10 disabled:hover:after:bg-transparent disabled:after:opacity-0 disabled:[&>span]:bg-none disabled:[&>span]:text-fg-disabled\"\n },\n {\n // Not existing in design system yet\n variant: \"secondary-accent\",\n color: \"gradient-ai\",\n className: \"border-1 border-border-brand text-fg-brand-primary hover:bg-bg-brand-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"gradient-ai\",\n className: \"relative [&>span]:bg-gradient-buttons-button-ai [&>span]:bg-clip-text [&>span]:text-transparent after:absolute after:inset-0 after:rounded-md hover:after:bg-gradient-buttons-button-ai hover:after:opacity-10 disabled:hover:after:bg-transparent disabled:after:opacity-0 disabled:[&>span]:bg-none disabled:[&>span]:text-fg-disabled\"\n },\n {\n // Not existing in design system yet\n variant: \"tertiary-accent\",\n color: \"gradient-ai\",\n className: \"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n {\n // Not existing in design system yet\n variant: \"link\",\n color: \"gradient-ai\",\n className: \"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n\n // Linear Green Color Variants\n {\n variant: \"primary\",\n color: \"linear-green\",\n className: \"bg-gradient-buttons-gradient-green text-text-primary-on-brand\"\n },\n {\n variant: \"secondary\",\n color: \"linear-green\",\n className: \"bg-bg-primary text-text-secondary [&_svg]:text-green-500 border-border-primary hover:text-text-secondary-hover hover:[&_svg]:text-green-900\"\n },\n {\n // Not existing in design system yet\n variant: \"secondary-accent\",\n color: \"linear-green\",\n className: \"border-1 border-border-primary text-fg-primary hover:bg-bg-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"linear-green\",\n className: \"text-text-success-primary [&_svg]:text-green-500 hover:bg-bg-success-primary hover:[&_svg]:text-green-900\"\n },\n {\n // Not existing in design system yet\n variant: \"tertiary-accent\",\n color: \"linear-green\",\n className: \"bg-bg-success-primary text-text-success-tertiary [&_svg]:text-fg-success-secondary hover:bg-bg-success-secondary hover:text-text-success-tertiary hover:[&_svg]:text-fg-success-secondary-hover\"\n },\n {\n // Not existing in design system yet\n variant: \"link\",\n color: \"linear-green\",\n className: \"text-text-success-secondary [&_svg]:text-fg-success-secondary hover:text-text-success-primary-hover hover:[&_svg]:text-fg-success-primary\"\n },\n\n // Linear Overlay Color Variants\n {\n variant: \"primary\",\n color: \"linear-overlay\",\n className: \"relative bg-bg-brand-solid text-text-primary-on-brand [&_svg]:text-button-primary-icon hover:[&_svg]:text-button-primary-icon-hover after:absolute after:inset-0 after:rounded-xp-buttons after:bg-gradient-skuemorphic-gradient-border after:hover:bg-gradient-skuemorphic-gradient-border\"\n },\n {\n variant: \"secondary\",\n color: \"linear-overlay\",\n className: \"bg-bg-brand-solid-hover text-text-secondary [&_svg]:text-fg-quaternary border-border-primary hover:bg-bg-primary-hover hover:text-text-secondary-hover hover:[&_svg]:text-text-quaternary-hover\"\n },\n {\n variant: \"secondary-accent\",\n color: \"linear-overlay\",\n className: \"border-1 border-border-brand text-fg-brand-primary hover:bg-bg-brand-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"linear-overlay\",\n className: \"text-text-tertiary [&_svg]:text-fg-quaternary hover:bg-bg-primary-hover hover:text-text-tertiary-hover hover:[&_svg]:text-fg-quaternary-hover\"\n },\n {\n variant: \"tertiary-accent\",\n color: \"linear-overlay\",\n className: \"bg-bg-brand-primary text-text-brand-tertiary [&_svg]:text-fg-brand-secondary hover:bg-bg-brand-secondary hover:text-text-brand-tertiary hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n {\n variant: \"link\",\n color: \"linear-overlay\",\n className: \"text-text-brand-secondary [&_svg]:text-fg-brand-secondary-alt hover:text-text-brand-secondary-hover hover:[&_svg]:text-fg-brand-secondary-hover\"\n },\n\n // Linear Destructive Color Variants\n {\n variant: \"primary\",\n color: \"linear-destructive\",\n className: \"relative bg-bg-error-solid text-text-primary-on-brand [&_svg]:text-button-destructive-primary-icon hover:[&_svg]:text-button-destructive-primary-icon-hover after:absolute after:inset-0 after:rounded-xp-buttons after:bg-gradient-skuemorphic-gradient-border after:hover:bg-gradient-skuemorphic-gradient-border\"\n },\n {\n variant: \"secondary\",\n color: \"linear-destructive\",\n className: \"bg-bg-error-solid-hover text-text-secondary [&_svg]:text-fg-quaternary border-border-primary hover:bg-bg-primary-hover hover:text-text-secondary-hover hover:[&_svg]:text-text-quaternary-hover\"\n },\n {\n // Not existing in design system yet\n variant: \"secondary-accent\",\n color: \"linear-destructive\",\n className: \"border-1 border-border-error text-fg-error-primary hover:bg-bg-error-primary\"\n },\n {\n variant: \"tertiary\",\n color: \"linear-destructive\",\n className: \"text-text-error-primary [&_svg]:text-fg-error-secondary hover:bg-bg-error-primary hover:text-text-tertiary-hover hover:[&_svg]:text-fg-error-secondary\"\n },\n {\n // Not existing in design system yet\n variant: \"tertiary-accent\",\n color: \"linear-destructive\",\n className: \"bg-bg-error-primary text-text-error-tertiary [&_svg]:text-fg-error-secondary hover:bg-bg-error-secondary hover:text-text-error-tertiary hover:[&_svg]:text-fg-error-secondary-hover\"\n },\n {\n variant: \"link\",\n color: \"linear-destructive\",\n className: \"text-text-error-primary [&_svg]:text-fg-error-secondary hover:text-text-error-primary-hover hover:[&_svg]:text-fg-error-primary\"\n },\n ],\n defaultVariants: {\n variant: \"primary\",\n color: \"default\",\n size: \"sm\",\n },\n }\n)\n\nfunction Button({\n className,\n color,\n variant,\n size,\n loading = false,\n children,\n disabled,\n icon,\n nativeButton,\n render,\n ...props\n}: ButtonPrimitive.Props &\n VariantProps<typeof buttonVariants> & {\n loading?: boolean\n }) {\n // ponytail: auto-detect nativeButton when render is provided\n const resolvedNativeButton = render != null ? false : nativeButton\n\n return (\n <ButtonPrimitive\n className={cn(buttonVariants({ color, variant, size, className }))}\n data-icon={icon ? \"\" : undefined}\n data-variant={variant}\n disabled={disabled || loading}\n nativeButton={resolvedNativeButton}\n render={render}\n {...props}\n >\n {loading ? (\n <>\n <Loader2 className=\"size-4 animate-spin\" />\n <span>Loading...</span>\n </>\n ) : (\n children\n )}\n </ButtonPrimitive>\n )\n}\n\nexport { Button, buttonVariants }"]}