@adamosuiteservices/ui 2.18.5 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +1 -1
  2. package/dist/accordion-rounded.cjs +8 -8
  3. package/dist/accordion-rounded.js +12 -12
  4. package/dist/alert.cjs +32 -23
  5. package/dist/alert.js +53 -43
  6. package/dist/amount-input.cjs +8 -0
  7. package/dist/amount-input.js +191 -0
  8. package/dist/avatar.cjs +7 -7
  9. package/dist/avatar.js +18 -18
  10. package/dist/badge.cjs +24 -28
  11. package/dist/badge.js +45 -42
  12. package/dist/breadcrumb.cjs +2 -3
  13. package/dist/breadcrumb.js +16 -17
  14. package/dist/button-CXFZVTXF.cjs +87 -0
  15. package/dist/button-dT8nqgU3.js +156 -0
  16. package/dist/button-group.cjs +1 -1
  17. package/dist/button-group.js +1 -1
  18. package/dist/button.cjs +1 -1
  19. package/dist/button.js +1 -1
  20. package/dist/{calendar-xBaFu2sB.js → calendar-6NvJv-sP.js} +238 -239
  21. package/dist/{calendar-Dorq3-wv.cjs → calendar-B8S5a0TG.cjs} +20 -22
  22. package/dist/calendar.cjs +1 -1
  23. package/dist/calendar.js +1 -1
  24. package/dist/card.cjs +3 -3
  25. package/dist/card.js +4 -4
  26. package/dist/checkbox-BBlvCoB1.cjs +24 -0
  27. package/dist/{checkbox-DL_jFvgl.js → checkbox-BuzBXARX.js} +54 -52
  28. package/dist/checkbox.cjs +1 -1
  29. package/dist/checkbox.js +1 -1
  30. package/dist/colors.css +1 -1
  31. package/dist/combobox-B002BLsg.js +692 -0
  32. package/dist/combobox-B2BkUl7v.cjs +57 -0
  33. package/dist/combobox.cjs +1 -1
  34. package/dist/combobox.js +1 -1
  35. package/dist/components/layout/sidebar/sidebar.d.ts +2 -1
  36. package/dist/components/layout/toaster/toaster.d.ts +1 -1
  37. package/dist/components/ui/alert/alert.d.ts +1 -1
  38. package/dist/components/ui/amount-input/amount-input.d.ts +32 -0
  39. package/dist/components/ui/amount-input/index.d.ts +1 -0
  40. package/dist/components/ui/badge/badge.d.ts +3 -2
  41. package/dist/components/ui/calendar/calendar.d.ts +1 -1
  42. package/dist/components/ui/combobox/combobox.d.ts +3 -1
  43. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +3 -1
  44. package/dist/components/ui/selectable-card/index.d.ts +1 -0
  45. package/dist/components/ui/selectable-card/selectable-card.d.ts +22 -0
  46. package/dist/components/ui/timeline/index.d.ts +1 -0
  47. package/dist/components/ui/timeline/timeline.d.ts +30 -0
  48. package/dist/components/ui/typography/typography.d.ts +1 -1
  49. package/dist/context-menu.cjs +18 -19
  50. package/dist/context-menu.js +36 -37
  51. package/dist/date-picker-selector.cjs +1 -1
  52. package/dist/date-picker-selector.js +3 -3
  53. package/dist/dialog.cjs +7 -9
  54. package/dist/dialog.js +36 -38
  55. package/dist/dropdown-menu.cjs +57 -36
  56. package/dist/dropdown-menu.js +205 -172
  57. package/dist/field.cjs +12 -7
  58. package/dist/field.js +51 -45
  59. package/dist/file-upload-v2.cjs +11 -5
  60. package/dist/file-upload-v2.js +75 -60
  61. package/dist/file-upload.cjs +11 -5
  62. package/dist/file-upload.js +117 -109
  63. package/dist/index-BBT2EGq8.js +18 -0
  64. package/dist/index-DCsgSkBj.cjs +1 -0
  65. package/dist/input-8sEO5zwD.js +44 -0
  66. package/dist/input-AONeSXcs.cjs +22 -0
  67. package/dist/input-group-13VFVAxD.cjs +86 -0
  68. package/dist/input-group-D4S18xiq.js +240 -0
  69. package/dist/input-group.cjs +1 -84
  70. package/dist/input-group.js +7 -234
  71. package/dist/input-otp.cjs +5 -7
  72. package/dist/input-otp.js +58 -60
  73. package/dist/input.cjs +1 -1
  74. package/dist/input.js +1 -1
  75. package/dist/kbd.cjs +6 -7
  76. package/dist/kbd.js +14 -15
  77. package/dist/{label-DqfX9cHc.cjs → label-B7Z1D5-Q.cjs} +5 -4
  78. package/dist/{label-C6zVnc3d.js → label-_BWRIH7C.js} +14 -13
  79. package/dist/label.cjs +1 -1
  80. package/dist/label.js +1 -1
  81. package/dist/pagination.cjs +5 -5
  82. package/dist/pagination.js +18 -18
  83. package/dist/radio-group.cjs +12 -9
  84. package/dist/radio-group.js +65 -62
  85. package/dist/select.cjs +18 -16
  86. package/dist/select.js +17 -15
  87. package/dist/selectable-card.cjs +29 -0
  88. package/dist/selectable-card.js +129 -0
  89. package/dist/separator-DXdc7LcC.cjs +7 -0
  90. package/dist/{separator-CsaqP20m.js → separator-DZfXXbNt.js} +1 -1
  91. package/dist/separator.cjs +1 -1
  92. package/dist/separator.js +1 -1
  93. package/dist/{sheet-C9vce0ut.js → sheet-DNwg4a6M.js} +8 -5
  94. package/dist/{sheet-Cnq7TCzu.cjs → sheet-va7o2x0w.cjs} +10 -10
  95. package/dist/sheet.cjs +1 -1
  96. package/dist/sheet.js +1 -1
  97. package/dist/sidebar.cjs +10 -10
  98. package/dist/sidebar.js +83 -92
  99. package/dist/slider.cjs +1 -1
  100. package/dist/slider.js +1 -1
  101. package/dist/styles.css +1 -1
  102. package/dist/switch.cjs +2 -4
  103. package/dist/switch.js +71 -73
  104. package/dist/table.cjs +14 -14
  105. package/dist/table.js +12 -12
  106. package/dist/tabs-underline.cjs +11 -15
  107. package/dist/tabs-underline.js +20 -24
  108. package/dist/tabs.cjs +10 -14
  109. package/dist/tabs.js +20 -24
  110. package/dist/tailwind-colors.css +1 -1
  111. package/dist/tailwind-theme.css +1 -1
  112. package/dist/textarea-BSooGyp-.cjs +18 -0
  113. package/dist/textarea-D_sj6ivo.js +39 -0
  114. package/dist/textarea.cjs +1 -1
  115. package/dist/textarea.js +1 -1
  116. package/dist/themes.css +1 -1
  117. package/dist/timeline.cjs +4 -0
  118. package/dist/timeline.js +189 -0
  119. package/dist/toaster.cjs +5 -4
  120. package/dist/toaster.js +33 -32
  121. package/dist/toggle.cjs +4 -4
  122. package/dist/toggle.js +17 -17
  123. package/dist/tooltip.cjs +5 -6
  124. package/dist/tooltip.js +4 -5
  125. package/docs/components/layout/sidebar.md +81 -53
  126. package/docs/components/layout/toaster.md +35 -55
  127. package/docs/components/ui/accordion-rounded.md +12 -11
  128. package/docs/components/ui/alert.md +66 -36
  129. package/docs/components/ui/amount-input.md +229 -0
  130. package/docs/components/ui/avatar.md +28 -32
  131. package/docs/components/ui/badge.md +85 -32
  132. package/docs/components/ui/breadcrumb.md +5 -7
  133. package/docs/components/ui/button-group.md +16 -16
  134. package/docs/components/ui/button.md +23 -36
  135. package/docs/components/ui/calendar.md +54 -27
  136. package/docs/components/ui/card.md +5 -4
  137. package/docs/components/ui/checkbox.md +3 -3
  138. package/docs/components/ui/combobox.md +35 -1
  139. package/docs/components/ui/command.md +7 -7
  140. package/docs/components/ui/context-menu.md +14 -15
  141. package/docs/components/ui/date-picker-selector.md +31 -31
  142. package/docs/components/ui/dialog.md +47 -49
  143. package/docs/components/ui/dropdown-menu.md +34 -37
  144. package/docs/components/ui/field.md +25 -31
  145. package/docs/components/ui/file-upload-v2.md +11 -0
  146. package/docs/components/ui/file-upload.md +105 -108
  147. package/docs/components/ui/hover-card.md +28 -6
  148. package/docs/components/ui/icon.md +10 -9
  149. package/docs/components/ui/input-group.md +9 -9
  150. package/docs/components/ui/input.md +30 -33
  151. package/docs/components/ui/kbd.md +10 -9
  152. package/docs/components/ui/label.md +6 -6
  153. package/docs/components/ui/pagination.md +3 -3
  154. package/docs/components/ui/popover.md +1 -0
  155. package/docs/components/ui/progress.md +3 -3
  156. package/docs/components/ui/radio-group.md +18 -6
  157. package/docs/components/ui/scroll-area.md +4 -4
  158. package/docs/components/ui/select.md +14 -12
  159. package/docs/components/ui/selectable-card.md +204 -0
  160. package/docs/components/ui/separator.md +4 -4
  161. package/docs/components/ui/sheet.md +21 -3
  162. package/docs/components/ui/slider.md +3 -3
  163. package/docs/components/ui/switch.md +7 -7
  164. package/docs/components/ui/table.md +7 -4
  165. package/docs/components/ui/tabs-underline.md +36 -36
  166. package/docs/components/ui/tabs.md +6 -4
  167. package/docs/components/ui/textarea.md +6 -4
  168. package/docs/components/ui/timeline.md +214 -0
  169. package/docs/components/ui/toggle.md +1 -1
  170. package/docs/components/ui/tooltip.md +3 -3
  171. package/llm.txt +7 -4
  172. package/package.json +13 -1
  173. package/dist/button-BnUlAtuD.js +0 -132
  174. package/dist/button-CFJs0esR.cjs +0 -63
  175. package/dist/checkbox-3RIZX2HF.cjs +0 -22
  176. package/dist/combobox-MkeJiTXj.js +0 -637
  177. package/dist/combobox-jJRxvUsB.cjs +0 -40
  178. package/dist/input-BCiOr4Fy.js +0 -44
  179. package/dist/input-Bz5k4w94.cjs +0 -22
  180. package/dist/separator-CCGaTo09.cjs +0 -7
  181. package/dist/textarea-BRCnIxdB.js +0 -33
  182. package/dist/textarea-DkFUS_oS.cjs +0 -14
@@ -1,40 +0,0 @@
1
- "use client";"use strict";const h=require("./jsx-runtime-BB_1_6y_.cjs"),Pe=require("./button-CFJs0esR.cjs"),$e=require("./checkbox-3RIZX2HF.cjs"),le=require("./icon-B7joBr0A.cjs"),P=require("./index-DoxiiusW.cjs"),H=require("react"),de=require("./index-Ca99LLZF.cjs"),z=require("./index-CocSS1YK.cjs"),Y=require("./index-WIv2ndLu.cjs"),ie=require("./index-_XxjJPRD.cjs"),fe=require("./popover-cGp_rNLg.cjs");function qe(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const x=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,x.get?x:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const l=qe(H);var ye=1,Me=.9,De=.8,ze=.17,pe=.1,xe=.999,Fe=.9999,Ve=.99,Te=/[\\\/_+.#"@\[\(\{&]/,Ke=/[\\\/_+.#"@\[\(\{&]/g,Oe=/[\s-]/,Re=/[\s-]/g;function ve(e,n,r,x,o,d,m){if(d===n.length)return o===e.length?ye:Ve;var p=`${o},${d}`;if(m[p]!==void 0)return m[p];for(var E=x.charAt(d),u=r.indexOf(E,o),y=0,c,w,S,L;u>=0;)c=ve(e,n,r,x,u+1,d+1,m),c>y&&(u===o?c*=ye:Te.test(e.charAt(u-1))?(c*=De,S=e.slice(o,u-1).match(Ke),S&&o>0&&(c*=Math.pow(xe,S.length))):Oe.test(e.charAt(u-1))?(c*=Me,L=e.slice(o,u-1).match(Re),L&&o>0&&(c*=Math.pow(xe,L.length))):(c*=ze,o>0&&(c*=Math.pow(xe,u-o))),e.charAt(u)!==n.charAt(d)&&(c*=Fe)),(c<pe&&r.charAt(u-1)===x.charAt(d+1)||x.charAt(d+1)===x.charAt(d)&&r.charAt(u-1)!==x.charAt(d))&&(w=ve(e,n,r,x,u+1,d+2,m),w*pe>c&&(c=w*pe)),c>y&&(y=c),u=r.indexOf(E,u+1);return m[p]=y,y}function Ee(e){return e.toLowerCase().replace(Re," ")}function _e(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,ve(e,n,Ee(e),Ee(n),0,0,{})}var ae='[cmdk-group=""]',he='[cmdk-group-items=""]',We='[cmdk-group-heading=""]',we='[cmdk-item=""]',je=`${we}:not([aria-disabled="true"])`,ge="cmdk-item-select",J="data-value",Be=(e,n,r)=>_e(e,n,r),Ie=l.createContext(void 0),oe=()=>l.useContext(Ie),Se=l.createContext(void 0),be=()=>l.useContext(Se),ke=l.createContext(void 0),Ce=l.forwardRef((e,n)=>{let r=X(()=>{var t,s;return{search:"",value:(s=(t=e.value)!=null?t:e.defaultValue)!=null?s:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),x=X(()=>new Set),o=X(()=>new Map),d=X(()=>new Map),m=X(()=>new Set),p=Ae(e),{label:E,children:u,value:y,onValueChange:c,filter:w,shouldFilter:S,loop:L,disablePointerSelection:F=!1,vimBindings:N=!0,...k}=e,O=Y.useId(),V=Y.useId(),_=Y.useId(),$=l.useRef(null),R=rt();K(()=>{if(y!==void 0){let t=y.trim();r.current.value=t,f.emit()}},[y]),K(()=>{R(6,B)},[]);let f=l.useMemo(()=>({subscribe:t=>(m.current.add(t),()=>m.current.delete(t)),snapshot:()=>r.current,setState:(t,s,v)=>{var i,g,j,a;if(!Object.is(r.current[t],s)){if(r.current[t]=s,t==="search")Z(),ue(),R(1,C);else if(t==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let b=document.getElementById(_);b?b.focus():(i=document.getElementById(O))==null||i.focus()}if(R(7,()=>{var b;r.current.selectedItemId=(b=A())==null?void 0:b.id,f.emit()}),v||R(5,B),((g=p.current)==null?void 0:g.value)!==void 0){let b=s??"";(a=(j=p.current).onValueChange)==null||a.call(j,b);return}}f.emit()}},emit:()=>{m.current.forEach(t=>t())}}),[]),W=l.useMemo(()=>({value:(t,s,v)=>{var i;s!==((i=d.current.get(t))==null?void 0:i.value)&&(d.current.set(t,{value:s,keywords:v}),r.current.filtered.items.set(t,q(s,v)),R(2,()=>{ue(),f.emit()}))},item:(t,s)=>(x.current.add(t),s&&(o.current.has(s)?o.current.get(s).add(t):o.current.set(s,new Set([t]))),R(3,()=>{Z(),ue(),r.current.value||C(),f.emit()}),()=>{d.current.delete(t),x.current.delete(t),r.current.filtered.items.delete(t);let v=A();R(4,()=>{Z(),v?.getAttribute("id")===t&&C(),f.emit()})}),group:t=>(o.current.has(t)||o.current.set(t,new Set),()=>{d.current.delete(t),o.current.delete(t)}),filter:()=>p.current.shouldFilter,label:E||e["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:O,inputId:_,labelId:V,listInnerRef:$}),[]);function q(t,s){var v,i;let g=(i=(v=p.current)==null?void 0:v.filter)!=null?i:Be;return t?g(t,r.current.search,s):0}function ue(){if(!r.current.search||p.current.shouldFilter===!1)return;let t=r.current.filtered.items,s=[];r.current.filtered.groups.forEach(i=>{let g=o.current.get(i),j=0;g.forEach(a=>{let b=t.get(a);j=Math.max(b,j)}),s.push([i,j])});let v=$.current;M().sort((i,g)=>{var j,a;let b=i.getAttribute("id"),I=g.getAttribute("id");return((j=t.get(I))!=null?j:0)-((a=t.get(b))!=null?a:0)}).forEach(i=>{let g=i.closest(he);g?g.appendChild(i.parentElement===g?i:i.closest(`${he} > *`)):v.appendChild(i.parentElement===v?i:i.closest(`${he} > *`))}),s.sort((i,g)=>g[1]-i[1]).forEach(i=>{var g;let j=(g=$.current)==null?void 0:g.querySelector(`${ae}[${J}="${encodeURIComponent(i[0])}"]`);j?.parentElement.appendChild(j)})}function C(){let t=M().find(v=>v.getAttribute("aria-disabled")!=="true"),s=t?.getAttribute(J);f.setState("value",s||void 0)}function Z(){var t,s,v,i;if(!r.current.search||p.current.shouldFilter===!1){r.current.filtered.count=x.current.size;return}r.current.filtered.groups=new Set;let g=0;for(let j of x.current){let a=(s=(t=d.current.get(j))==null?void 0:t.value)!=null?s:"",b=(i=(v=d.current.get(j))==null?void 0:v.keywords)!=null?i:[],I=q(a,b);r.current.filtered.items.set(j,I),I>0&&g++}for(let[j,a]of o.current)for(let b of a)if(r.current.filtered.items.get(b)>0){r.current.filtered.groups.add(j);break}r.current.filtered.count=g}function B(){var t,s,v;let i=A();i&&(((t=i.parentElement)==null?void 0:t.firstChild)===i&&((v=(s=i.closest(ae))==null?void 0:s.querySelector(We))==null||v.scrollIntoView({block:"nearest"})),i.scrollIntoView({block:"nearest"}))}function A(){var t;return(t=$.current)==null?void 0:t.querySelector(`${we}[aria-selected="true"]`)}function M(){var t;return Array.from(((t=$.current)==null?void 0:t.querySelectorAll(je))||[])}function ee(t){let s=M()[t];s&&f.setState("value",s.getAttribute(J))}function G(t){var s;let v=A(),i=M(),g=i.findIndex(a=>a===v),j=i[g+t];(s=p.current)!=null&&s.loop&&(j=g+t<0?i[i.length-1]:g+t===i.length?i[0]:i[g+t]),j&&f.setState("value",j.getAttribute(J))}function te(t){let s=A(),v=s?.closest(ae),i;for(;v&&!i;)v=t>0?et(v,ae):tt(v,ae),i=v?.querySelector(je);i?f.setState("value",i.getAttribute(J)):G(t)}let U=()=>ee(M().length-1),se=t=>{t.preventDefault(),t.metaKey?U():t.altKey?te(1):G(1)},re=t=>{t.preventDefault(),t.metaKey?ee(0):t.altKey?te(-1):G(-1)};return l.createElement(z.Primitive.div,{ref:n,tabIndex:-1,...k,"cmdk-root":"",onKeyDown:t=>{var s;(s=k.onKeyDown)==null||s.call(k,t);let v=t.nativeEvent.isComposing||t.keyCode===229;if(!(t.defaultPrevented||v))switch(t.key){case"n":case"j":{N&&t.ctrlKey&&se(t);break}case"ArrowDown":{se(t);break}case"p":case"k":{N&&t.ctrlKey&&re(t);break}case"ArrowUp":{re(t);break}case"Home":{t.preventDefault(),ee(0);break}case"End":{t.preventDefault(),U();break}case"Enter":{t.preventDefault();let i=A();if(i){let g=new Event(ge);i.dispatchEvent(g)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:W.inputId,id:W.labelId,style:at},E),me(e,t=>l.createElement(Se.Provider,{value:f},l.createElement(Ie.Provider,{value:W},t))))}),Ge=l.forwardRef((e,n)=>{var r,x;let o=Y.useId(),d=l.useRef(null),m=l.useContext(ke),p=oe(),E=Ae(e),u=(x=(r=E.current)==null?void 0:r.forceMount)!=null?x:m?.forceMount;K(()=>{if(!u)return p.item(o,m?.id)},[u]);let y=Le(o,d,[e.value,e.children,d],e.keywords),c=be(),w=D(R=>R.value&&R.value===y.current),S=D(R=>u||p.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);l.useEffect(()=>{let R=d.current;if(!(!R||e.disabled))return R.addEventListener(ge,L),()=>R.removeEventListener(ge,L)},[S,e.onSelect,e.disabled]);function L(){var R,f;F(),(f=(R=E.current).onSelect)==null||f.call(R,y.current)}function F(){c.setState("value",y.current,!0)}if(!S)return null;let{disabled:N,value:k,onSelect:O,forceMount:V,keywords:_,...$}=e;return l.createElement(z.Primitive.div,{ref:ie.composeRefs(d,n),...$,id:o,"cmdk-item":"",role:"option","aria-disabled":!!N,"aria-selected":!!w,"data-disabled":!!N,"data-selected":!!w,onPointerMove:N||p.getDisablePointerSelection()?void 0:F,onClick:N?void 0:L},e.children)}),Ue=l.forwardRef((e,n)=>{let{heading:r,children:x,forceMount:o,...d}=e,m=Y.useId(),p=l.useRef(null),E=l.useRef(null),u=Y.useId(),y=oe(),c=D(S=>o||y.filter()===!1?!0:S.search?S.filtered.groups.has(m):!0);K(()=>y.group(m),[]),Le(m,p,[e.value,e.heading,E]);let w=l.useMemo(()=>({id:m,forceMount:o}),[o]);return l.createElement(z.Primitive.div,{ref:ie.composeRefs(p,n),...d,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},r&&l.createElement("div",{ref:E,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),me(e,S=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},l.createElement(ke.Provider,{value:w},S))))}),He=l.forwardRef((e,n)=>{let{alwaysRender:r,...x}=e,o=l.useRef(null),d=D(m=>!m.search);return!r&&!d?null:l.createElement(z.Primitive.div,{ref:ie.composeRefs(o,n),...x,"cmdk-separator":"",role:"separator"})}),Je=l.forwardRef((e,n)=>{let{onValueChange:r,...x}=e,o=e.value!=null,d=be(),m=D(u=>u.search),p=D(u=>u.selectedItemId),E=oe();return l.useEffect(()=>{e.value!=null&&d.setState("search",e.value)},[e.value]),l.createElement(z.Primitive.input,{ref:n,...x,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":E.listId,"aria-labelledby":E.labelId,"aria-activedescendant":p,id:E.inputId,type:"text",value:o?e.value:m,onChange:u=>{o||d.setState("search",u.target.value),r?.(u.target.value)}})}),Xe=l.forwardRef((e,n)=>{let{children:r,label:x="Suggestions",...o}=e,d=l.useRef(null),m=l.useRef(null),p=D(u=>u.selectedItemId),E=oe();return l.useEffect(()=>{if(m.current&&d.current){let u=m.current,y=d.current,c,w=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let S=u.offsetHeight;y.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return w.observe(u),()=>{cancelAnimationFrame(c),w.unobserve(u)}}},[]),l.createElement(z.Primitive.div,{ref:ie.composeRefs(d,n),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":x,id:E.listId},me(e,u=>l.createElement("div",{ref:ie.composeRefs(m,E.listInnerRef),"cmdk-list-sizer":""},u)))}),Ye=l.forwardRef((e,n)=>{let{open:r,onOpenChange:x,overlayClassName:o,contentClassName:d,container:m,...p}=e;return l.createElement(de.Root,{open:r,onOpenChange:x},l.createElement(de.Portal,{container:m},l.createElement(de.Overlay,{"cmdk-overlay":"",className:o}),l.createElement(de.Content,{"aria-label":e.label,"cmdk-dialog":"",className:d},l.createElement(Ce,{ref:n,...p}))))}),Qe=l.forwardRef((e,n)=>D(r=>r.filtered.count===0)?l.createElement(z.Primitive.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),Ze=l.forwardRef((e,n)=>{let{progress:r,children:x,label:o="Loading...",...d}=e;return l.createElement(z.Primitive.div,{ref:n,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},me(e,m=>l.createElement("div",{"aria-hidden":!0},m)))}),Q=Object.assign(Ce,{List:Xe,Item:Ge,Input:Je,Group:Ue,Separator:He,Dialog:Ye,Empty:Qe,Loading:Ze});function et(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function tt(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function Ae(e){let n=l.useRef(e);return K(()=>{n.current=e}),n}var K=typeof window>"u"?l.useEffect:l.useLayoutEffect;function X(e){let n=l.useRef();return n.current===void 0&&(n.current=e()),n}function D(e){let n=be(),r=()=>e(n.snapshot());return l.useSyncExternalStore(n.subscribe,r,r)}function Le(e,n,r,x=[]){let o=l.useRef(),d=oe();return K(()=>{var m;let p=(()=>{var u;for(let y of r){if(typeof y=="string")return y.trim();if(typeof y=="object"&&"current"in y)return y.current?(u=y.current.textContent)==null?void 0:u.trim():o.current}})(),E=x.map(u=>u.trim());d.value(e,p,E),(m=n.current)==null||m.setAttribute(J,p),o.current=p}),o}var rt=()=>{let[e,n]=l.useState(),r=X(()=>new Map);return K(()=>{r.current.forEach(x=>x()),r.current=new Map},[e]),(x,o)=>{r.current.set(x,o),n({})}};function nt(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function me({asChild:e,children:n},r){return e&&l.isValidElement(n)?l.cloneElement(nt(n),{ref:n.ref},r(n.props.children)):r(n)}var at={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function lt({className:e,...n}){return h.jsxRuntimeExports.jsx(Q,{"data-slot":"command",className:P.cn(`
2
- adm:flex adm:h-full adm:w-full adm:flex-col adm:overflow-hidden
3
- adm:rounded-md adm:bg-popover adm:text-popover-foreground
4
- `,e),...n})}function it({className:e,...n}){return h.jsxRuntimeExports.jsxs("div",{"data-slot":"command-input-wrapper",className:`
5
- adm:flex adm:h-10 adm:items-center adm:gap-2
6
- adm:rounded-t-[calc(var(--radius)-1px)] adm:border-b adm:px-3
7
- adm:*:data-[slot=icon]:shrink-0 adm:*:data-[slot=icon]:text-lg
8
- adm:*:data-[slot=icon]:opacity-50
9
- `,children:[h.jsxRuntimeExports.jsx(le.Icon,{symbol:"search"}),h.jsxRuntimeExports.jsx(Q.Input,{"data-slot":"command-input",className:P.cn(`
10
- adm:flex adm:h-10 adm:w-full adm:rounded-md adm:bg-transparent
11
- adm:py-3 adm:text-sm adm:outline-hidden
12
- adm:placeholder:text-muted-foreground
13
- adm:disabled:cursor-not-allowed adm:disabled:opacity-50
14
- `,e),...n})]})}function ot({className:e,...n}){return h.jsxRuntimeExports.jsx(Q.List,{"data-slot":"command-list",className:P.cn(`
15
- adm:max-h-[300px] adm:scroll-py-1 adm:overflow-x-hidden
16
- adm:overflow-y-auto
17
- `,e),...n})}function ut({className:e,...n}){return h.jsxRuntimeExports.jsx(Q.Empty,{"data-slot":"command-empty",className:P.cn("adm:py-6 adm:text-center adm:text-sm",e),...n})}function st({className:e,...n}){return h.jsxRuntimeExports.jsx(Q.Group,{"data-slot":"command-group",className:P.cn(`
18
- adm:overflow-hidden adm:text-foreground
19
- adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:px-2
20
- adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:py-1.5
21
- adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:text-xs
22
- adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:font-medium
23
- adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:text-muted-foreground
24
- adm:[&_[data-slot=command-item]:last-of-type]:rounded-b-[calc(var(--radius)-1px)]
25
- adm:[&_[data-slot=command-item]:last-of-type]:border-b-0
26
- `,e),...n})}function ct({className:e,...n}){return h.jsxRuntimeExports.jsx(Q.Item,{"data-slot":"command-item",className:P.cn(`
27
- adm:relative adm:flex adm:h-10 adm:cursor-default adm:items-center
28
- adm:gap-2 adm:border-b adm:px-3 adm:text-sm adm:outline-hidden
29
- adm:select-none
30
- adm:data-[disabled=true]:pointer-events-none
31
- adm:data-[disabled=true]:opacity-50
32
- adm:data-[selected=true]:bg-accent
33
- adm:data-[selected=true]:text-accent-foreground
34
- adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
35
- adm:[&_svg:not([class*=size-])]:size-4
36
- adm:[&_svg:not([class*=text-])]:text-muted-foreground
37
- `,e),...n})}function dt({searchable:e,multiple:n,icon:r,value:x,onValueChange:o,labels:d,options:m,classNames:p,selectedFeedback:E="checkbox",alwaysShowPlaceholder:u=!1,valuePosition:y="right",renders:c,ref:w,"aria-invalid":S,disabled:L,searchBy:F="both",filter:N,exclusiveOption:k}){const O=H.useRef(null),[V,_]=H.useState(!1),[$,R]=H.useState(n?[]:""),f=x!==void 0?x:$,W=a=>k===a,q=H.useCallback(a=>{o?o(a):R(a)},[o]);H.useEffect(()=>{if(n&&k&&Array.isArray(f)&&f.length>1){const a=f.includes(k),b=f.filter(I=>I!==k);a&&b.length>0&&(console.warn(`Combobox: Initial value contains exclusive option "${k}" mixed with others. Auto-correcting to only exclusive option.`),q([k]))}k&&!m.find(a=>a.value===k)&&console.warn(`Combobox: exclusiveOption "${k}" not found in options. Exclusive behavior will be disabled.`)},[f,k,n,m,q]);const C={...{placeholder:"Select options...",searchPlaceholder:"Search options...",noItemsFound:"No options found.",multipleSelected:a=>`${a} options selected`},...d},Z=(a,b,I)=>{const T=b.toLowerCase().trim(),ce=a.toLowerCase().trim();return N?N(a,b,I):F==="label"&&I&&I.length>0?I[0].toLowerCase().trim().includes(T)?1:0:F==="value"?ce.includes(T)?1:0:F==="both"&&(I&&I.length>0&&I[0].toLowerCase().trim().includes(T)||ce.includes(T))?1:0},B=()=>n&&Array.isArray(f)?f.length===0?null:f.length===1?m.find(a=>a.value===f[0])?.label:C.multipleSelected?.(f.length)||`${f.length} options selected`:!n&&typeof f=="string"&&f?m.find(a=>a.value===f)?.label:null,A=()=>n&&Array.isArray(f)?f.length>0:typeof f=="string"&&f!=="",M=a=>n&&Array.isArray(f)?f.includes(a):f===a,ee=a=>{if(n){const b=Array.isArray(f)?f:[];if(b.includes(a)){const ne=b.filter(Ne=>Ne!==a);q(ne);return}if(W(a)){q([a]);return}const ce=[...b.filter(ne=>!W(ne)),a];q(ce)}else q(a===f?"":a),_(!1)},G=a=>{const b=M(a),I=m.find(T=>T.value===a);return c?.selectedFeedback?c.selectedFeedback({option:I,isSelected:b,type:E}):E==="check"?h.jsxRuntimeExports.jsx("span",{className:P.cn(`
38
- adm:absolute adm:right-2 adm:flex adm:size-3.5 adm:items-center
39
- adm:justify-center
40
- `,p?.check),children:b&&h.jsxRuntimeExports.jsx(le.Icon,{symbol:"check",className:"adm:text-lg"})}):h.jsxRuntimeExports.jsx($e.Checkbox,{checked:b,className:p?.checkbox})},te=()=>c?.placeholder?c.placeholder({text:C.placeholder||"",hasValue:A()}):h.jsxRuntimeExports.jsx("span",{className:"adm:opacity-70",children:C.placeholder}),U=()=>c?.displayValue?c.displayValue({text:B()??null,value:f}):h.jsxRuntimeExports.jsx("span",{children:B()}),se=()=>u?h.jsxRuntimeExports.jsxs("span",{className:"adm:flex adm:items-center adm:gap-2",children:[r&&h.jsxRuntimeExports.jsx(le.Icon,{symbol:r,className:"adm:opacity-50"}),te(),A()&&y==="left"&&U()]}):h.jsxRuntimeExports.jsxs("span",{className:"adm:flex adm:items-center adm:gap-2",children:[r&&h.jsxRuntimeExports.jsx(le.Icon,{symbol:r,className:"adm:opacity-50"}),A()?U():te()]}),re=()=>c?.triggerIcon?c.triggerIcon({open:V}):h.jsxRuntimeExports.jsx(le.Icon,{symbol:"expand_more",className:"adm:opacity-50"}),t=()=>u&&A()&&y==="right"?h.jsxRuntimeExports.jsxs("span",{className:"adm:flex adm:items-center adm:gap-2",children:[U(),re()]}):h.jsxRuntimeExports.jsx("span",{className:"adm:flex adm:items-center adm:gap-2",children:re()}),s=()=>c?.trigger?c.trigger({open:V,value:f,displayText:B()||"",placeholder:C.placeholder||"",hasValue:A(),icon:r}):h.jsxRuntimeExports.jsxs(Pe.Button,{ref:a=>{O.current=a,w&&(typeof w=="function"?w(a):w.current=a)},variant:"outline",role:"combobox","aria-expanded":V,"aria-invalid":S,disabled:L,className:P.cn("adm:justify-between adm:rounded-md adm:font-normal",p?.trigger),children:[se(),t()]}),v=()=>e?c?.searchInput?c.searchInput({placeholder:C.searchPlaceholder||""}):h.jsxRuntimeExports.jsx(it,{placeholder:C.searchPlaceholder,className:p?.input}):null,i=()=>c?.empty?c.empty({text:C.noItemsFound||""}):h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:C.noItemsFound}),g=a=>c?.optionLabel?c.optionLabel({option:a}):h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:a.label}),j=a=>c?.option?h.jsxRuntimeExports.jsx("div",{children:c.option({option:a,isSelected:M(a.value),selectedFeedback:E})},a.value):h.jsxRuntimeExports.jsxs(ct,{value:a.value,keywords:[a.label],onSelect:ee,disabled:a.disabled,className:P.cn(p?.item,E==="check"&&"adm:pr-10"),children:[E==="checkbox"&&G(a.value),g(a),E==="check"&&G(a.value)]},a.value);return h.jsxRuntimeExports.jsxs(fe.Popover,{open:V,onOpenChange:_,children:[h.jsxRuntimeExports.jsx(fe.PopoverTrigger,{asChild:!0,children:s()}),h.jsxRuntimeExports.jsx(fe.PopoverContent,{align:"start",className:P.cn("adm:p-0",p?.popover),style:{minWidth:O.current?.offsetWidth},children:h.jsxRuntimeExports.jsxs(lt,{filter:Z,className:p?.command,children:[v(),h.jsxRuntimeExports.jsxs(ot,{className:p?.list,children:[h.jsxRuntimeExports.jsx(ut,{className:p?.empty,children:i()}),h.jsxRuntimeExports.jsx(st,{className:p?.group,children:m.map(a=>j(a))})]})]})})]})}exports.Combobox=dt;
@@ -1,44 +0,0 @@
1
- "use client";
2
- import { j as i } from "./jsx-runtime-BzflLqGi.js";
3
- import { c as m } from "./index-CRiPKpXj.js";
4
- import "react";
5
- function o({ className: a, type: d, ...e }) {
6
- return /* @__PURE__ */ i.jsx(
7
- "input",
8
- {
9
- type: d,
10
- "data-slot": "input",
11
- className: m(
12
- `
13
- adm:h-10 adm:w-full adm:min-w-0 adm:rounded-md adm:border
14
- adm:border-input adm:bg-transparent adm:px-3 adm:text-base
15
- adm:shadow-xs adm:transition-[color,box-shadow] adm:outline-none
16
- adm:selection:bg-primary adm:selection:text-primary-foreground
17
- adm:file:mr-3 adm:file:-ml-3 adm:file:inline-flex adm:file:h-full
18
- adm:file:items-center adm:file:border-0 adm:file:bg-transparent
19
- adm:file:pl-3 adm:file:text-sm adm:file:font-medium
20
- adm:file:text-foreground
21
- adm:placeholder:text-muted-foreground
22
- adm:disabled:pointer-events-none adm:disabled:cursor-not-allowed
23
- adm:disabled:opacity-50
24
- adm:md:text-sm
25
- adm:dark:bg-input/30
26
- `,
27
- `
28
- adm:focus-visible:border-ring adm:focus-visible:ring-[3px]
29
- adm:focus-visible:ring-ring/50
30
- `,
31
- `
32
- adm:aria-invalid:border-destructive
33
- adm:aria-invalid:ring-destructive/20
34
- adm:dark:aria-invalid:ring-destructive/40
35
- `,
36
- a
37
- ),
38
- ...e
39
- }
40
- );
41
- }
42
- export {
43
- o as I
44
- };
@@ -1,22 +0,0 @@
1
- "use client";"use strict";const i=require("./jsx-runtime-BB_1_6y_.cjs"),r=require("./index-DoxiiusW.cjs");require("react");function m({className:e,type:d,...a}){return i.jsxRuntimeExports.jsx("input",{type:d,"data-slot":"input",className:r.cn(`
2
- adm:h-10 adm:w-full adm:min-w-0 adm:rounded-md adm:border
3
- adm:border-input adm:bg-transparent adm:px-3 adm:text-base
4
- adm:shadow-xs adm:transition-[color,box-shadow] adm:outline-none
5
- adm:selection:bg-primary adm:selection:text-primary-foreground
6
- adm:file:mr-3 adm:file:-ml-3 adm:file:inline-flex adm:file:h-full
7
- adm:file:items-center adm:file:border-0 adm:file:bg-transparent
8
- adm:file:pl-3 adm:file:text-sm adm:file:font-medium
9
- adm:file:text-foreground
10
- adm:placeholder:text-muted-foreground
11
- adm:disabled:pointer-events-none adm:disabled:cursor-not-allowed
12
- adm:disabled:opacity-50
13
- adm:md:text-sm
14
- adm:dark:bg-input/30
15
- `,`
16
- adm:focus-visible:border-ring adm:focus-visible:ring-[3px]
17
- adm:focus-visible:ring-ring/50
18
- `,`
19
- adm:aria-invalid:border-destructive
20
- adm:aria-invalid:ring-destructive/20
21
- adm:dark:aria-invalid:ring-destructive/40
22
- `,e),...a})}exports.Input=m;
@@ -1,7 +0,0 @@
1
- "use client";"use strict";const i=require("./jsx-runtime-BB_1_6y_.cjs"),u=require("react"),d=require("./index-CocSS1YK.cjs"),p=require("./index-DoxiiusW.cjs");function m(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const f=m(u);var v="Separator",n="horizontal",O=["horizontal","vertical"],s=f.forwardRef((t,e)=>{const{decorative:r,orientation:a=n,...c}=t,o=x(a)?a:n,l=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return i.jsxRuntimeExports.jsx(d.Primitive.div,{"data-orientation":o,...l,...c,ref:e})});s.displayName=v;function x(t){return O.includes(t)}var b=s;function j({className:t,orientation:e="horizontal",decorative:r=!0,...a}){return i.jsxRuntimeExports.jsx(b,{"data-slot":"separator",decorative:r,orientation:e,className:p.cn(`
2
- adm:shrink-0 adm:bg-border
3
- adm:data-[orientation=horizontal]:h-px
4
- adm:data-[orientation=horizontal]:w-full
5
- adm:data-[orientation=vertical]:h-full
6
- adm:data-[orientation=vertical]:w-px
7
- `,t),...a})}exports.Separator=j;
@@ -1,33 +0,0 @@
1
- "use client";
2
- import { j as r } from "./jsx-runtime-BzflLqGi.js";
3
- import { c as e } from "./index-CRiPKpXj.js";
4
- import "react";
5
- function o({ className: a, ...d }) {
6
- return /* @__PURE__ */ r.jsx(
7
- "textarea",
8
- {
9
- "data-slot": "textarea",
10
- className: e(
11
- `
12
- adm:flex adm:field-sizing-content adm:min-h-16 adm:w-full
13
- adm:rounded-md adm:border adm:border-input adm:bg-transparent adm:px-3
14
- adm:py-2 adm:text-base adm:shadow-xs adm:transition-[color,box-shadow]
15
- adm:outline-none
16
- adm:placeholder:text-muted-foreground
17
- adm:focus-visible:border-ring adm:focus-visible:ring-[3px]
18
- adm:focus-visible:ring-ring/50
19
- adm:disabled:cursor-not-allowed adm:disabled:opacity-50
20
- adm:aria-invalid:border-destructive
21
- adm:aria-invalid:ring-destructive/20
22
- adm:md:text-sm
23
- adm:dark:bg-input/30 adm:dark:aria-invalid:ring-destructive/40
24
- `,
25
- a
26
- ),
27
- ...d
28
- }
29
- );
30
- }
31
- export {
32
- o as T
33
- };
@@ -1,14 +0,0 @@
1
- "use client";"use strict";const e=require("./jsx-runtime-BB_1_6y_.cjs"),r=require("./index-DoxiiusW.cjs");require("react");function i({className:a,...d}){return e.jsxRuntimeExports.jsx("textarea",{"data-slot":"textarea",className:r.cn(`
2
- adm:flex adm:field-sizing-content adm:min-h-16 adm:w-full
3
- adm:rounded-md adm:border adm:border-input adm:bg-transparent adm:px-3
4
- adm:py-2 adm:text-base adm:shadow-xs adm:transition-[color,box-shadow]
5
- adm:outline-none
6
- adm:placeholder:text-muted-foreground
7
- adm:focus-visible:border-ring adm:focus-visible:ring-[3px]
8
- adm:focus-visible:ring-ring/50
9
- adm:disabled:cursor-not-allowed adm:disabled:opacity-50
10
- adm:aria-invalid:border-destructive
11
- adm:aria-invalid:ring-destructive/20
12
- adm:md:text-sm
13
- adm:dark:bg-input/30 adm:dark:aria-invalid:ring-destructive/40
14
- `,a),...d})}exports.Textarea=i;