@dito-uai/components 5.0.0-alpha29 → 5.0.0-alpha30

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 (171) hide show
  1. package/dist/index.cjs +52 -1489
  2. package/dist/index.d.ts +23 -2015
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +14 -1451
  5. package/dist/lib/colors-utils.d.ts +88 -0
  6. package/dist/lib/colors-utils.d.ts.map +1 -0
  7. package/dist/lib/css-util.d.ts +3 -0
  8. package/dist/lib/css-util.d.ts.map +1 -0
  9. package/dist/ui/avatar.d.ts +221 -0
  10. package/dist/ui/avatar.d.ts.map +1 -0
  11. package/dist/ui/badge.d.ts +264 -0
  12. package/dist/ui/badge.d.ts.map +1 -0
  13. package/dist/ui/button.d.ts +765 -0
  14. package/dist/ui/button.d.ts.map +1 -0
  15. package/dist/ui/card.d.ts +122 -0
  16. package/dist/ui/card.d.ts.map +1 -0
  17. package/dist/ui/checkbox.d.ts +4 -0
  18. package/dist/ui/checkbox.d.ts.map +1 -0
  19. package/dist/ui/chips.d.ts +416 -0
  20. package/dist/ui/chips.d.ts.map +1 -0
  21. package/dist/ui/collapse.d.ts +16 -0
  22. package/dist/ui/collapse.d.ts.map +1 -0
  23. package/dist/ui/collapsible.d.ts +11 -0
  24. package/dist/ui/collapsible.d.ts.map +1 -0
  25. package/dist/ui/form-item.d.ts +16 -0
  26. package/dist/ui/form-item.d.ts.map +1 -0
  27. package/dist/ui/form.d.ts +1 -0
  28. package/dist/ui/form.d.ts.map +1 -0
  29. package/dist/ui/indicator.d.ts +57 -0
  30. package/dist/ui/indicator.d.ts.map +1 -0
  31. package/dist/ui/input-description.d.ts +66 -0
  32. package/dist/ui/input-description.d.ts.map +1 -0
  33. package/dist/ui/input.d.ts +395 -0
  34. package/dist/ui/input.d.ts.map +1 -0
  35. package/dist/ui/internal/dropdown-content.d.ts +12 -0
  36. package/dist/ui/internal/dropdown-content.d.ts.map +1 -0
  37. package/dist/ui/label.d.ts +43 -0
  38. package/dist/ui/label.d.ts.map +1 -0
  39. package/dist/ui/progress-bar.d.ts +9 -0
  40. package/dist/ui/progress-bar.d.ts.map +1 -0
  41. package/dist/ui/progress.d.ts +57 -0
  42. package/dist/ui/progress.d.ts.map +1 -0
  43. package/dist/ui/radio.d.ts +10 -0
  44. package/dist/ui/radio.d.ts.map +1 -0
  45. package/dist/ui/scope.d.ts +209 -0
  46. package/dist/ui/scope.d.ts.map +1 -0
  47. package/dist/ui/search.d.ts +199 -0
  48. package/dist/ui/search.d.ts.map +1 -0
  49. package/dist/ui/sheets.d.ts +15 -0
  50. package/dist/ui/sheets.d.ts.map +1 -0
  51. package/dist/ui/status.d.ts +76 -0
  52. package/dist/ui/status.d.ts.map +1 -0
  53. package/dist/ui/text.d.ts +115 -0
  54. package/dist/ui/text.d.ts.map +1 -0
  55. package/dist/ui/textarea.d.ts +9 -0
  56. package/dist/ui/textarea.d.ts.map +1 -0
  57. package/dist/ui/toggle.d.ts +13 -0
  58. package/dist/ui/toggle.d.ts.map +1 -0
  59. package/package.json +1 -1
  60. package/dist/Alert/Alert.d.ts +0 -5
  61. package/dist/Alert/index.d.ts +0 -1
  62. package/dist/Avatar/Avatar.d.ts +0 -25
  63. package/dist/Avatar/index.d.ts +0 -1
  64. package/dist/Badge/Badge.d.ts +0 -21
  65. package/dist/Badge/index.d.ts +0 -1
  66. package/dist/Button/Button.d.ts +0 -17
  67. package/dist/Button/index.d.ts +0 -1
  68. package/dist/Card/Card.d.ts +0 -19
  69. package/dist/Card/ProgressCard.d.ts +0 -10
  70. package/dist/Card/RadioCard.d.ts +0 -17
  71. package/dist/Card/SelectCard.d.ts +0 -19
  72. package/dist/Card/StepCard.d.ts +0 -17
  73. package/dist/Card/index.d.ts +0 -5
  74. package/dist/CardsCanva/CardsCanva.d.ts +0 -16
  75. package/dist/CardsCanva/index.d.ts +0 -1
  76. package/dist/Checkbox/Checkbox.d.ts +0 -13
  77. package/dist/Checkbox/index.d.ts +0 -1
  78. package/dist/Chips/Chips.d.ts +0 -39
  79. package/dist/Chips/index.d.ts +0 -1
  80. package/dist/DatePicker/DatePicker.d.ts +0 -14
  81. package/dist/DatePicker/RangePicker.d.ts +0 -21
  82. package/dist/DatePicker/helpers/index.d.ts +0 -2
  83. package/dist/DatePicker/helpers/lang.d.ts +0 -25
  84. package/dist/DatePicker/helpers/ranges.d.ts +0 -20
  85. package/dist/DatePicker/index.d.ts +0 -4
  86. package/dist/DatePicker/language/en_US.d.ts +0 -3
  87. package/dist/DatePicker/language/index.d.ts +0 -2
  88. package/dist/DatePicker/language/pt_BR.d.ts +0 -3
  89. package/dist/Divider/Divider.d.ts +0 -8
  90. package/dist/Divider/index.d.ts +0 -1
  91. package/dist/ExternalLink/ExternalLink.d.ts +0 -9
  92. package/dist/ExternalLink/index.d.ts +0 -1
  93. package/dist/Flex/Flex.d.ts +0 -7
  94. package/dist/Flex/index.d.ts +0 -1
  95. package/dist/Form/Form.d.ts +0 -11
  96. package/dist/Form/index.d.ts +0 -1
  97. package/dist/Indicator/Indicator.d.ts +0 -19
  98. package/dist/Indicator/index.d.ts +0 -1
  99. package/dist/Input/Input.d.ts +0 -15
  100. package/dist/Input/TextArea.d.ts +0 -15
  101. package/dist/Input/index.d.ts +0 -1
  102. package/dist/Internal/ActionCard.d.ts +0 -10
  103. package/dist/Internal/Box.d.ts +0 -6
  104. package/dist/Internal/index.d.ts +0 -1
  105. package/dist/ListItem/ListItem.d.ts +0 -28
  106. package/dist/ListItem/index.d.ts +0 -1
  107. package/dist/Loading/Loading.d.ts +0 -25
  108. package/dist/Loading/index.d.ts +0 -1
  109. package/dist/Menu/Item.d.ts +0 -3
  110. package/dist/Menu/ItemsRadioGroup.d.ts +0 -14
  111. package/dist/Menu/Menu.d.ts +0 -10
  112. package/dist/Menu/SubMenu.d.ts +0 -4
  113. package/dist/Menu/index.d.ts +0 -2
  114. package/dist/Message/Message.d.ts +0 -20
  115. package/dist/Message/index.d.ts +0 -2
  116. package/dist/Pagination/Pagination.d.ts +0 -13
  117. package/dist/Pagination/index.d.ts +0 -1
  118. package/dist/Progress/Progress.d.ts +0 -10
  119. package/dist/Progress/ProgressBar.d.ts +0 -15
  120. package/dist/Progress/ProgressIndicator.d.ts +0 -8
  121. package/dist/Progress/index.d.ts +0 -4
  122. package/dist/Radio/Radio.d.ts +0 -16
  123. package/dist/Radio/index.d.ts +0 -1
  124. package/dist/ScopeButton/ScopeButton.d.ts +0 -22
  125. package/dist/ScopeButton/index.d.ts +0 -1
  126. package/dist/Search/Search.d.ts +0 -14
  127. package/dist/Select/Category.d.ts +0 -15
  128. package/dist/Select/CategoryFreeText.d.ts +0 -13
  129. package/dist/Select/Commons.d.ts +0 -24
  130. package/dist/Select/Multiple.d.ts +0 -13
  131. package/dist/Select/MultipleFreeText.d.ts +0 -11
  132. package/dist/Select/Select.d.ts +0 -24
  133. package/dist/Select/index.d.ts +0 -6
  134. package/dist/Select/types.d.ts +0 -61
  135. package/dist/Select/utils.d.ts +0 -6
  136. package/dist/Sheets/SheetTitleWithDescription.d.ts +0 -7
  137. package/dist/Sheets/Sheets.d.ts +0 -8
  138. package/dist/Sheets/index.d.ts +0 -1
  139. package/dist/Skeleton/Skeleton.d.ts +0 -53
  140. package/dist/Skeleton/index.d.ts +0 -1
  141. package/dist/Status/Status.d.ts +0 -8
  142. package/dist/Status/StatusMenu.d.ts +0 -17
  143. package/dist/Status/StatusSimple.d.ts +0 -19
  144. package/dist/Status/index.d.ts +0 -3
  145. package/dist/Steps/Step.d.ts +0 -12
  146. package/dist/Steps/Steps.d.ts +0 -7
  147. package/dist/Steps/index.d.ts +0 -2
  148. package/dist/Table/MenuHeader.d.ts +0 -16
  149. package/dist/Table/MenuRow.d.ts +0 -8
  150. package/dist/Table/Table.d.ts +0 -4
  151. package/dist/Table/TitleDropdown.d.ts +0 -4
  152. package/dist/Table/TitleHeader.d.ts +0 -11
  153. package/dist/Table/index.d.ts +0 -2
  154. package/dist/Table/types.d.ts +0 -63
  155. package/dist/Table/utils.d.ts +0 -6
  156. package/dist/Tabs/Tabs.d.ts +0 -7
  157. package/dist/Tabs/index.d.ts +0 -1
  158. package/dist/Text/Text.d.ts +0 -66
  159. package/dist/Text/index.d.ts +0 -1
  160. package/dist/TimePicker/NumberCarousel.d.ts +0 -8
  161. package/dist/TimePicker/TimeMenu.d.ts +0 -7
  162. package/dist/TimePicker/TimePicker.d.ts +0 -12
  163. package/dist/TimePicker/index.d.ts +0 -1
  164. package/dist/Toggle/Toggle.d.ts +0 -4
  165. package/dist/Toggle/index.d.ts +0 -1
  166. package/dist/Tooltip/Tooltip.d.ts +0 -11
  167. package/dist/Tooltip/index.d.ts +0 -1
  168. package/dist/index.cjs.js +0 -94996
  169. package/dist/index.cjs.js.map +0 -1
  170. package/dist/index.esm.js +0 -94910
  171. package/dist/index.esm.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,1460 +1,23 @@
1
- import * as React4 from 'react';
2
- import React4__default, { forwardRef, useState, useEffect } from 'react';
1
+ import * as J from 'react';
2
+ import J__default, { forwardRef, useState, useEffect } from 'react';
3
3
  import { Slot } from '@radix-ui/react-slot';
4
4
  import { twMerge, extendTailwindMerge } from 'tailwind-merge';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import { clsx } from 'clsx';
7
- import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
8
- import * as RadixProgress from '@radix-ui/react-progress';
7
+ import * as q from '@radix-ui/react-toggle-group';
8
+ import * as Qt from '@radix-ui/react-progress';
9
9
  import { Root as Root$2, Indicator } from '@radix-ui/react-progress';
10
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
11
- import { IconOutlineChevronDown, IconOutlineClose, IconOutlineLine, IconOutlineCheck, IconOutlineSearch, IconOutlineArrowUp, IconOutlineArrowDown, IconOutlineMinus } from '@dito-uai/icons';
10
+ import * as G from '@radix-ui/react-collapsible';
11
+ import { IconOutlineChevronDown, IconOutlineArrowUp, IconOutlineArrowDown, IconOutlineMinus, IconOutlineClose, IconOutlineLine, IconOutlineCheck, IconOutlineSearch } from '@dito-uai/icons';
12
12
  import { Root, Trigger, Portal, Content, Item } from '@radix-ui/react-dropdown-menu';
13
13
  import { Root as Root$1 } from '@radix-ui/react-checkbox';
14
- import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
15
- import { Circle as Circle$1 } from 'lucide-react';
14
+ import * as z from '@radix-ui/react-radio-group';
15
+ import { Circle } from 'lucide-react';
16
16
 
17
- // src/ui/avatar.tsx
17
+ var it=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,N=t=>!t||typeof t!="object"||Object.keys(t).length===0,Vt=(t,o)=>JSON.stringify(t)===JSON.stringify(o);function It(t,o){t.forEach(function(e){Array.isArray(e)?It(e,o):o.push(e);});}function nt(t){let o=[];return It(t,o),o}var st=(...t)=>nt(t).filter(Boolean),lt=(t,o)=>{let e={},r=Object.keys(t),a=Object.keys(o);for(let i of r)if(a.includes(i)){let n=t[i],l=o[i];typeof n=="object"&&typeof l=="object"?e[i]=lt(n,l):Array.isArray(n)||Array.isArray(l)?e[i]=st(l,n):e[i]=l+" "+n;}else e[i]=t[i];for(let i of a)r.includes(i)||(e[i]=o[i]);return e},pt=t=>!t||typeof t!="string"?t:t.replace(/\s+/g," ").trim();var Te={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Lt=t=>t||void 0,j=(...t)=>Lt(nt(t).filter(Boolean).join(" ")),ct=null,I={},dt=!1,B=(...t)=>o=>o.twMerge?((!ct||dt)&&(dt=!1,ct=N(I)?twMerge:extendTailwindMerge({...I,extend:{theme:I.theme,classGroups:I.classGroups,conflictingClassGroupModifiers:I.conflictingClassGroupModifiers,conflictingClassGroups:I.conflictingClassGroups,...I.extend}})),Lt(ct(j(t)))):j(t),Mt=(t,o)=>{for(let e in o)t.hasOwnProperty(e)?t[e]=j(t[e],o[e]):t[e]=o[e];return t},c=(t,o)=>{let{extend:e=null,slots:r={},variants:a={},compoundVariants:i=[],compoundSlots:n=[],defaultVariants:l={}}=t,p={...Te,...o},R=e!=null&&e.base?j(e.base,t==null?void 0:t.base):t==null?void 0:t.base,y=e!=null&&e.variants&&!N(e.variants)?lt(a,e.variants):a,L=e!=null&&e.defaultVariants&&!N(e.defaultVariants)?{...e.defaultVariants,...l}:l;!N(p.twMergeConfig)&&!Vt(p.twMergeConfig,I)&&(dt=!0,I=p.twMergeConfig);let E=N(e==null?void 0:e.slots),ot=N(r)?{}:{base:j(t==null?void 0:t.base,E&&(e==null?void 0:e.base)),...r},k=E?ot:Mt({...e==null?void 0:e.slots},N(ot)?{base:t==null?void 0:t.base}:ot),D=N(e==null?void 0:e.compoundVariants)?i:st(e==null?void 0:e.compoundVariants,i),V=T=>{if(N(y)&&N(r)&&E)return B(R,T==null?void 0:T.class,T==null?void 0:T.className)(p);if(D&&!Array.isArray(D))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof D}`);if(n&&!Array.isArray(n))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof n}`);let ge=(d,m,f=[],g)=>{let u=f;if(typeof m=="string")u=u.concat(pt(m).split(" ").map(h=>`${d}:${h}`));else if(Array.isArray(m))u=u.concat(m.reduce((h,w)=>h.concat(`${d}:${w}`),[]));else if(typeof m=="object"&&typeof g=="string"){for(let h in m)if(m.hasOwnProperty(h)&&h===g){let w=m[h];if(w&&typeof w=="string"){let P=pt(w);u[g]?u[g]=u[g].concat(P.split(" ").map(C=>`${d}:${C}`)):u[g]=P.split(" ").map(C=>`${d}:${C}`);}else Array.isArray(w)&&w.length>0&&(u[g]=w.reduce((P,C)=>P.concat(`${d}:${C}`),[]));}}return u},Pt=(d,m=y,f=null,g=null)=>{var u;let h=m[d];if(!h||N(h))return null;let w=(u=g==null?void 0:g[d])!=null?u:T==null?void 0:T[d];if(w===null)return null;let P=it(w),C=Array.isArray(p.responsiveVariants)&&p.responsiveVariants.length>0||p.responsiveVariants===!0,O=L==null?void 0:L[d],H=[];if(typeof P=="object"&&C)for(let[at,Nt]of Object.entries(P)){let we=h[Nt];if(at==="initial"){O=Nt;continue}Array.isArray(p.responsiveVariants)&&!p.responsiveVariants.includes(at)||(H=ge(at,we,H,f));}let ye=P!=null&&typeof P!="object"?P:it(O),rt=h[ye||"false"];return typeof H=="object"&&typeof f=="string"&&H[f]?Mt(H,rt):H.length>0?(H.push(rt),H):rt},be=()=>y?Object.keys(y).map(d=>Pt(d,y)):null,ve=(d,m)=>{if(!y||typeof y!="object")return null;let f=new Array;for(let g in y){let u=Pt(g,y,d,m),h=d==="base"&&typeof u=="string"?u:u&&u[d];h&&(f[f.length]=h);}return f},Rt={};for(let d in T)T[d]!==void 0&&(Rt[d]=T[d]);let Tt=(d,m)=>{var f;let g=typeof(T==null?void 0:T[d])=="object"?{[d]:(f=T[d])==null?void 0:f.initial}:{};return {...L,...Rt,...g,...m}},Ct=(d=[],m)=>{let f=[];for(let{class:g,className:u,...h}of d){let w=!0;for(let[P,C]of Object.entries(h)){let O=Tt(P,m);if(Array.isArray(C)){if(!C.includes(O[P])){w=!1;break}}else if(O[P]!==C){w=!1;break}}w&&(g&&f.push(g),u&&f.push(u));}return f},xe=d=>{let m=Ct(D,d);if(!Array.isArray(m))return m;let f={};for(let g of m)if(typeof g=="string"&&(f.base=B(f.base,g)(p)),typeof g=="object")for(let[u,h]of Object.entries(g))f[u]=B(f[u],h)(p);return f},he=d=>{if(n.length<1)return null;let m={};for(let{slots:f=[],class:g,className:u,...h}of n){if(!N(h)){let w=!0;for(let P of Object.keys(h)){let C=Tt(P,d)[P];if(C===void 0||(Array.isArray(h[P])?!h[P].includes(C):h[P]!==C)){w=!1;break}}if(!w)continue}for(let w of f)m[w]=m[w]||[],m[w].push([g,u]);}return m};if(!N(r)||!E){let d={};if(typeof k=="object"&&!N(k))for(let m of Object.keys(k))d[m]=f=>{var g,u;return B(k[m],ve(m,f),((g=xe(f))!=null?g:[])[m],((u=he(f))!=null?u:[])[m],f==null?void 0:f.class,f==null?void 0:f.className)(p)};return d}return B(R,be(),Ct(D),T==null?void 0:T.class,T==null?void 0:T.className)(p)},ue=()=>{if(!(!y||typeof y!="object"))return Object.keys(y)};return V.variantKeys=ue(),V.extend=e,V.base=R,V.slots=k,V.variants=y,V.defaultVariants=L,V.compoundSlots=n,V.compoundVariants=D,V};var Ve=c({base:"flex items-center justify-center rounded-full",variants:{color:{default:"bg-neutral-100",indigo:"bg-indigo-600"},type:{icon:"[&_path]:fill-neutral-500 [&_svg]:fill-neutral-500",capitals:"font-semibold text-neutral-500",image:"[&_img]:rounded-full"},size:{small:"size-4",medium:"size-5",large:"size-7"}},compoundVariants:[{size:"large",type:["capitals","icon"],className:"text-xl [&_svg]:size-5"},{size:"medium",type:["capitals","icon"],className:"text-lg [&_svg]:size-3"},{size:"small",type:["capitals","icon"],className:"text-base [&_svg]:size-2"},{color:"indigo",type:["capitals","icon"],className:"text-white [&_path]:fill-white [&_svg]:fill-white"}],defaultVariants:{color:"default"}}),Et=J__default.forwardRef(({className:t,color:o,type:e,size:r,children:a,asChild:i,...n},l)=>jsx(i?Slot:"div",{className:Ve({color:o,type:e,size:r,className:t}),ref:l,...n,children:a}));Et.displayName="Avatar";var Ie=Et;function s(...t){return twMerge(clsx(t))}var He=c({base:"",variants:{size:{H1:"text-3xl",H2:"text-2xl",H3:"text-xl",large:"text-lg",base:"text-base",small:"text-sm",overline:"text-xs uppercase"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold"}},defaultVariants:{size:"base",weight:"normal"}}),Ht=({className:t,size:o,weight:e,children:r,...a})=>jsx("span",{className:s(He({size:o,weight:e,className:t})),...a,children:r});Ht.displayName="Text";var x=Ht;var _e=c({base:"flex items-center justify-center rounded-full",variants:{contrast:{true:"",false:""},status:{info:"bg-notification-information-100 text-notification-information-600",attention:"bg-notification-warning-100 text-notification-warning-900",white:"text-notification-information-600 bg-white"},size:{small:"h-2",normal:"h-3"},type:{pill:"w-fit px-1",dot:""}},compoundVariants:[{status:"info",contrast:!0,class:"bg-notification-information-600 text-white"},{status:"attention",contrast:!0,class:"bg-notification-warning-600"},{type:"dot",size:"small",class:"w-2"},{type:"dot",size:"normal",class:"w-3"}],defaultVariants:{status:"info",size:"normal",type:"pill"}}),zt=J__default.forwardRef(({className:t,status:o,size:e,type:r,contrast:a,children:i,asChild:n,...l},p)=>jsx(n?Slot:"span",{className:_e({status:o,size:e,type:r,contrast:a,className:t}),ref:p,...l,children:jsx(x,{size:"overline",weight:"semibold",children:i})}));zt.displayName="Badge";var De=zt;var Oe=c({variants:{appearance:{primary:{container:"bg-primary hover:bg-green-900 ",text:"text-white",icon:"fill-white [&_path]:fill-white"},secondary:{container:"border border-green-600 bg-white hover:bg-green-100 ",text:"text-green-600",icon:"fill-green-600 [&_path]:fill-green-600"},tertiary:{container:"border border-indigo-600 bg-white hover:bg-indigo-100 ",text:"text-indigo-600",icon:"fill-indigo-600 [&_path]:fill-indigo-600"},danger:{container:"border-notification-critical-600 hover:bg-notification-critical-600 group/danger border bg-white",text:"text-notification-critical-600 group-hover/danger:text-white",icon:"fill-notification-critical-600 [&_path]:fill-notification-critical-600 group-hover/danger:fill-white group-hover/danger:[&_path]:fill-white"},link:{container:"bg-white hover:bg-green-100 ",text:"text-green-600",icon:"fill-green-600 [&_path]:fill-green-600"},table:{container:"bg-white hover:bg-neutral-100 ",text:"text-neutral-400",icon:"fill-neutral-400 [&_path]:fill-neutral-400"}},size:{medium:{container:"h-5",icon:"text-base"},small:{container:"h-4",text:"mx-1 text-sm",icon:"group-data-[has-text=true]:ml-0"}},disabled:{true:{container:"pointer-events-none cursor-not-allowed border-neutral-200 bg-neutral-100",text:"text-neutral-300",icon:"fill-neutral-300 [&_path]:fill-neutral-300"},false:""}},slots:{container:"group inline-flex items-center justify-center rounded-md p-1 focus:outline-none focus:ring-0 data-[has-icon=true]:gap-1",icon:"size-3 group-data-[has-text=true]:ml-1",text:"mx-2 group-data-[has-icon=true]:ml-0"},defaultVariants:{appearance:"primary",size:"medium"}}),_t=J__default.forwardRef(({className:t,appearance:o,size:e,disabled:r,children:a,asChild:i,icon:n,...l},p)=>{let R=i?Slot:"button",y=Oe({appearance:o,size:e,disabled:r,className:t});return jsxs(R,{"data-has-icon":!!n,"data-has-text":!!a,className:y.container(),ref:p,...l,children:[n&&jsx(n,{className:y.icon()}),a&&jsx(x,{size:"base",weight:"medium",className:y.text(),children:a})]})});_t.displayName="Button";var Be=_t;var $e=c({base:"flex w-full border border-gray-200 bg-white p-2",variants:{variant:{default:"rounded-m",big:"rounded-x",small:"rounded-s"},direction:{col:"flex-col",row:"flex-row"},padding:{none:"p-0",small:"p-1",medium:"p-2",big:"p-3"}},defaultVariants:{variant:"default",direction:"col",padding:"none"}}),Dt=({className:t,variant:o,direction:e,padding:r,children:a,...i})=>jsx("div",{className:s($e({variant:o,direction:e,padding:r,className:t})),...i,children:a});Dt.displayName="Card";var Fe=Dt;var Je=c({variants:{variant:{default:"",light:"",green:"",red:""},size:{default:{container:"h-5"},small:{container:"h-4",text:"text-sm"}},disabled:{true:{container:"cursor-initial border-neutral-200 bg-neutral-100 text-neutral-300",icon:"[&_path]:fill-neutral-300 [&_svg]:fill-neutral-300"},false:{container:"border-neutral-200 text-neutral-500 hover:bg-neutral-100",icon:"[&_path]:fill-neutral-500 [&_svg]:fill-neutral-500"}}},compoundVariants:[{disabled:!1,variant:"default",class:{container:"data-[state=on]:border-indigo-600 data-[state=on]:bg-indigo-600",text:"group-data-[state=on]:text-white",icon:"group-data-[state=on]:fill-white [&_path]:group-data-[state=on]:fill-white"}},{disabled:!1,variant:"light",class:{container:"data-[state=on]:border-indigo-600 data-[state=on]:bg-indigo-100",text:"group-data-[state=on]:text-indigo-600",icon:"group-data-[state=on]:fill-indigo-600 [&_path]:group-data-[state=on]:fill-indigo-600"}},{disabled:!1,variant:"green",class:{container:"data-[state=on]:border-notification-success-600 data-[state=on]:bg-notification-success-100",text:"group-data-[state=on]:text-notification-success-600",icon:"group-data-[state=on]:fill-notification-success-600 [&_path]:group-data-[state=on]:fill-notification-success-600"}},{disabled:!1,variant:"red",class:{container:"data-[state=on]:border-notification-critical-600 data-[state=on]:bg-notification-critical-100",text:"group-data-[state=on]:text-notification-critical-600",icon:"group-data-[state=on]:fill-notification-critical-600 [&_path]:group-data-[state=on]:fill-notification-critical-600"}}],slots:{container:"first:rounded-ss-m first:rounded-es-m last:rounded-se-m last:rounded-ee-m group flex items-center gap-1 border px-2 [&:nth-child(n+2)]:data-[state=off]:border-l-0",icon:"size-3",text:""},defaultVariants:{disabled:!1,variant:"default",size:"default"}}),Gt=J__default.createContext({variant:"default",size:"default",disabled:!1}),kt=J__default.forwardRef(({className:t,variant:o,children:e,size:r,disabled:a,...i},n)=>jsx(q.Root,{ref:n,className:s("flex items-center justify-center gap-0",t),...i,type:"single",children:jsx(Gt.Provider,{value:{variant:o,size:r,disabled:a},children:e})}));kt.displayName="ScopeGroup";var Ot=J__default.forwardRef(({className:t,variant:o,size:e,icon:r,text:a,disabled:i,...n},l)=>{let p=J__default.useContext(Gt),R=Je({variant:p.variant||o,size:p.size||e,disabled:p.disabled||i});return jsxs(q.Item,{ref:l,className:s(R.container(),t),disabled:i,...n,children:[r&&jsx(r,{className:R.icon()}),jsx(x,{size:"base",weight:"normal",className:R.text(),children:a})]})});Ot.displayName="ScopeItem";var Ze={Group:kt,Item:Ot},qe=Ze;var Xe=({value:t,className:o,barBg:e,progressBg:r})=>{let a=`-translate-x-[(-${100-(t||0)}%])`;return jsx(Root$2,{className:s(o,e,"relative w-full overflow-hidden rounded-full "),value:t,children:jsx(Indicator,{className:s(o,"w-full flex-1 rounded-full",a,r)})})},K=Xe;var $=c({variants:{disabled:{true:{input:"cursor-not-allowed bg-neutral-100 text-neutral-400",prefixIcon:"fill-neutral-300 [&_path]:fill-neutral-300",suffixIcon:"fill-neutral-300 [&_path]:fill-neutral-300"}},invalid:{true:{input:"border-notification-critical-600 focus:border-notification-critical-600"}},size:{medium:{prefixIcon:"top-1",suffixIcon:"top-1",input:"h-5"},small:{prefixIcon:"top-0.5",suffixIcon:"top-0.5",input:"h-4"}}},slots:{prefixIcon:"absolute left-1 top-1 size-3",input:"rounded-m flex w-full border border-neutral-200 p-2 text-base text-indigo-600 placeholder:font-light placeholder:text-neutral-400 focus:border-indigo-600 focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed data-[has-prefix-icon=true]:pl-5 data-[has-suffix-icon=true]:pr-5",suffixIcon:"absolute right-1 top-1 size-3"},defaultVariants:{size:"medium"}}),jt=J__default.forwardRef(({className:t,prefixIcon:o,suffixIcon:e,disabled:r,invalid:a,size:i,...n},l)=>{let p=$();return jsxs("div",{className:"relative",children:[o&&jsx("div",{className:p.prefixIcon({invalid:a,size:i}),children:o}),jsx("input",{disabled:r,"data-has-prefix-icon":!!o,"data-has-suffix-icon":!!e,className:s(p.input({disabled:r,invalid:a,size:i}),t,"form-input"),ref:l,...n}),e&&jsx("div",{className:p.suffixIcon({invalid:a,size:i}),children:e})]})});jt.displayName="Input";var to=jt;var Ft=J.forwardRef(({className:t,disabled:o,invalid:e,...r},a)=>{let{input:i}=$();return jsx("textarea",{className:s("min-h-9",t,i({disabled:o,invalid:e})),ref:a,...r})});Ft.displayName="Textarea";var oo=Ft;var Wt=({title:t,children:o,isVisible:e,CloseIcon:r,maxWidth:a,onClose:i})=>{let[n,l]=useState(e);useEffect(()=>l(e),[e]);let p=R=>{l(!1),i&&i(R);};return jsxs(Fragment,{children:[jsx("div",{className:s("fixed left-0 top-0 z-30 h-screen w-screen bg-black opacity-50",n?void 0:"hidden")}),jsxs("div",{className:s("shadow-big fixed right-0 top-0 z-40 h-screen overflow-y-auto overflow-x-hidden rounded-l-lg bg-white transition-transform dark:bg-gray-800",a?`max-w=[${a}]`:"max-w-3/4",n?void 0:"translate-x-full"),tabIndex:-1,"aria-labelledby":"drawer-label",children:[jsxs("div",{id:"drawer-label",className:s(" mb-2 flex items-center justify-between border-b-2 border-slate-100 p-2 text-base font-semibold text-gray-500 dark:text-gray-400"),children:[jsx(x,{size:"H3",weight:"semibold",className:"text-navy-600",children:t}),jsxs("button",{type:"button","data-drawer-hide":"drawer-example","aria-controls":"drawer-example",className:s("b-0 ml-2 flex size-9 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"),onClick:()=>p,children:[r?jsx(r,{}):jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.70711 18.7071L18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071ZM17.2929 18.7071L13.8201 15.2343C13.4296 14.8438 13.4296 14.2106 13.8201 13.8201C14.2106 13.4296 14.8438 13.4296 15.2343 13.8201L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071Z",fill:"#8D95A7"})}),jsx("span",{className:"sr-only",children:"Close menu"})]})]}),jsx("div",{className:s(" relative h-full p-2"),children:o})]})]})};Wt.displayName="Sheet";var no=Wt;var po=c({base:"after:start-0.25 after:top-0.25 peer relative mr-1 h-3 w-5 rounded-full bg-neutral-200 after:absolute after:size-[20px] after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-green-600 peer-checked:after:translate-x-2 peer-checked:after:border-white peer-focus:outline-none peer-focus:ring-0",variants:{disabled:{true:"cursor-not-allowed bg-neutral-100 after:border-neutral-100 peer-checked:bg-green-100 peer-checked:after:border-green-100"}}}),Jt=forwardRef(({className:t,name:o,disabled:e,children:r,...a},i)=>jsxs("label",{className:s("inline-flex cursor-pointer items-center",t),children:[jsx("input",{...a,ref:i,type:"checkbox",className:s("peer sr-only"),name:o,disabled:e}),jsx("span",{className:po({disabled:e})}),jsx(x,{children:r})]}));Jt.displayName="Toggle";var co=Jt;var uo=c({slots:{item:"mb-1 rounded-lg border-0 last:mb-0",trigger:"[&[data-state=open]]:rounded-t-m [&[data-state=open]]:bg-secondary-indigo-100 [&[data-state=closed]]:rounded-m flex h-7 w-full items-center border-0 p-1 text-left transition-all hover:bg-neutral-100 [&[data-disabled]]:cursor-not-allowed [&[data-disabled]]:bg-neutral-200 [&[data-disabled]]:text-neutral-400 [&[data-state=open]>svg]:rotate-180 [&[data-state=open]]:hover:bg-neutral-100",triggerIcon:"size-3 fill-neutral-400 transition-transform duration-200 [&_path]:fill-neutral-400",content:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down rounded-b-m overflow-hidden border transition-all"}}),{trigger:go,item:bo,triggerIcon:vo,content:xo}=uo(),ho=J__default.forwardRef(({className:t,...o},e)=>jsx(G.Root,{ref:e,className:bo({className:t}),...o})),yo=J__default.forwardRef(({className:t,triggerClassName:o,children:e,...r},a)=>jsxs(G.CollapsibleTrigger,{ref:a,className:go({className:o}),...r,children:[jsx("div",{className:s("w-full",t),children:e}),jsx(IconOutlineChevronDown,{className:vo()})]})),wo=J__default.forwardRef(({className:t,children:o,...e},r)=>jsx(G.CollapsibleContent,{ref:r,className:xo(),...e,children:jsx("div",{className:s("px-1 py-2",t),children:o})})),Po={Item:ho,Trigger:yo,Content:wo},Ro=Po;var Mo=c({base:"text-medium flex h-3 items-center justify-center rounded-sm border border-neutral-200 px-1 py-0.5 [&_svg]:-ml-0.5 [&_svg]:w-2",variants:{status:{positive:"text-notification-success-600 [&_svg]:fill-notification-success-600",negative:"text-notification-critical-600 [&_svg]:fill-notification-critical-600",neutral:"text-notification-warning-900 [&_svg]:fill-notification-warning-900",info:"border-indigo-600 text-indigo-600"}}}),Lo=J__default.forwardRef(({className:t,status:o,value:e,icon:r,...a},i)=>{let n={positive:jsx(IconOutlineArrowUp,{}),negative:jsx(IconOutlineArrowDown,{}),neutral:jsx(IconOutlineMinus,{})};return jsxs("div",{className:Mo({status:o,className:t}),ref:i,...a,children:[r&&n[r],jsxs(x,{size:"overline",weight:"semibold",children:[e,"%"]})]})}),Eo=Lo;var Q=({options:t,selected:o,onChange:e,className:r})=>jsx(Portal,{children:jsx(Content,{align:"start",className:s("shadow-down data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 rounded-md border bg-white p-1",r),children:t.map(a=>jsx(Item,{"data-selected":o===a.value,className:`relative flex cursor-pointer select-none rounded-sm
18
+ px-2 py-1 text-base font-normal text-neutral-500 outline-none
19
+ transition-colors focus:bg-indigo-100 focus:text-indigo-600
20
+ data-[selected=true]:bg-indigo-100 data-[selected=true]:font-medium data-[selected=true]:text-indigo-600`,onClick:()=>e&&e(a.value),children:a.text}))})});var Kt=c({base:"text-medium flex items-center justify-center rounded-sm px-1 py-0.5",variants:{status:{success:["bg-notification-success-100","text-notification-success-600","[&_svg]:fill-notification-success-600 [&_span:nth-child(1)]:bg-notification-success-600"],attention:["bg-notification-warning-100","text-notification-warning-900","[&_svg]:fill-notification-warning-900 [&_span:nth-child(1)]:bg-notification-warning-900"],info:["bg-notification-information-100","text-notification-information-600","[&_svg]:fill-notification-information-600 [&_span:nth-child(1)]:bg-notification-information-600"],error:["bg-notification-critical-100","text-notification-critical-900","[&_svg]:fill-notification-critical-900 [&_span:nth-child(1)]:bg-notification-critical-900"],disabled:["bg-neutral-200 ","text-neutral-500","[&_span:nth-child(1)]:bg-neutral-500 [&_svg]:fill-neutral-500"]}}}),Ut=({text:t})=>jsxs("div",{className:"flex items-center gap-0.5",children:[jsx("span",{className:"w-0.75 h-0.75 rounded-full bg-neutral-500"}),jsx(x,{size:"overline",weight:"semibold",className:"select-none",children:t})]}),Go=J__default.forwardRef(({className:t,status:o,text:e,...r},a)=>jsx("div",{className:Kt({status:o,className:t}),ref:a,...r,children:jsx(Ut,{text:e})})),ko=J__default.forwardRef(({className:t,status:o,options:e,value:r,onChange:a,...i},n)=>{let l=e.find(p=>p.value===r);return jsx("div",{className:Kt({status:l==null?void 0:l.status,className:t}),ref:n,...i,children:jsxs(Root,{children:[jsxs(Trigger,{className:"flex items-center gap-0.5 outline-none",children:[jsx(Ut,{text:(l==null?void 0:l.text)||""}),jsx(IconOutlineChevronDown,{"data-status":o,className:"-mr-0.5 size-2"})]}),jsx(Q,{selected:l==null?void 0:l.value,options:e,onChange:a,className:"-ml-1 mt-0.5"})]})})}),Oo={Menu:ko,...Go},Bo=Oo;var X=c({base:"text-midnight-blue-600",variants:{bg:{indigo:"bg-midnight-blue-100",white:"bg-white to-white"}}}),Xt=J__default.forwardRef(({className:t,bg:o,value:e,withBar:r,...a},i)=>jsxs("div",{className:s(X({bg:o,className:t}),"flex h-3 flex-col items-center justify-center rounded-full px-1"),ref:i,...a,children:[jsxs(x,{size:"overline",weight:"medium",children:[e,"%"]}),r&&jsx(K,{barBg:o==="indigo"?"bg-white":"bg-midnight-blue-100",progressBg:"bg-midnight-blue-600",value:e,className:"h-0.25 mb-0.5"})]})),jo=J__default.forwardRef(({className:t,bg:o,value:e,Icon:r,...a},i)=>jsx(Qt.Root,{ref:i,className:s(X({bg:o}),"text-midnight-blue-600 [&_svg]:fill-midnight-blue-600 [&_path]:fill-midnight-blue-600 relative flex size-6 items-center justify-center rounded-full","bg-[conic-gradient(var(--tw-gradient-stops))] from-midnight-blue-600 to-midnight-blue-100 p-0.5",t),...a,children:jsx("div",{className:s(X({bg:o}),"flex size-full items-center justify-center rounded-full"),children:r?jsx(r,{className:"size-3"}):jsxs("div",{className:"flex items-end",children:[jsx(x,{weight:"medium",children:e}),jsx(x,{size:"overline",weight:"medium",children:"%"})]})})})),$o=J__default.forwardRef(({className:t,bg:o,value:e,text:r,...a},i)=>jsxs("div",{"data-bg":o,className:s(X({bg:o,className:t}),`rounded-m data-[bg=white]:border-midnight-blue-600 flex w-full flex-col items-center justify-center gap-1
21
+ p-2 data-[bg=white]:border`),ref:i,...a,children:[jsxs("div",{className:"flex items-center justify-between gap-1",children:[jsx(x,{weight:"normal",children:r}),jsx(Xt,{value:e,bg:o==="white"?"indigo":"white"})]}),jsx(K,{barBg:o==="indigo"?"bg-white":"bg-midnight-blue-100",progressBg:"bg-midnight-blue-600",value:e,className:"h-1"})]})),Fo={Indicator:Xt,Circle:jo,Expanded:$o},Wo=Fo;var Ko=c({variants:{size:{small:{container:"h-3",icon:"size-2"},medium:{container:"h-4",icon:"size-3"}},border:{true:{container:"border border-neutral-200 text-neutral-500",icon:"fill-neutral-400 [&_path]:fill-neutral-400"},false:{container:"bg-indigo-100 text-indigo-600",icon:"fill-indigo-600 [&_path]:fill-indigo-600"}},active:{true:{container:"bg-indigo-600 text-white hover:bg-indigo-900",icon:"fill-white [&_path]:fill-white"}}},slots:{container:"group flex items-center rounded-full px-1 hover:border-0 hover:bg-indigo-600 hover:font-medium hover:text-white",icon:"group-hover:[&_path]:fill-white group-hover:[&_svg]:fill-white"},defaultVariants:{size:"medium",border:!1,active:!1}}),Yt=J__default.forwardRef(({className:t,size:o,icon:e,text:r,asChild:a,value:i,border:n,active:l,onClose:p,...R},y)=>{let L=a?Slot:"div",E=Ko();return jsxs(L,{className:E.container({size:o,border:n,active:l,className:t}),ref:y,...R,children:[e&&jsx(e,{className:E.icon({size:o,border:n,active:l})}),jsx(x,{size:"base",weight:"normal",className:"mx-1",children:r}),p&&jsx(IconOutlineClose,{onClick:()=>p(i),className:s(E.icon({size:o,border:n,active:l}),"cursor-pointer")})]})});Yt.displayName="Chips";var Uo=Yt;var Xo=c({base:"text-navy-600 text-base font-medium",variants:{invalid:{true:"text-notification-critical-600"}}}),ee=({className:t,text:o,suffix:e,invalid:r,htmlFor:a,...i})=>jsxs("div",{className:s("mb-0.5 flex items-center gap-0.5 [&_svg]:w-2",t),...i,children:[jsx("label",{className:Xo({invalid:r}),htmlFor:a,children:o}),e&&jsx(e,{})]});ee.displayName="Label";var yt=ee;var tr=c({variants:{invalid:{true:{text:"text-notification-critical-600"}}},slots:{text:"text-sm text-neutral-500",counter:"py-0.25 flex h-[20px] items-center rounded-full bg-neutral-100 px-0.5 text-neutral-500"}}),ae=({className:t,text:o,counter:e,maxLength:r,invalid:a,valueLength:i,...n})=>{let l=tr();return jsxs("div",{className:s("mt-0.5 flex justify-between",t),...n,children:[o&&jsx("span",{className:l.text({invalid:a}),children:o}),e&&r&&jsx("div",{className:l.counter(),children:jsxs(x,{size:"overline",weight:"semibold",children:[i||0,"/",r]})})]})};ae.displayName="InputDescription";var wt=ae;var or=({id:t,className:o,label:e,description:r,errorMessage:a,invalid:i,children:n,disabled:l,value:p,maxLength:R,...y})=>{let L=a||r.text;return jsxs("div",{className:s("flex flex-col",o),...y,children:[jsx(yt,{...e,invalid:i,htmlFor:t}),J__default.cloneElement(n,{id:t,invalid:i,disabled:l,value:p}),jsx(wt,{...r,text:L,invalid:i,maxLength:R,valueLength:p==null?void 0:p.length})]})},rr=or;var lr=c({variants:{checked:{false:{checkbox:"hover:border-primary border-neutral-400 bg-white hover:bg-green-100"},indeterminate:{}},disabled:{true:{checkbox:"disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-100",icon:"fill-neutral-300 [&_path]:fill-neutral-300 [&_rect]:fill-neutral-300"}}},slots:{checkbox:"bg-primary border-primary focus-visible:rind-0 peer size-[20px] shrink-0 rounded-md border-2 text-white focus-visible:outline-none",icon:"size-2 fill-white [&_path]:fill-white [&_rect]:fill-white"}}),se=J__default.forwardRef(({className:t,checked:o,defaultChecked:e,disabled:r,...a},i)=>{let n=lr();return jsx("div",{className:"flex size-3 items-center justify-center",children:jsx(Root$1,{ref:i,className:s(n.checkbox({checked:o,disabled:r}),t),checked:o,defaultChecked:e,disabled:r,...a,children:jsxs("div",{className:"-ml-0.5 -mt-0.5 flex size-3 items-center justify-center",children:[(o==="indeterminate"||e==="indeterminate")&&jsx(IconOutlineLine,{className:n.icon({disabled:r})}),(o===!0||e===!0)&&jsx(IconOutlineCheck,{className:n.icon({disabled:r})})]})})})});se.displayName=Root$1.displayName;var pr=se;var pe=J__default.forwardRef(({className:t,disabled:o,...e},r)=>jsx(z.Root,{className:s("grid gap-1",t),disabled:o,...e,ref:r}));pe.displayName=z.Root.displayName;var ce=J__default.forwardRef(({className:t,...o},e)=>jsx(z.Item,{ref:e,className:s("group aspect-square size-[20px] rounded-full border-2 border-neutral-400 bg-white hover:border-green-600 hover:bg-green-100 focus:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-100 [&:not(:disabled)]:data-[state=checked]:border-green-600",t),...o,children:jsx(z.Indicator,{className:"text-primary flex items-center justify-center group-disabled:text-neutral-300",children:jsx(Circle,{className:"fill-primary size-[12px] group-disabled:fill-neutral-300"})})}));ce.displayName=z.Item.displayName;var fr={Group:pe,Item:ce},mr=fr;var fe=c({base:"flex items-center justify-center rounded-full",variants:{size:{small:{trigger:"my-0.5",dropdown:"mt-0.5"},medium:{trigger:"my-1",dropdown:"mt-1"}},disabled:{true:{container:"cursor-not-allowed border-neutral-200",input:"bg-white text-neutral-300",trigger:"cursor-not-allowed text-neutral-300 [&_path]:fill-neutral-300"},false:{container:"focus-within:border-indigo-600 hover:border-indigo-600"}}},slots:{input:"data-[scope=false]hover:bg-indigo-100 pointer-events-auto border-0 bg-white pr-5",trigger:"br-neutral-100 border-r-1 flex w-fit items-center gap-0.5 border border-y-0 border-l-0 border-neutral-100 bg-white pl-2 pr-1 text-indigo-600 focus-visible:outline-none [&_svg]:fill-indigo-600",dropdown:"",container:"rounded-m flex border border-neutral-200 "},defaultVariants:{size:"medium"}}),me=J.forwardRef(({className:t,disabled:o,invalid:e,size:r,value:a,onChange:i,scope:n,...l},p)=>{let R=$(),y=fe();return jsxs("div",{className:y.container({disabled:o}),children:[n&&jsx(hr,{disabled:o,scope:n,size:r}),jsxs("div",{className:"peer relative",children:[jsx("input",{value:a,onChange:i,disabled:o,"data-scoped":!!n,className:s(R.input({disabled:o,invalid:e,size:r}),y.input(),t),ref:p,...l}),jsx("div",{"data-hasValue":!!a,className:`data-[hasValue=true]:cursor-pointer ${R.suffixIcon({size:r,disabled:o})}`,children:a?jsx(IconOutlineClose,{onClick:()=>i&&i({target:{value:""}})}):jsx(IconOutlineSearch,{})})]})]})}),hr=({scope:{selected:t,options:o,onChange:e},disabled:r,size:a})=>{let i=o.find(({value:l})=>l===t),n=fe();return jsxs(Root,{children:[jsxs(Trigger,{className:n.trigger({size:a,disabled:r}),disabled:r,children:[jsx(x,{size:"small",weight:"medium",children:i==null?void 0:i.text}),jsx(IconOutlineChevronDown,{className:"-mr-0.5 size-3"})]}),jsx(Q,{selected:t,options:o,onChange:e,className:n.dropdown({size:a})})]})};me.displayName="Search";var yr=me;
18
22
 
19
- // ../../.yarn/__virtual__/tailwind-variants-virtual-5a8232b7d0/3/.yarn/berry/cache/tailwind-variants-npm-0.2.1-853f67f9ea-10c0.zip/node_modules/tailwind-variants/dist/chunk-JXBJZR5A.js
20
- var l = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e;
21
- var u = (e) => !e || typeof e != "object" || Object.keys(e).length === 0;
22
- var x = (e, o) => JSON.stringify(e) === JSON.stringify(o);
23
- function i(e, o) {
24
- e.forEach(function(r) {
25
- Array.isArray(r) ? i(r, o) : o.push(r);
26
- });
27
- }
28
- function y(e) {
29
- let o = [];
30
- return i(e, o), o;
31
- }
32
- var a = (...e) => y(e).filter(Boolean);
33
- var p = (e, o) => {
34
- let r = {}, c = Object.keys(e), f = Object.keys(o);
35
- for (let t of c) if (f.includes(t)) {
36
- let s = e[t], n = o[t];
37
- typeof s == "object" && typeof n == "object" ? r[t] = p(s, n) : Array.isArray(s) || Array.isArray(n) ? r[t] = a(n, s) : r[t] = n + " " + s;
38
- } else r[t] = e[t];
39
- for (let t of f) c.includes(t) || (r[t] = o[t]);
40
- return r;
41
- };
42
- var g = (e) => !e || typeof e != "string" ? e : e.replace(/\s+/g, " ").trim();
43
- var ie = { twMerge: true, twMergeConfig: {}, responsiveVariants: false };
44
- var _ = (s) => s || void 0;
45
- var M = (...s) => _(y(s).filter(Boolean).join(" "));
46
- var R = null;
47
- var v = {};
48
- var q = false;
49
- var j = (...s) => (b$1) => b$1.twMerge ? ((!R || q) && (q = false, R = u(v) ? twMerge : extendTailwindMerge({ ...v, extend: { theme: v.theme, classGroups: v.classGroups, conflictingClassGroupModifiers: v.conflictingClassGroupModifiers, conflictingClassGroups: v.conflictingClassGroups, ...v.extend } })), _(R(M(s)))) : M(s);
50
- var Z = (s, b) => {
51
- for (let e in b) s.hasOwnProperty(e) ? s[e] = M(s[e], b[e]) : s[e] = b[e];
52
- return s;
53
- };
54
- var ce = (s, b$1) => {
55
- let { extend: e = null, slots: N = {}, variants: F = {}, compoundVariants: U = [], compoundSlots: C = [], defaultVariants: W = {} } = s, m = { ...ie, ...b$1 }, S = e != null && e.base ? M(e.base, s == null ? void 0 : s.base) : s == null ? void 0 : s.base, g$1 = e != null && e.variants && !u(e.variants) ? p(F, e.variants) : F, A = e != null && e.defaultVariants && !u(e.defaultVariants) ? { ...e.defaultVariants, ...W } : W;
56
- !u(m.twMergeConfig) && !x(m.twMergeConfig, v) && (q = true, v = m.twMergeConfig);
57
- let O = u(e == null ? void 0 : e.slots), $ = u(N) ? {} : { base: M(s == null ? void 0 : s.base, O && (e == null ? void 0 : e.base)), ...N }, w = O ? $ : Z({ ...e == null ? void 0 : e.slots }, u($) ? { base: s == null ? void 0 : s.base } : $), h$1 = u(e == null ? void 0 : e.compoundVariants) ? U : a(e == null ? void 0 : e.compoundVariants, U), V = (f) => {
58
- if (u(g$1) && u(N) && O) return j(S, f == null ? void 0 : f.class, f == null ? void 0 : f.className)(m);
59
- if (h$1 && !Array.isArray(h$1)) throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof h$1}`);
60
- if (C && !Array.isArray(C)) throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof C}`);
61
- let K = (t, n, a2 = [], i2) => {
62
- let r = a2;
63
- if (typeof n == "string") r = r.concat(g(n).split(" ").map((o) => `${t}:${o}`));
64
- else if (Array.isArray(n)) r = r.concat(n.reduce((o, c) => o.concat(`${t}:${c}`), []));
65
- else if (typeof n == "object" && typeof i2 == "string") {
66
- for (let o in n) if (n.hasOwnProperty(o) && o === i2) {
67
- let c = n[o];
68
- if (c && typeof c == "string") {
69
- let l2 = g(c);
70
- r[i2] ? r[i2] = r[i2].concat(l2.split(" ").map((u2) => `${t}:${u2}`)) : r[i2] = l2.split(" ").map((u2) => `${t}:${u2}`);
71
- } else Array.isArray(c) && c.length > 0 && (r[i2] = c.reduce((l2, u2) => l2.concat(`${t}:${u2}`), []));
72
- }
73
- }
74
- return r;
75
- }, z = (t, n = g$1, a$1 = null, i2 = null) => {
76
- var J;
77
- let r = n[t];
78
- if (!r || u(r)) return null;
79
- let o = (J = i2 == null ? void 0 : i2[t]) != null ? J : f == null ? void 0 : f[t];
80
- if (o === null) return null;
81
- let c = l(o), l2 = Array.isArray(m.responsiveVariants) && m.responsiveVariants.length > 0 || m.responsiveVariants === true, u2 = A == null ? void 0 : A[t], d = [];
82
- if (typeof c == "object" && l2) for (let [T, L] of Object.entries(c)) {
83
- let ne = r[L];
84
- if (T === "initial") {
85
- u2 = L;
86
- continue;
87
- }
88
- Array.isArray(m.responsiveVariants) && !m.responsiveVariants.includes(T) || (d = K(T, ne, d, a$1));
89
- }
90
- let ae = c != null && typeof c != "object" ? c : l(u2), k = r[ae || "false"];
91
- return typeof d == "object" && typeof a$1 == "string" && d[a$1] ? Z(d, k) : d.length > 0 ? (d.push(k), d) : k;
92
- }, P = () => g$1 ? Object.keys(g$1).map((t) => z(t, g$1)) : null, p2 = (t, n) => {
93
- if (!g$1 || typeof g$1 != "object") return null;
94
- let a2 = new Array();
95
- for (let i2 in g$1) {
96
- let r = z(i2, g$1, t, n), o = t === "base" && typeof r == "string" ? r : r && r[t];
97
- o && (a2[a2.length] = o);
98
- }
99
- return a2;
100
- }, D = {};
101
- for (let t in f) f[t] !== void 0 && (D[t] = f[t]);
102
- let H = (t, n) => {
103
- var i2;
104
- let a2 = typeof (f == null ? void 0 : f[t]) == "object" ? { [t]: (i2 = f[t]) == null ? void 0 : i2.initial } : {};
105
- return { ...A, ...D, ...a2, ...n };
106
- }, I = (t = [], n) => {
107
- let a2 = [];
108
- for (let { class: i2, className: r, ...o } of t) {
109
- let c = true;
110
- for (let [l2, u2] of Object.entries(o)) {
111
- let d = H(l2, n);
112
- if (Array.isArray(u2)) {
113
- if (!u2.includes(d[l2])) {
114
- c = false;
115
- break;
116
- }
117
- } else if (d[l2] !== u2) {
118
- c = false;
119
- break;
120
- }
121
- }
122
- c && (i2 && a2.push(i2), r && a2.push(r));
123
- }
124
- return a2;
125
- }, ee = (t) => {
126
- let n = I(h$1, t);
127
- if (!Array.isArray(n)) return n;
128
- let a2 = {};
129
- for (let i2 of n) if (typeof i2 == "string" && (a2.base = j(a2.base, i2)(m)), typeof i2 == "object") for (let [r, o] of Object.entries(i2)) a2[r] = j(a2[r], o)(m);
130
- return a2;
131
- }, te = (t) => {
132
- if (C.length < 1) return null;
133
- let n = {};
134
- for (let { slots: a2 = [], class: i2, className: r, ...o } of C) {
135
- if (!u(o)) {
136
- let c = true;
137
- for (let l2 of Object.keys(o)) {
138
- let u2 = H(l2, t)[l2];
139
- if (u2 === void 0 || (Array.isArray(o[l2]) ? !o[l2].includes(u2) : o[l2] !== u2)) {
140
- c = false;
141
- break;
142
- }
143
- }
144
- if (!c) continue;
145
- }
146
- for (let c of a2) n[c] = n[c] || [], n[c].push([i2, r]);
147
- }
148
- return n;
149
- };
150
- if (!u(N) || !O) {
151
- let t = {};
152
- if (typeof w == "object" && !u(w)) for (let n of Object.keys(w)) t[n] = (a2) => {
153
- var i2, r;
154
- return j(w[n], p2(n, a2), ((i2 = ee(a2)) != null ? i2 : [])[n], ((r = te(a2)) != null ? r : [])[n], a2 == null ? void 0 : a2.class, a2 == null ? void 0 : a2.className)(m);
155
- };
156
- return t;
157
- }
158
- return j(S, P(), I(h$1), f == null ? void 0 : f.class, f == null ? void 0 : f.className)(m);
159
- }, x2 = () => {
160
- if (!(!g$1 || typeof g$1 != "object")) return Object.keys(g$1);
161
- };
162
- return V.variantKeys = x2(), V.extend = e, V.base = S, V.slots = w, V.variants = g$1, V.defaultVariants = A, V.compoundSlots = C, V.compoundVariants = h$1, V;
163
- };
164
- var avatarVariants = ce({
165
- base: "flex items-center justify-center rounded-full",
166
- variants: {
167
- color: { default: "bg-neutral-100", indigo: "bg-indigo-600" },
168
- type: {
169
- icon: "[&_path]:fill-neutral-500 [&_svg]:fill-neutral-500",
170
- capitals: "font-semibold text-neutral-500",
171
- image: "[&_img]:rounded-full"
172
- },
173
- size: {
174
- small: "size-4",
175
- medium: "size-5",
176
- large: "size-7"
177
- }
178
- },
179
- compoundVariants: [
180
- {
181
- size: "large",
182
- type: ["capitals", "icon"],
183
- className: "text-xl [&_svg]:size-5"
184
- },
185
- {
186
- size: "medium",
187
- type: ["capitals", "icon"],
188
- className: "text-lg [&_svg]:size-3"
189
- },
190
- {
191
- size: "small",
192
- type: ["capitals", "icon"],
193
- className: "text-base [&_svg]:size-2"
194
- },
195
- {
196
- color: "indigo",
197
- type: ["capitals", "icon"],
198
- className: "text-white [&_path]:fill-white [&_svg]:fill-white"
199
- }
200
- ],
201
- defaultVariants: {
202
- color: "default"
203
- }
204
- });
205
- var Avatar = React4__default.forwardRef(
206
- ({ className, color, type, size, children, asChild, ...props }, forwardedRef) => {
207
- const Comp = asChild ? Slot : "div";
208
- return /* @__PURE__ */ jsx(
209
- Comp,
210
- {
211
- className: avatarVariants({ color, type, size, className }),
212
- ref: forwardedRef,
213
- ...props,
214
- children
215
- }
216
- );
217
- }
218
- );
219
- Avatar.displayName = "Avatar";
220
- var avatar_default = Avatar;
221
- function cn(...inputs) {
222
- return twMerge(clsx(inputs));
223
- }
224
- var TextVariants = ce({
225
- base: "",
226
- variants: {
227
- size: {
228
- H1: "text-3xl",
229
- H2: "text-2xl",
230
- H3: "text-xl",
231
- large: "text-lg",
232
- base: "text-base",
233
- small: "text-sm",
234
- overline: "text-xs uppercase"
235
- },
236
- weight: {
237
- normal: "font-normal",
238
- medium: "font-medium",
239
- semibold: "font-semibold"
240
- }
241
- },
242
- defaultVariants: {
243
- size: "base",
244
- weight: "normal"
245
- }
246
- });
247
- var Text = ({ className, size, weight, children, ...props }) => {
248
- return /* @__PURE__ */ jsx("span", { className: cn(TextVariants({ size, weight, className })), ...props, children });
249
- };
250
- Text.displayName = "Text";
251
- var text_default = Text;
252
- var badgeVariants = ce({
253
- base: "flex items-center justify-center rounded-full",
254
- variants: {
255
- contrast: { true: "", false: "" },
256
- status: {
257
- info: "bg-notification-information-100 text-notification-information-600",
258
- attention: "bg-notification-warning-100 text-notification-warning-900",
259
- white: "text-notification-information-600 bg-white"
260
- },
261
- size: {
262
- small: "h-2",
263
- normal: "h-3"
264
- },
265
- type: {
266
- pill: "w-fit px-1",
267
- dot: ""
268
- }
269
- },
270
- compoundVariants: [
271
- {
272
- status: "info",
273
- contrast: true,
274
- class: "bg-notification-information-600 text-white"
275
- },
276
- {
277
- status: "attention",
278
- contrast: true,
279
- class: "bg-notification-warning-600"
280
- },
281
- {
282
- type: "dot",
283
- size: "small",
284
- class: "w-2"
285
- },
286
- {
287
- type: "dot",
288
- size: "normal",
289
- class: "w-3"
290
- }
291
- ],
292
- defaultVariants: {
293
- status: "info",
294
- size: "normal",
295
- type: "pill"
296
- }
297
- });
298
- var Badge = React4__default.forwardRef(
299
- ({ className, status, size, type, contrast, children, asChild, ...props }, ref) => {
300
- const Comp = asChild ? Slot : "span";
301
- return /* @__PURE__ */ jsx(
302
- Comp,
303
- {
304
- className: badgeVariants({ status, size, type, contrast, className }),
305
- ref,
306
- ...props,
307
- children: /* @__PURE__ */ jsx(text_default, { size: "overline", weight: "semibold", children })
308
- }
309
- );
310
- }
311
- );
312
- Badge.displayName = "Badge";
313
- var badge_default = Badge;
314
- var buttonVariants = ce({
315
- variants: {
316
- appearance: {
317
- primary: {
318
- container: "bg-primary hover:bg-green-900 ",
319
- text: "text-white",
320
- icon: "fill-white [&_path]:fill-white"
321
- },
322
- secondary: {
323
- container: "border border-green-600 bg-white hover:bg-green-100 ",
324
- text: "text-green-600",
325
- icon: "fill-green-600 [&_path]:fill-green-600"
326
- },
327
- tertiary: {
328
- container: "border border-indigo-600 bg-white hover:bg-indigo-100 ",
329
- text: "text-indigo-600",
330
- icon: "fill-indigo-600 [&_path]:fill-indigo-600"
331
- },
332
- danger: {
333
- container: "border-notification-critical-600 hover:bg-notification-critical-600 group/danger border bg-white",
334
- text: "text-notification-critical-600 group-hover/danger:text-white",
335
- icon: "fill-notification-critical-600 [&_path]:fill-notification-critical-600 group-hover/danger:fill-white group-hover/danger:[&_path]:fill-white"
336
- },
337
- link: {
338
- container: "bg-white hover:bg-green-100 ",
339
- text: "text-green-600",
340
- icon: "fill-green-600 [&_path]:fill-green-600"
341
- },
342
- table: {
343
- container: "bg-white hover:bg-neutral-100 ",
344
- text: "text-neutral-400",
345
- icon: "fill-neutral-400 [&_path]:fill-neutral-400"
346
- }
347
- },
348
- size: {
349
- medium: {
350
- container: "h-5",
351
- icon: "text-base"
352
- },
353
- small: {
354
- container: "h-4",
355
- text: "mx-1 text-sm",
356
- icon: "group-data-[has-text=true]:ml-0"
357
- }
358
- },
359
- disabled: {
360
- true: {
361
- container: "pointer-events-none cursor-not-allowed border-neutral-200 bg-neutral-100",
362
- text: "text-neutral-300",
363
- icon: "fill-neutral-300 [&_path]:fill-neutral-300"
364
- },
365
- false: ""
366
- }
367
- },
368
- slots: {
369
- container: "group inline-flex items-center justify-center rounded-md p-1 focus:outline-none focus:ring-0 data-[has-icon=true]:gap-1",
370
- icon: "size-3 group-data-[has-text=true]:ml-1",
371
- text: "mx-2 group-data-[has-icon=true]:ml-0"
372
- },
373
- defaultVariants: {
374
- appearance: "primary",
375
- size: "medium"
376
- }
377
- });
378
- var Button = React4__default.forwardRef(
379
- ({
380
- className,
381
- appearance,
382
- size,
383
- disabled,
384
- children,
385
- asChild,
386
- icon: Icon,
387
- ...props
388
- }, ref) => {
389
- const Comp = asChild ? Slot : "button";
390
- const slots = buttonVariants({ appearance, size, disabled, className });
391
- return /* @__PURE__ */ jsxs(
392
- Comp,
393
- {
394
- "data-has-icon": !!Icon,
395
- "data-has-text": !!children,
396
- className: slots.container(),
397
- ref,
398
- ...props,
399
- children: [
400
- Icon && /* @__PURE__ */ jsx(Icon, { className: slots.icon() }),
401
- children && /* @__PURE__ */ jsx(text_default, { size: "base", weight: "medium", className: slots.text(), children })
402
- ]
403
- }
404
- );
405
- }
406
- );
407
- Button.displayName = "Button";
408
- var button_default = Button;
409
- var cardVariants = ce({
410
- base: "flex w-full border border-gray-200 bg-white p-2",
411
- variants: {
412
- variant: {
413
- default: "rounded-m",
414
- big: "rounded-x",
415
- small: "rounded-s"
416
- },
417
- direction: {
418
- col: "flex-col",
419
- row: "flex-row"
420
- },
421
- padding: {
422
- none: "p-0",
423
- small: "p-1",
424
- medium: "p-2",
425
- big: "p-3"
426
- }
427
- },
428
- defaultVariants: {
429
- variant: "default",
430
- direction: "col",
431
- padding: "none"
432
- }
433
- });
434
- var Card = ({
435
- className,
436
- variant,
437
- direction,
438
- padding,
439
- children,
440
- ...props
441
- }) => {
442
- return /* @__PURE__ */ jsx(
443
- "div",
444
- {
445
- className: cn(cardVariants({ variant, direction, padding, className })),
446
- ...props,
447
- children
448
- }
449
- );
450
- };
451
- Card.displayName = "Card";
452
- var card_default = Card;
453
- var scopeVariants = ce({
454
- variants: {
455
- variant: {
456
- default: "",
457
- light: "",
458
- green: "",
459
- red: ""
460
- },
461
- size: {
462
- default: {
463
- container: "h-5"
464
- },
465
- small: {
466
- container: "h-4",
467
- text: "text-sm"
468
- }
469
- },
470
- disabled: {
471
- true: {
472
- container: "cursor-initial border-neutral-200 bg-neutral-100 text-neutral-300",
473
- icon: "[&_path]:fill-neutral-300 [&_svg]:fill-neutral-300"
474
- },
475
- false: {
476
- container: "border-neutral-200 text-neutral-500 hover:bg-neutral-100",
477
- icon: "[&_path]:fill-neutral-500 [&_svg]:fill-neutral-500"
478
- }
479
- }
480
- },
481
- compoundVariants: [
482
- {
483
- disabled: false,
484
- variant: "default",
485
- class: {
486
- container: "data-[state=on]:border-indigo-600 data-[state=on]:bg-indigo-600",
487
- text: "group-data-[state=on]:text-white",
488
- icon: "group-data-[state=on]:fill-white [&_path]:group-data-[state=on]:fill-white"
489
- }
490
- },
491
- {
492
- disabled: false,
493
- variant: "light",
494
- class: {
495
- container: "data-[state=on]:border-indigo-600 data-[state=on]:bg-indigo-100",
496
- text: "group-data-[state=on]:text-indigo-600",
497
- icon: "group-data-[state=on]:fill-indigo-600 [&_path]:group-data-[state=on]:fill-indigo-600"
498
- }
499
- },
500
- {
501
- disabled: false,
502
- variant: "green",
503
- class: {
504
- container: "data-[state=on]:border-notification-success-600 data-[state=on]:bg-notification-success-100",
505
- text: "group-data-[state=on]:text-notification-success-600",
506
- icon: "group-data-[state=on]:fill-notification-success-600 [&_path]:group-data-[state=on]:fill-notification-success-600"
507
- }
508
- },
509
- {
510
- disabled: false,
511
- variant: "red",
512
- class: {
513
- container: "data-[state=on]:border-notification-critical-600 data-[state=on]:bg-notification-critical-100",
514
- text: "group-data-[state=on]:text-notification-critical-600",
515
- icon: "group-data-[state=on]:fill-notification-critical-600 [&_path]:group-data-[state=on]:fill-notification-critical-600"
516
- }
517
- }
518
- ],
519
- slots: {
520
- container: "first:rounded-ss-m first:rounded-es-m last:rounded-se-m last:rounded-ee-m group flex items-center gap-1 border px-2 [&:nth-child(n+2)]:data-[state=off]:border-l-0",
521
- icon: "size-3",
522
- text: ""
523
- },
524
- defaultVariants: {
525
- disabled: false,
526
- variant: "default",
527
- size: "default"
528
- }
529
- });
530
- var ScopeGroupContext = React4__default.createContext({
531
- variant: "default",
532
- size: "default",
533
- disabled: false
534
- });
535
- var Group = React4__default.forwardRef(({ className, variant, children, size, disabled, ...props }, ref) => /* @__PURE__ */ jsx(
536
- ToggleGroupPrimitive.Root,
537
- {
538
- ref,
539
- className: cn("flex items-center justify-center gap-0", className),
540
- ...props,
541
- type: "single",
542
- children: /* @__PURE__ */ jsx(
543
- ScopeGroupContext.Provider,
544
- {
545
- value: {
546
- variant,
547
- size,
548
- disabled
549
- },
550
- children
551
- }
552
- )
553
- }
554
- ));
555
- Group.displayName = "ScopeGroup";
556
- var Item2 = React4__default.forwardRef(({ className, variant, size, icon: Icon, text, disabled, ...props }, ref) => {
557
- const context = React4__default.useContext(ScopeGroupContext);
558
- const slots = scopeVariants({
559
- variant: context.variant || variant,
560
- size: context.size || size,
561
- disabled: context.disabled || disabled
562
- });
563
- return /* @__PURE__ */ jsxs(
564
- ToggleGroupPrimitive.Item,
565
- {
566
- ref,
567
- className: cn(slots.container(), className),
568
- disabled,
569
- ...props,
570
- children: [
571
- Icon && /* @__PURE__ */ jsx(Icon, { className: slots.icon() }),
572
- /* @__PURE__ */ jsx(text_default, { size: "base", weight: "normal", className: slots.text(), children: text })
573
- ]
574
- }
575
- );
576
- });
577
- Item2.displayName = "ScopeItem";
578
- var Scope = {
579
- Group,
580
- Item: Item2
581
- };
582
- var scope_default = Scope;
583
- var ProgressBar = ({
584
- value,
585
- className,
586
- barBg,
587
- progressBg
588
- }) => {
589
- const translateClass = `-translate-x-[(-${100 - (value || 0)}%])`;
590
- return /* @__PURE__ */ jsx(
591
- Root$2,
592
- {
593
- className: cn(
594
- className,
595
- barBg,
596
- "relative w-full overflow-hidden rounded-full "
597
- ),
598
- value,
599
- children: /* @__PURE__ */ jsx(
600
- Indicator,
601
- {
602
- className: cn(
603
- className,
604
- "w-full flex-1 rounded-full",
605
- translateClass,
606
- progressBg
607
- )
608
- }
609
- )
610
- }
611
- );
612
- };
613
- var progress_bar_default = ProgressBar;
614
- var inputVariants = ce({
615
- variants: {
616
- disabled: {
617
- true: {
618
- input: "cursor-not-allowed bg-neutral-100 text-neutral-400",
619
- prefixIcon: "fill-neutral-300 [&_path]:fill-neutral-300",
620
- suffixIcon: "fill-neutral-300 [&_path]:fill-neutral-300"
621
- }
622
- },
623
- invalid: {
624
- true: {
625
- input: "border-notification-critical-600 focus:border-notification-critical-600"
626
- }
627
- },
628
- size: {
629
- medium: {
630
- prefixIcon: "top-1",
631
- suffixIcon: "top-1",
632
- input: "h-5"
633
- },
634
- small: {
635
- prefixIcon: "top-0.5",
636
- suffixIcon: "top-0.5",
637
- input: "h-4"
638
- }
639
- }
640
- },
641
- slots: {
642
- prefixIcon: "absolute left-1 top-1 size-3",
643
- input: "rounded-m flex w-full border border-neutral-200 p-2 text-base text-indigo-600 placeholder:font-light placeholder:text-neutral-400 focus:border-indigo-600 focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed data-[has-prefix-icon=true]:pl-5 data-[has-suffix-icon=true]:pr-5",
644
- suffixIcon: "absolute right-1 top-1 size-3"
645
- },
646
- defaultVariants: {
647
- size: "medium"
648
- }
649
- });
650
- var Input = React4__default.forwardRef(
651
- ({ className, prefixIcon, suffixIcon, disabled, invalid, size, ...props }, ref) => {
652
- const slots = inputVariants();
653
- return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
654
- prefixIcon && /* @__PURE__ */ jsx("div", { className: slots.prefixIcon({ invalid, size }), children: prefixIcon }),
655
- /* @__PURE__ */ jsx(
656
- "input",
657
- {
658
- disabled,
659
- "data-has-prefix-icon": !!prefixIcon,
660
- "data-has-suffix-icon": !!suffixIcon,
661
- className: cn(
662
- slots.input({ disabled, invalid, size }),
663
- className,
664
- "form-input"
665
- ),
666
- ref,
667
- ...props
668
- }
669
- ),
670
- suffixIcon && /* @__PURE__ */ jsx("div", { className: slots.suffixIcon({ invalid, size }), children: suffixIcon })
671
- ] });
672
- }
673
- );
674
- Input.displayName = "Input";
675
- var input_default = Input;
676
- var Textarea = React4.forwardRef(
677
- ({ className, disabled, invalid, ...props }, ref) => {
678
- const { input } = inputVariants();
679
- return /* @__PURE__ */ jsx(
680
- "textarea",
681
- {
682
- className: cn("min-h-9", className, input({ disabled, invalid })),
683
- ref,
684
- ...props
685
- }
686
- );
687
- }
688
- );
689
- Textarea.displayName = "Textarea";
690
- var textarea_default = Textarea;
691
- var Sheet = ({
692
- title,
693
- children,
694
- isVisible,
695
- CloseIcon,
696
- maxWidth,
697
- onClose
698
- }) => {
699
- const [isOpen, setOpen] = useState(isVisible);
700
- useEffect(() => setOpen(isVisible), [isVisible]);
701
- const handleClose = (confirm) => {
702
- setOpen(false);
703
- if (onClose) onClose(confirm);
704
- };
705
- return /* @__PURE__ */ jsxs(Fragment, { children: [
706
- /* @__PURE__ */ jsx(
707
- "div",
708
- {
709
- className: cn(
710
- "fixed left-0 top-0 z-30 h-screen w-screen bg-black opacity-50",
711
- !isOpen ? "hidden" : void 0
712
- )
713
- }
714
- ),
715
- /* @__PURE__ */ jsxs(
716
- "div",
717
- {
718
- className: cn(
719
- "shadow-big fixed right-0 top-0 z-40 h-screen overflow-y-auto overflow-x-hidden rounded-l-lg bg-white transition-transform dark:bg-gray-800",
720
- maxWidth ? `max-w=[${maxWidth}]` : "max-w-3/4",
721
- !isOpen ? "translate-x-full" : void 0
722
- ),
723
- tabIndex: -1,
724
- "aria-labelledby": "drawer-label",
725
- children: [
726
- /* @__PURE__ */ jsxs(
727
- "div",
728
- {
729
- id: "drawer-label",
730
- className: cn(
731
- " mb-2 flex items-center justify-between border-b-2 border-slate-100 p-2 text-base font-semibold text-gray-500 dark:text-gray-400"
732
- ),
733
- children: [
734
- /* @__PURE__ */ jsx(text_default, { size: "H3", weight: "semibold", className: "text-navy-600", children: title }),
735
- /* @__PURE__ */ jsxs(
736
- "button",
737
- {
738
- type: "button",
739
- "data-drawer-hide": "drawer-example",
740
- "aria-controls": "drawer-example",
741
- className: cn(
742
- "b-0 ml-2 flex size-9 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
743
- ),
744
- onClick: () => handleClose,
745
- children: [
746
- CloseIcon ? /* @__PURE__ */ jsx(CloseIcon, {}) : /* @__PURE__ */ jsx(
747
- "svg",
748
- {
749
- width: "24",
750
- height: "24",
751
- viewBox: "0 0 24 24",
752
- fill: "none",
753
- xmlns: "http://www.w3.org/2000/svg",
754
- children: /* @__PURE__ */ jsx(
755
- "path",
756
- {
757
- "fill-rule": "evenodd",
758
- "clip-rule": "evenodd",
759
- d: "M6.70711 18.7071L18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071ZM17.2929 18.7071L13.8201 15.2343C13.4296 14.8438 13.4296 14.2106 13.8201 13.8201C14.2106 13.4296 14.8438 13.4296 15.2343 13.8201L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071Z",
760
- fill: "#8D95A7"
761
- }
762
- )
763
- }
764
- ),
765
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close menu" })
766
- ]
767
- }
768
- )
769
- ]
770
- }
771
- ),
772
- /* @__PURE__ */ jsx("div", { className: cn(" relative h-full p-2"), children })
773
- ]
774
- }
775
- )
776
- ] });
777
- };
778
- Sheet.displayName = "Sheet";
779
- var sheets_default = Sheet;
780
- var toggleVariants = ce({
781
- base: "after:start-0.25 after:top-0.25 peer relative mr-1 h-3 w-5 rounded-full bg-neutral-200 after:absolute after:size-[20px] after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-green-600 peer-checked:after:translate-x-2 peer-checked:after:border-white peer-focus:outline-none peer-focus:ring-0",
782
- variants: {
783
- disabled: {
784
- true: "cursor-not-allowed bg-neutral-100 after:border-neutral-100 peer-checked:bg-green-100 peer-checked:after:border-green-100"
785
- }
786
- }
787
- });
788
- var Toggle = forwardRef(
789
- ({ className, name, disabled, children, ...props }, ref) => {
790
- return /* @__PURE__ */ jsxs(
791
- "label",
792
- {
793
- className: cn("inline-flex cursor-pointer items-center", className),
794
- children: [
795
- /* @__PURE__ */ jsx(
796
- "input",
797
- {
798
- ...props,
799
- ref,
800
- type: "checkbox",
801
- className: cn("peer sr-only"),
802
- name,
803
- disabled
804
- }
805
- ),
806
- /* @__PURE__ */ jsx("span", { className: toggleVariants({ disabled }) }),
807
- /* @__PURE__ */ jsx(text_default, { children })
808
- ]
809
- }
810
- );
811
- }
812
- );
813
- Toggle.displayName = "Toggle";
814
- var toggle_default = Toggle;
815
- var collapse = ce({
816
- slots: {
817
- item: "mb-1 rounded-lg border-0 last:mb-0",
818
- trigger: "[&[data-state=open]]:rounded-t-m [&[data-state=open]]:bg-secondary-indigo-100 [&[data-state=closed]]:rounded-m flex h-7 w-full items-center border-0 p-1 text-left transition-all hover:bg-neutral-100 [&[data-disabled]]:cursor-not-allowed [&[data-disabled]]:bg-neutral-200 [&[data-disabled]]:text-neutral-400 [&[data-state=open]>svg]:rotate-180 [&[data-state=open]]:hover:bg-neutral-100",
819
- triggerIcon: "size-3 transition-transform duration-200",
820
- content: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down rounded-b-m overflow-hidden border transition-all"
821
- }
822
- });
823
- var { trigger, item, triggerIcon, content } = collapse();
824
- var CollapsibleRoot = React4__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
825
- CollapsiblePrimitive.Root,
826
- {
827
- ref,
828
- className: item({ className }),
829
- ...props
830
- }
831
- ));
832
- var CollapsibleTrigger2 = React4__default.forwardRef(({ className, triggerClassName, children, ...props }, ref) => /* @__PURE__ */ jsxs(
833
- CollapsiblePrimitive.CollapsibleTrigger,
834
- {
835
- ref,
836
- className: trigger({ className: triggerClassName }),
837
- ...props,
838
- children: [
839
- /* @__PURE__ */ jsx("div", { className: cn("w-full", className), children }),
840
- /* @__PURE__ */ jsx(IconOutlineChevronDown, { className: triggerIcon() })
841
- ]
842
- }
843
- ));
844
- var CollapsibleContent2 = React4__default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
845
- CollapsiblePrimitive.CollapsibleContent,
846
- {
847
- ref,
848
- className: content(),
849
- ...props,
850
- children: /* @__PURE__ */ jsx("div", { className: cn("px-1 py-2", className), children })
851
- }
852
- ));
853
- var Collapsible = {
854
- Item: CollapsibleRoot,
855
- Trigger: CollapsibleTrigger2,
856
- Content: CollapsibleContent2
857
- };
858
- var collapsible_default = Collapsible;
859
- var indicatorVariants = ce({
860
- base: "text-medium flex h-3 items-center justify-center rounded-sm border border-neutral-200 px-1 py-0.5 [&_svg]:-ml-0.5 [&_svg]:w-2",
861
- variants: {
862
- status: {
863
- positive: "text-notification-success-600 [&_svg]:fill-notification-success-600",
864
- negative: "text-notification-critical-600 [&_svg]:fill-notification-critical-600",
865
- neutral: "text-notification-warning-900 [&_svg]:fill-notification-warning-900",
866
- info: "border-indigo-600 text-indigo-600"
867
- }
868
- }
869
- });
870
- var Indicator2 = React4__default.forwardRef(
871
- ({ className, status, value, icon, ...props }, ref) => {
872
- const Icon = {
873
- positive: /* @__PURE__ */ jsx(IconOutlineArrowUp, {}),
874
- negative: /* @__PURE__ */ jsx(IconOutlineArrowDown, {}),
875
- neutral: /* @__PURE__ */ jsx(IconOutlineMinus, {})
876
- };
877
- return /* @__PURE__ */ jsxs(
878
- "div",
879
- {
880
- className: indicatorVariants({ status, className }),
881
- ref,
882
- ...props,
883
- children: [
884
- icon && Icon[icon],
885
- /* @__PURE__ */ jsxs(text_default, { size: "overline", weight: "semibold", children: [
886
- value,
887
- "%"
888
- ] })
889
- ]
890
- }
891
- );
892
- }
893
- );
894
- var indicator_default = Indicator2;
895
- var DropdownContent = ({
896
- options,
897
- selected,
898
- onChange,
899
- className
900
- }) => /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
901
- Content,
902
- {
903
- align: "start",
904
- className: cn(
905
- "shadow-down data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 rounded-md border bg-white p-1",
906
- className
907
- ),
908
- children: options.map((option) => /* @__PURE__ */ jsx(
909
- Item,
910
- {
911
- "data-selected": selected === option.value,
912
- className: "relative flex cursor-pointer select-none rounded-sm\n px-2 py-1 text-base font-normal text-neutral-500 outline-none\n transition-colors focus:bg-indigo-100 focus:text-indigo-600 \n data-[selected=true]:bg-indigo-100 data-[selected=true]:font-medium data-[selected=true]:text-indigo-600",
913
- onClick: () => onChange && onChange(option.value),
914
- children: option.text
915
- }
916
- ))
917
- }
918
- ) });
919
- var statusVariants = ce({
920
- base: "text-medium flex items-center justify-center rounded-sm px-1 py-0.5",
921
- variants: {
922
- status: {
923
- success: [
924
- "bg-notification-success-100",
925
- "text-notification-success-600",
926
- "[&_svg]:fill-notification-success-600 [&_span:nth-child(1)]:bg-notification-success-600"
927
- ],
928
- attention: [
929
- "bg-notification-warning-100",
930
- "text-notification-warning-900",
931
- "[&_svg]:fill-notification-warning-900 [&_span:nth-child(1)]:bg-notification-warning-900"
932
- ],
933
- info: [
934
- "bg-notification-information-100",
935
- "text-notification-information-600",
936
- "[&_svg]:fill-notification-information-600 [&_span:nth-child(1)]:bg-notification-information-600"
937
- ],
938
- error: [
939
- "bg-notification-critical-100",
940
- "text-notification-critical-900",
941
- "[&_svg]:fill-notification-critical-900 [&_span:nth-child(1)]:bg-notification-critical-900"
942
- ],
943
- disabled: [
944
- "bg-neutral-200 ",
945
- "text-neutral-500",
946
- "[&_span:nth-child(1)]:bg-neutral-500 [&_svg]:fill-neutral-500"
947
- ]
948
- }
949
- }
950
- });
951
- var Selected = ({ text }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
952
- /* @__PURE__ */ jsx("span", { className: "w-0.75 h-0.75 rounded-full bg-neutral-500" }),
953
- /* @__PURE__ */ jsx(text_default, { size: "overline", weight: "semibold", className: "select-none", children: text })
954
- ] });
955
- var StatusSimple = React4__default.forwardRef(
956
- ({ className, status, text, ...props }, ref) => {
957
- return /* @__PURE__ */ jsx(
958
- "div",
959
- {
960
- className: statusVariants({ status, className }),
961
- ref,
962
- ...props,
963
- children: /* @__PURE__ */ jsx(Selected, { text })
964
- }
965
- );
966
- }
967
- );
968
- var StatusMenu = React4__default.forwardRef(
969
- ({ className, status, options, value, onChange, ...props }, ref) => {
970
- const selected = options.find((op) => op.value === value);
971
- return /* @__PURE__ */ jsx(
972
- "div",
973
- {
974
- className: statusVariants({ status: selected == null ? void 0 : selected.status, className }),
975
- ref,
976
- ...props,
977
- children: /* @__PURE__ */ jsxs(Root, { children: [
978
- /* @__PURE__ */ jsxs(Trigger, { className: "flex items-center gap-0.5 outline-none", children: [
979
- /* @__PURE__ */ jsx(Selected, { text: (selected == null ? void 0 : selected.text) || "" }),
980
- /* @__PURE__ */ jsx(IconOutlineChevronDown, { "data-status": status, className: "-mr-0.5 size-2" })
981
- ] }),
982
- /* @__PURE__ */ jsx(
983
- DropdownContent,
984
- {
985
- selected: selected == null ? void 0 : selected.value,
986
- options,
987
- onChange,
988
- className: "-ml-1 mt-0.5"
989
- }
990
- )
991
- ] })
992
- }
993
- );
994
- }
995
- );
996
- var Status = {
997
- Menu: StatusMenu,
998
- ...StatusSimple
999
- };
1000
- var status_default = Status;
1001
- var progressVariants = ce({
1002
- base: "text-midnight-blue-600",
1003
- variants: {
1004
- bg: {
1005
- indigo: "bg-midnight-blue-100",
1006
- white: "bg-white to-white"
1007
- }
1008
- }
1009
- });
1010
- var Indicator3 = React4__default.forwardRef(
1011
- ({ className, bg, value, withBar, ...props }, ref) => /* @__PURE__ */ jsxs(
1012
- "div",
1013
- {
1014
- className: cn(
1015
- progressVariants({ bg, className }),
1016
- "flex h-3 flex-col items-center justify-center rounded-full px-1"
1017
- ),
1018
- ref,
1019
- ...props,
1020
- children: [
1021
- /* @__PURE__ */ jsxs(text_default, { size: "overline", weight: "medium", children: [
1022
- value,
1023
- "%"
1024
- ] }),
1025
- withBar && /* @__PURE__ */ jsx(
1026
- progress_bar_default,
1027
- {
1028
- barBg: bg === "indigo" ? "bg-white" : "bg-midnight-blue-100",
1029
- progressBg: "bg-midnight-blue-600",
1030
- value,
1031
- className: "h-0.25 mb-0.5"
1032
- }
1033
- )
1034
- ]
1035
- }
1036
- )
1037
- );
1038
- var Circle = React4__default.forwardRef(
1039
- ({ className, bg, value, Icon, ...props }, ref) => {
1040
- return /* @__PURE__ */ jsx(
1041
- RadixProgress.Root,
1042
- {
1043
- ref,
1044
- className: cn(
1045
- progressVariants({ bg }),
1046
- `text-midnight-blue-600 [&_svg]:fill-midnight-blue-600 [&_path]:fill-midnight-blue-600 relative flex size-6 items-center justify-center rounded-full`,
1047
- `bg-[conic-gradient(var(--tw-gradient-stops))] from-midnight-blue-600 to-midnight-blue-100 p-0.5`,
1048
- className
1049
- ),
1050
- ...props,
1051
- children: /* @__PURE__ */ jsx(
1052
- "div",
1053
- {
1054
- className: cn(
1055
- progressVariants({ bg }),
1056
- "flex size-full items-center justify-center rounded-full"
1057
- ),
1058
- children: Icon ? /* @__PURE__ */ jsx(Icon, { className: "size-3" }) : /* @__PURE__ */ jsxs("div", { className: "flex items-end", children: [
1059
- /* @__PURE__ */ jsx(text_default, { weight: "medium", children: value }),
1060
- /* @__PURE__ */ jsx(text_default, { size: "overline", weight: "medium", children: "%" })
1061
- ] })
1062
- }
1063
- )
1064
- }
1065
- );
1066
- }
1067
- );
1068
- var Expanded = React4__default.forwardRef(
1069
- ({ className, bg, value, text, ...props }, ref) => /* @__PURE__ */ jsxs(
1070
- "div",
1071
- {
1072
- "data-bg": bg,
1073
- className: cn(
1074
- progressVariants({ bg, className }),
1075
- `rounded-m data-[bg=white]:border-midnight-blue-600 flex w-full flex-col items-center justify-center gap-1
1076
- p-2 data-[bg=white]:border`
1077
- ),
1078
- ref,
1079
- ...props,
1080
- children: [
1081
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-1", children: [
1082
- /* @__PURE__ */ jsx(text_default, { weight: "normal", children: text }),
1083
- /* @__PURE__ */ jsx(Indicator3, { value, bg: bg === "white" ? "indigo" : "white" })
1084
- ] }),
1085
- /* @__PURE__ */ jsx(
1086
- progress_bar_default,
1087
- {
1088
- barBg: bg === "indigo" ? "bg-white" : "bg-midnight-blue-100",
1089
- progressBg: "bg-midnight-blue-600",
1090
- value,
1091
- className: "h-1"
1092
- }
1093
- )
1094
- ]
1095
- }
1096
- )
1097
- );
1098
- var Progress = {
1099
- Indicator: Indicator3,
1100
- Circle,
1101
- Expanded
1102
- };
1103
- var progress_default = Progress;
1104
- var chipsVariants = ce({
1105
- variants: {
1106
- size: {
1107
- small: {
1108
- container: "h-3",
1109
- icon: "size-2"
1110
- },
1111
- medium: {
1112
- container: "h-4",
1113
- icon: "size-3"
1114
- }
1115
- },
1116
- border: {
1117
- true: {
1118
- container: "border border-neutral-200 text-neutral-500",
1119
- icon: "fill-neutral-400 [&_path]:fill-neutral-400"
1120
- },
1121
- false: {
1122
- container: "bg-indigo-100 text-indigo-600",
1123
- icon: "fill-indigo-600 [&_path]:fill-indigo-600"
1124
- }
1125
- },
1126
- active: {
1127
- true: {
1128
- container: "bg-indigo-600 text-white hover:bg-indigo-900",
1129
- icon: "fill-white [&_path]:fill-white"
1130
- }
1131
- }
1132
- },
1133
- slots: {
1134
- container: "group flex items-center rounded-full px-1 hover:border-0 hover:bg-indigo-600 hover:font-medium hover:text-white",
1135
- icon: "group-hover:[&_path]:fill-white group-hover:[&_svg]:fill-white"
1136
- },
1137
- defaultVariants: {
1138
- size: "medium",
1139
- border: false,
1140
- active: false
1141
- }
1142
- });
1143
- var Chips = React4__default.forwardRef(
1144
- ({
1145
- className,
1146
- size,
1147
- icon: Icon,
1148
- text,
1149
- asChild,
1150
- value,
1151
- border,
1152
- active,
1153
- onClose,
1154
- ...props
1155
- }, ref) => {
1156
- const Comp = asChild ? Slot : "div";
1157
- const slots = chipsVariants();
1158
- return /* @__PURE__ */ jsxs(
1159
- Comp,
1160
- {
1161
- className: slots.container({ size, border, active, className }),
1162
- ref,
1163
- ...props,
1164
- children: [
1165
- Icon && /* @__PURE__ */ jsx(Icon, { className: slots.icon({ size, border, active }) }),
1166
- /* @__PURE__ */ jsx(text_default, { size: "base", weight: "normal", className: "mx-1", children: text }),
1167
- onClose && /* @__PURE__ */ jsx(
1168
- IconOutlineClose,
1169
- {
1170
- onClick: () => onClose(value),
1171
- className: cn(
1172
- slots.icon({ size, border, active }),
1173
- "cursor-pointer"
1174
- )
1175
- }
1176
- )
1177
- ]
1178
- }
1179
- );
1180
- }
1181
- );
1182
- Chips.displayName = "Chips";
1183
- var chips_default = Chips;
1184
- var labelVariants = ce({
1185
- base: "text-navy-600 text-base font-medium",
1186
- variants: {
1187
- invalid: {
1188
- true: "text-notification-critical-600"
1189
- }
1190
- }
1191
- });
1192
- var Label = ({
1193
- className,
1194
- text,
1195
- suffix: Suffix,
1196
- invalid,
1197
- htmlFor,
1198
- ...props
1199
- }) => /* @__PURE__ */ jsxs(
1200
- "div",
1201
- {
1202
- className: cn("mb-0.5 flex items-center gap-0.5 [&_svg]:w-2", className),
1203
- ...props,
1204
- children: [
1205
- /* @__PURE__ */ jsx("label", { className: labelVariants({ invalid }), htmlFor, children: text }),
1206
- Suffix && /* @__PURE__ */ jsx(Suffix, {})
1207
- ]
1208
- }
1209
- );
1210
- Label.displayName = "Label";
1211
- var label_default = Label;
1212
- var inputDescriptionVariants = ce({
1213
- variants: {
1214
- invalid: {
1215
- true: {
1216
- text: "text-notification-critical-600"
1217
- }
1218
- }
1219
- },
1220
- slots: {
1221
- text: "text-sm text-neutral-500",
1222
- counter: "py-0.25 flex h-[20px] items-center rounded-full bg-neutral-100 px-0.5 text-neutral-500"
1223
- }
1224
- });
1225
- var InputDescription = ({
1226
- className,
1227
- text,
1228
- counter,
1229
- maxLength,
1230
- invalid,
1231
- valueLength,
1232
- ...props
1233
- }) => {
1234
- const slots = inputDescriptionVariants();
1235
- return /* @__PURE__ */ jsxs("div", { className: cn("mt-0.5 flex justify-between", className), ...props, children: [
1236
- text && /* @__PURE__ */ jsx("span", { className: slots.text({ invalid }), children: text }),
1237
- counter && maxLength && /* @__PURE__ */ jsx("div", { className: slots.counter(), children: /* @__PURE__ */ jsxs(text_default, { size: "overline", weight: "semibold", children: [
1238
- valueLength || 0,
1239
- "/",
1240
- maxLength
1241
- ] }) })
1242
- ] });
1243
- };
1244
- InputDescription.displayName = "InputDescription";
1245
- var input_description_default = InputDescription;
1246
- var FormItem = ({
1247
- id,
1248
- className,
1249
- label,
1250
- description,
1251
- errorMessage,
1252
- invalid,
1253
- children,
1254
- disabled,
1255
- value,
1256
- maxLength,
1257
- ...props
1258
- }) => {
1259
- const descriptionText = errorMessage || description.text;
1260
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", className), ...props, children: [
1261
- /* @__PURE__ */ jsx(label_default, { ...label, invalid, htmlFor: id }),
1262
- React4__default.cloneElement(children, {
1263
- id,
1264
- invalid,
1265
- disabled,
1266
- value
1267
- }),
1268
- /* @__PURE__ */ jsx(
1269
- input_description_default,
1270
- {
1271
- ...description,
1272
- text: descriptionText,
1273
- invalid,
1274
- maxLength,
1275
- valueLength: value == null ? void 0 : value.length
1276
- }
1277
- )
1278
- ] });
1279
- };
1280
- var form_item_default = FormItem;
1281
- var checkboxVariants = ce({
1282
- variants: {
1283
- checked: {
1284
- false: {
1285
- checkbox: "hover:border-primary border-neutral-400 bg-white hover:bg-green-100"
1286
- },
1287
- indeterminate: {}
1288
- },
1289
- disabled: {
1290
- true: {
1291
- checkbox: "disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-100",
1292
- icon: "fill-neutral-300 [&_path]:fill-neutral-300 [&_rect]:fill-neutral-300"
1293
- }
1294
- }
1295
- },
1296
- slots: {
1297
- checkbox: "bg-primary border-primary focus-visible:rind-0 peer size-[20px] shrink-0 rounded-md border-2 text-white focus-visible:outline-none",
1298
- icon: "size-2 fill-white [&_path]:fill-white [&_rect]:fill-white"
1299
- }
1300
- });
1301
- var Checkbox = React4__default.forwardRef(({ className, checked, defaultChecked, disabled, ...props }, ref) => {
1302
- const slots = checkboxVariants();
1303
- return /* @__PURE__ */ jsx("div", { className: "flex size-3 items-center justify-center", children: /* @__PURE__ */ jsx(
1304
- Root$1,
1305
- {
1306
- ref,
1307
- className: cn(slots.checkbox({ checked, disabled }), className),
1308
- checked,
1309
- defaultChecked,
1310
- disabled,
1311
- ...props,
1312
- children: /* @__PURE__ */ jsxs("div", { className: "-ml-0.5 -mt-0.5 flex size-3 items-center justify-center", children: [
1313
- (checked === "indeterminate" || defaultChecked === "indeterminate") && /* @__PURE__ */ jsx(IconOutlineLine, { className: slots.icon({ disabled }) }),
1314
- (checked === true || defaultChecked === true) && /* @__PURE__ */ jsx(IconOutlineCheck, { className: slots.icon({ disabled }) })
1315
- ] })
1316
- }
1317
- ) });
1318
- });
1319
- Checkbox.displayName = Root$1.displayName;
1320
- var checkbox_default = Checkbox;
1321
- var Group2 = React4__default.forwardRef(({ className, disabled, ...props }, ref) => {
1322
- return /* @__PURE__ */ jsx(
1323
- RadioGroupPrimitive.Root,
1324
- {
1325
- className: cn("grid gap-1", className),
1326
- disabled,
1327
- ...props,
1328
- ref
1329
- }
1330
- );
1331
- });
1332
- Group2.displayName = RadioGroupPrimitive.Root.displayName;
1333
- var Item5 = React4__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1334
- RadioGroupPrimitive.Item,
1335
- {
1336
- ref,
1337
- className: cn(
1338
- "group aspect-square size-[20px] rounded-full border-2 border-neutral-400 bg-white hover:border-green-600 hover:bg-green-100 focus:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-100 [&:not(:disabled)]:data-[state=checked]:border-green-600",
1339
- className
1340
- ),
1341
- ...props,
1342
- children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "text-primary flex items-center justify-center group-disabled:text-neutral-300", children: /* @__PURE__ */ jsx(Circle$1, { className: "fill-primary size-[12px] group-disabled:fill-neutral-300" }) })
1343
- }
1344
- ));
1345
- Item5.displayName = RadioGroupPrimitive.Item.displayName;
1346
- var Radio = {
1347
- Group: Group2,
1348
- Item: Item5
1349
- };
1350
- var radio_default = Radio;
1351
- var searchVariants = ce({
1352
- base: "flex items-center justify-center rounded-full",
1353
- variants: {
1354
- size: {
1355
- small: {
1356
- trigger: "my-0.5",
1357
- dropdown: "mt-0.5"
1358
- },
1359
- medium: {
1360
- trigger: "my-1",
1361
- dropdown: "mt-1"
1362
- }
1363
- },
1364
- disabled: {
1365
- true: {
1366
- container: "cursor-not-allowed border-neutral-200",
1367
- input: "bg-white text-neutral-300",
1368
- trigger: "cursor-not-allowed text-neutral-300 [&_path]:fill-neutral-300"
1369
- },
1370
- false: {
1371
- container: "focus-within:border-indigo-600 hover:border-indigo-600"
1372
- }
1373
- }
1374
- },
1375
- slots: {
1376
- input: "data-[scope=false]hover:bg-indigo-100 pointer-events-auto border-0 bg-white pr-5",
1377
- trigger: "br-neutral-100 border-r-1 flex w-fit items-center gap-0.5 border border-y-0 border-l-0 border-neutral-100 bg-white pl-2 pr-1 text-indigo-600 focus-visible:outline-none [&_svg]:fill-indigo-600",
1378
- dropdown: "",
1379
- container: "rounded-m flex border border-neutral-200 "
1380
- },
1381
- defaultVariants: {
1382
- size: "medium"
1383
- }
1384
- });
1385
- var Search = React4.forwardRef(
1386
- ({ className, disabled, invalid, size, value, onChange, scope, ...props }, ref) => {
1387
- const slotsInput = inputVariants();
1388
- const slotsSearch = searchVariants();
1389
- return /* @__PURE__ */ jsxs("div", { className: slotsSearch.container({ disabled }), children: [
1390
- scope && /* @__PURE__ */ jsx(ScopeSelect, { disabled, scope, size }),
1391
- /* @__PURE__ */ jsxs("div", { className: "peer relative", children: [
1392
- /* @__PURE__ */ jsx(
1393
- "input",
1394
- {
1395
- value,
1396
- onChange,
1397
- disabled,
1398
- "data-scoped": !!scope,
1399
- className: cn(
1400
- slotsInput.input({ disabled, invalid, size }),
1401
- slotsSearch.input(),
1402
- className
1403
- ),
1404
- ref,
1405
- ...props
1406
- }
1407
- ),
1408
- /* @__PURE__ */ jsx(
1409
- "div",
1410
- {
1411
- "data-hasValue": !!value,
1412
- className: `data-[hasValue=true]:cursor-pointer ${slotsInput.suffixIcon({ size, disabled })}`,
1413
- children: value ? /* @__PURE__ */ jsx(
1414
- IconOutlineClose,
1415
- {
1416
- onClick: () => onChange && onChange({
1417
- target: { value: "" }
1418
- })
1419
- }
1420
- ) : /* @__PURE__ */ jsx(IconOutlineSearch, {})
1421
- }
1422
- )
1423
- ] })
1424
- ] });
1425
- }
1426
- );
1427
- var ScopeSelect = ({
1428
- scope: { selected, options, onChange },
1429
- disabled,
1430
- size
1431
- }) => {
1432
- const selectedOption = options.find(({ value }) => value === selected);
1433
- const slotsSearch = searchVariants();
1434
- return /* @__PURE__ */ jsxs(Root, { children: [
1435
- /* @__PURE__ */ jsxs(
1436
- Trigger,
1437
- {
1438
- className: slotsSearch.trigger({ size, disabled }),
1439
- disabled,
1440
- children: [
1441
- /* @__PURE__ */ jsx(text_default, { size: "small", weight: "medium", children: selectedOption == null ? void 0 : selectedOption.text }),
1442
- /* @__PURE__ */ jsx(IconOutlineChevronDown, { className: "-mr-0.5 size-3" })
1443
- ]
1444
- }
1445
- ),
1446
- /* @__PURE__ */ jsx(
1447
- DropdownContent,
1448
- {
1449
- selected,
1450
- options,
1451
- onChange,
1452
- className: slotsSearch.dropdown({ size })
1453
- }
1454
- )
1455
- ] });
1456
- };
1457
- Search.displayName = "Search";
1458
- var search_default = Search;
1459
-
1460
- export { avatar_default as Avatar, badge_default as Badge, button_default as Button, card_default as Card, checkbox_default as Checkbox, chips_default as Chips, collapsible_default as Collapsible, form_item_default as FormItem, indicator_default as Indicator, input_default as Input, input_description_default as InputDescription, label_default as Label, progress_default as Progress, progress_bar_default as ProgressBar, radio_default as Radio, scope_default as Scope, search_default as Search, sheets_default as Sheet, status_default as Status, text_default as Text, textarea_default as Textarea, toggle_default as Toggle };
23
+ export { Ie as Avatar, De as Badge, Be as Button, Fe as Card, pr as Checkbox, Uo as Chips, Ro as Collapsible, rr as FormItem, Eo as Indicator, to as Input, wt as InputDescription, yt as Label, Wo as Progress, K as ProgressBar, mr as Radio, qe as Scope, yr as Search, no as Sheet, Bo as Status, x as Text, oo as Textarea, co as Toggle };