@radui/ui 0.3.0 → 0.5.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 (106) hide show
  1. package/README.md +31 -0
  2. package/dist/components/Accordion.js +1 -1
  3. package/dist/components/AlertDialog.d.ts +5 -3
  4. package/dist/components/AlertDialog.js +1 -1
  5. package/dist/components/AspectRatio.js +1 -1
  6. package/dist/components/Avatar.js +1 -1
  7. package/dist/components/AvatarGroup.js +1 -1
  8. package/dist/components/{AvatarPrimitiveFallback-KiY3slgV.js → AvatarPrimitiveFallback-BOYawMc9.js} +1 -1
  9. package/dist/components/Badge.js +1 -1
  10. package/dist/components/BlockQuote.js +1 -1
  11. package/dist/components/Button.js +1 -1
  12. package/dist/components/Callout.js +1 -1
  13. package/dist/components/Card.js +1 -1
  14. package/dist/components/Checkbox.js +1 -1
  15. package/dist/components/CheckboxCards.js +1 -1
  16. package/dist/components/CheckboxGroup.js +1 -1
  17. package/dist/components/{CheckboxGroupPrimitive-DgfnzMT9.js → CheckboxGroupPrimitive-Cd8ra39e.js} +1 -1
  18. package/dist/components/Code.js +1 -1
  19. package/dist/components/Collapsible.js +1 -1
  20. package/dist/components/Combobox.d.ts +3 -1
  21. package/dist/components/Combobox.js +1 -1
  22. package/dist/components/ComboboxPrimitive-BhHSrtiY.js +1 -0
  23. package/dist/components/Command.d.ts +112 -0
  24. package/dist/components/Command.js +1 -0
  25. package/dist/components/ContextMenu.d.ts +16 -0
  26. package/dist/components/ContextMenu.js +1 -1
  27. package/dist/components/DataList.d.ts +7 -2
  28. package/dist/components/DataList.js +1 -1
  29. package/dist/components/Dialog.d.ts +5 -3
  30. package/dist/components/Dialog.js +1 -1
  31. package/dist/components/Disclosure.js +1 -1
  32. package/dist/components/Drawer.d.ts +153 -0
  33. package/dist/components/Drawer.js +1 -0
  34. package/dist/components/DropdownMenu.d.ts +4 -0
  35. package/dist/components/DropdownMenu.js +1 -1
  36. package/dist/components/Em.js +1 -1
  37. package/dist/components/Heading.js +1 -1
  38. package/dist/components/HoverCard.d.ts +10 -2
  39. package/dist/components/HoverCard.js +1 -1
  40. package/dist/components/Kbd.js +1 -1
  41. package/dist/components/Link.js +1 -1
  42. package/dist/components/MenuPrimitive-wJbEC-gM.js +1 -0
  43. package/dist/components/Menubar.d.ts +4 -0
  44. package/dist/components/Menubar.js +1 -1
  45. package/dist/components/Minimap.js +1 -1
  46. package/dist/components/NavigationMenu.js +1 -1
  47. package/dist/components/NumberField.d.ts +2 -0
  48. package/dist/components/NumberField.js +1 -1
  49. package/dist/components/Progress.js +1 -1
  50. package/dist/components/Quote.d.ts +2 -0
  51. package/dist/components/Quote.js +1 -1
  52. package/dist/components/Radio.js +1 -1
  53. package/dist/components/RadioCards.js +1 -1
  54. package/dist/components/RadioGroup.js +1 -1
  55. package/dist/components/{RadioGroupPrimitive-tlWBfWJ8.js → RadioGroupPrimitive-CcvI-_wm.js} +1 -1
  56. package/dist/components/ScrollArea.js +1 -1
  57. package/dist/components/Select.d.ts +3 -1
  58. package/dist/components/Select.js +1 -1
  59. package/dist/components/Separator.js +1 -1
  60. package/dist/components/Skeleton.js +1 -1
  61. package/dist/components/Slider.d.ts +4 -1
  62. package/dist/components/Slider.js +1 -1
  63. package/dist/components/Spinner.js +1 -1
  64. package/dist/components/Splitter.js +1 -1
  65. package/dist/components/Steps.js +1 -1
  66. package/dist/components/Strong.js +1 -1
  67. package/dist/components/Switch.js +1 -1
  68. package/dist/components/TabNav.js +1 -1
  69. package/dist/components/Table.js +1 -1
  70. package/dist/components/Tabs.js +1 -1
  71. package/dist/components/Text.js +1 -1
  72. package/dist/components/TextArea.js +1 -1
  73. package/dist/components/TextField.d.ts +41 -0
  74. package/dist/components/TextField.js +1 -0
  75. package/dist/components/Theme.d.ts +2 -0
  76. package/dist/components/Theme.js +1 -1
  77. package/dist/components/Toggle.js +1 -1
  78. package/dist/components/ToggleGroup.js +1 -1
  79. package/dist/components/Toolbar.js +1 -1
  80. package/dist/components/Tooltip.d.ts +3 -0
  81. package/dist/components/Tooltip.js +1 -1
  82. package/dist/components/Tree.js +1 -1
  83. package/dist/components/VisuallyHidden.js +1 -1
  84. package/dist/components/floating-ui.react-Byzse64h.js +5 -0
  85. package/dist/components/index-BbEsAodL.js +1 -0
  86. package/dist/components/{index-TYaYKM2M.js → index-DOVR6Rd5.js} +1 -1
  87. package/dist/components/{index-BZVbVgqN.js → index-DU_6Msfu.js} +1 -1
  88. package/dist/components/index-Db-tduwt.js +1 -0
  89. package/dist/components/index-Ir5FYyWW.js +1 -0
  90. package/dist/components/index-eAZUMNef.js +1 -0
  91. package/dist/components/{index-BOy86lYu.js → index-gM8bbyw1.js} +1 -1
  92. package/dist/components/index-m6qHOeQ9.js +1 -0
  93. package/dist/components/mergeProps-B9ocQsG4.js +1 -0
  94. package/dist/components/useComponentClass-QwNivz0h.js +1 -0
  95. package/dist/themes/tailwind-presets/default.js +1 -1
  96. package/package.json +160 -13
  97. package/dist/components/ComboboxPrimitive-Ddp_PqU6.js +0 -1
  98. package/dist/components/MenuPrimitive-BnQil448.js +0 -1
  99. package/dist/components/floating-ui.react-DMgxgTKq.js +0 -5
  100. package/dist/components/index-3dZuI04X.js +0 -1
  101. package/dist/components/index-6If6D2Zi.js +0 -1
  102. package/dist/components/index-98jQ1vTr.js +0 -1
  103. package/dist/components/index-B77TeBat.js +0 -1
  104. package/dist/components/index-DTYJVF-V.js +0 -1
  105. package/dist/components/index-W6-aam_B.js +0 -1
  106. package/dist/themes/default.css +0 -1
package/README.md CHANGED
@@ -65,6 +65,37 @@ npm install @radui/ui
65
65
 
66
66
  Rad UI works with modern React setups and is friendly to tokens, CSS variables, and custom theming strategies.
67
67
 
68
+ ## Local development
69
+
70
+ The repository has two primary workflows:
71
+
72
+ - Component library: use `npm` from the repository root
73
+ - Documentation site: use `pnpm` inside `docs/`
74
+
75
+ Install root dependencies and run Storybook:
76
+
77
+ ```bash
78
+ npm install
79
+ npm run sb
80
+ ```
81
+
82
+ Run the docs app locally:
83
+
84
+ ```bash
85
+ cd docs
86
+ pnpm install
87
+ pnpm dev
88
+ ```
89
+
90
+ To test local library changes inside the docs app, build and link the package from the repo root, then link it into `docs`:
91
+
92
+ ```bash
93
+ npm run build:rollup
94
+ npm link
95
+ cd docs
96
+ pnpm link @radui/ui
97
+ ```
98
+
68
99
  ## Philosophy
69
100
 
70
101
  Rad UI is opinionated where bugs live and flexible where taste lives.
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import i,{createContext as a,useRef as t,useId as n,useContext as o,useCallback as r,isValidElement as s,cloneElement as l}from"react";import{c as d}from"./clsx-BaVHROc5.js";import{c}from"./index-6If6D2Zi.js";import{u as m}from"./index-wRElCyvx.js";import{R as u}from"./index-TYaYKM2M.js";import{P as h,m as p,c as f}from"./index-98jQ1vTr.js";import{C as g}from"./index-DTYJVF-V.js";import{m as C}from"./mergeRefs-B8eZ_q-T.js";import{B as b}from"./index-BOy86lYu.js";const v=a({rootClass:"",activeItems:[],setActiveItems:()=>{},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1,collapsible:!1,disabled:!1,orientation:"vertical"}),I="Accordion",N=i.forwardRef((({children:i,orientation:a="vertical",disableTabIndexing:n=!1,asChild:o,transitionDuration:r=0,transitionTimingFunction:s="linear",customRootClass:l,disabled:p=!1,loop:f=!0,openMultiple:g=!1,type:C,collapsible:b=!1,value:N,defaultValue:R=[],onValueChange:x,dir:j,...T},y)=>{const A=t(null),M=c(l,I),$="multiple"===C||"single"!==C&&g,w=!!$||b,D=void 0!==N?$?N:N.length>0?[N[0]]:[]:void 0,F=$?R:R.length>0?[R[0]]:[],[V,P]=m(D,F,x),H="rtl"===j?"rtl":"ltr";return e(v.Provider,{value:{rootClass:M,activeItems:V,setActiveItems:P,accordionRef:A,transitionDuration:r,transitionTimingFunction:s,openMultiple:$,collapsible:w,disabled:p,orientation:a},children:e(u.Root,{orientation:a,loop:f,disableTabIndexing:n,dir:H,children:e(u.Group,{children:e(h.div,{className:d(`${M}-root`),dir:j,"data-orientation":a,ref:e=>{const i=e;A.current=i,"function"==typeof y?y(i):y&&(y.current=i)},asChild:o,...T,children:i})})})})}));N.displayName=I;const R=a({itemValue:"",disabled:!1,headerId:""}),x=i.forwardRef((({children:a,value:t,className:s="",disabled:l=!1,asChild:c=!1,...m},u)=>{const p=i.useRef(null),f=n(),b=t??f,I=n(),{rootClass:N,activeItems:x,setActiveItems:j,transitionDuration:T,transitionTimingFunction:y,openMultiple:A,collapsible:M,disabled:$,orientation:w}=o(v),D=l||$,F=x.includes(b),V=r((e=>{D||j(A?i=>e?i.includes(b)?i:[...i,b]:i.filter((e=>e!==b)):e?[b]:e=>!M&&e.includes(b)&&1===e.length?e:[])}),[D,A,b,j,M]);return e(R.Provider,{value:{itemValue:b,disabled:D,headerId:I},children:e(g.Root,{open:F,onOpenChange:V,disabled:D,transitionDuration:T,transitionTimingFunction:y,asChild:!0,children:e(h.div,{ref:C(p,u),className:d(`${N}-item`,s),"data-state":F?"open":"closed","data-disabled":D?"":void 0,"data-orientation":w,asChild:c,...m,children:a})})})}));x.displayName="AccordionItem";const j=i.forwardRef((({children:i,className:a="",asChild:t=!1,...n},r)=>{const{rootClass:c,orientation:m}=o(v),u=d(`${c}-header`,a);if(t&&s(i)){const e=i,a=p({className:u,"data-orientation":m},e.props);return l(e,{...a,ref:f(r,e.ref)})}return e("h3",{ref:r,className:u,"data-orientation":m,...n,children:i})}));j.displayName="AccordionHeader";const T=i.forwardRef((({children:i,className:a="",asChild:t=!1,id:n,...r},s)=>{const{rootClass:l,activeItems:c,orientation:m}=o(v),{itemValue:h,disabled:p,headerId:f}=o(R);return e(u.Item,{domId:n??f,children:e(g.Trigger,{disabled:p,asChild:!0,children:e(b,{className:d(`${l}-trigger`,a),ref:s,"aria-disabled":p,"aria-expanded":c.includes(h),"data-orientation":m,asChild:t,...r,children:i})})})}));T.displayName="AccordionTrigger";const y=i.forwardRef((({children:i,index:a,className:t="",forceMount:n,asChild:r=!1,...s},l)=>{const{rootClass:c,orientation:m}=o(v),{headerId:u}=o(R);return e(g.Content,{ref:l,asChild:r,forceMount:n,className:d(`${c}-content`,t),role:"region","aria-labelledby":u,"data-orientation":m,...s,children:r?i:e("div",{className:`${c}-content-inner`,children:i})})}));y.displayName="AccordionContent";const A=Object.assign(N,{Root:N,Item:x,Header:j,Trigger:T,Content:y});export{A as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import i,{createContext as t,useRef as a,useId as o,useContext as n,useCallback as r,isValidElement as s,cloneElement as l}from"react";import{c as d}from"./clsx-BaVHROc5.js";import{u as c}from"./useComponentClass-QwNivz0h.js";import{u as m}from"./index-wRElCyvx.js";import{R as u}from"./index-DOVR6Rd5.js";import{P as p}from"./index-m6qHOeQ9.js";import{C as h}from"./index-Ir5FYyWW.js";import{m as f}from"./mergeRefs-B8eZ_q-T.js";import{m as C,c as g}from"./mergeProps-B9ocQsG4.js";import{B as b}from"./index-gM8bbyw1.js";import"./ThemeContext-Sm-iNANd.js";const v=t({rootClass:"",activeItems:[],setActiveItems:()=>{},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1,collapsible:!1,disabled:!1,orientation:"vertical"}),I="Accordion",N=i.forwardRef((({children:i,className:t="",orientation:o="vertical",disableTabIndexing:n=!1,asChild:r,transitionDuration:s=0,transitionTimingFunction:l="linear",customRootClass:h,disabled:f=!1,loop:C=!0,openMultiple:g=!1,type:b,collapsible:N=!1,value:R,defaultValue:x=[],onValueChange:j,dir:T,...y},A)=>{const M=a(null),w=c(h,I),D=c(h,I,"root"),F="multiple"===b||"single"!==b&&g,V=!!F||N,$=void 0!==R?F?R:R.length>0?[R[0]]:[]:void 0,P=F?x:x.length>0?[x[0]]:[],[H,O]=m($,P,j),B="rtl"===T?"rtl":"ltr";return e(v.Provider,{value:{rootClass:w,activeItems:H,setActiveItems:O,accordionRef:M,transitionDuration:s,transitionTimingFunction:l,openMultiple:F,collapsible:V,disabled:f,orientation:o},children:e(u.Root,{orientation:o,loop:C,disableTabIndexing:n,dir:B,children:e(u.Group,{children:e(p.div,{className:d(D,t),dir:T,"data-orientation":o,ref:e=>{const i=e;M.current=i,"function"==typeof A?A(i):A&&(A.current=i)},asChild:r,...y,children:i})})})})}));N.displayName=I;const R=t({itemValue:"",disabled:!1,headerId:""}),x=i.forwardRef((({children:t,value:a,className:s="",disabled:l=!1,asChild:c=!1,...m},u)=>{const C=i.useRef(null),g=o(),b=a??g,I=o(),{rootClass:N,activeItems:x,setActiveItems:j,transitionDuration:T,transitionTimingFunction:y,openMultiple:A,collapsible:M,disabled:w,orientation:D}=n(v),F=l||w,V=x.includes(b),$=r((e=>{F||j(A?i=>e?i.includes(b)?i:[...i,b]:i.filter((e=>e!==b)):e?[b]:e=>!M&&e.includes(b)&&1===e.length?e:[])}),[F,A,b,j,M]);return e(R.Provider,{value:{itemValue:b,disabled:F,headerId:I},children:e(h.Root,{open:V,onOpenChange:$,disabled:F,transitionDuration:T,transitionTimingFunction:y,asChild:!0,children:e(p.div,{ref:f(C,u),className:d(N&&`${N}-item`,s),"data-state":V?"open":"closed","data-disabled":F?"":void 0,"data-orientation":D,asChild:c,...m,children:t})})})}));x.displayName="AccordionItem";const j=i.forwardRef((({children:i,className:t="",asChild:a=!1,...o},r)=>{const{rootClass:c,orientation:m}=n(v),u=d(c&&`${c}-header`,t);if(a&&s(i)){const e=i,t=C({className:u,"data-orientation":m},e.props);return l(e,{...t,ref:g(r,e.ref)})}return e("h3",{ref:r,className:u,"data-orientation":m,...o,children:i})}));j.displayName="AccordionHeader";const T=i.forwardRef((({children:i,className:t="",asChild:a=!1,id:o,...r},s)=>{const{rootClass:l,activeItems:c,orientation:m}=n(v),{itemValue:p,disabled:f,headerId:C}=n(R);return e(u.Item,{domId:o??C,children:e(h.Trigger,{disabled:f,asChild:!0,children:e(b,{className:d(l&&`${l}-trigger`,t),ref:s,"aria-disabled":f,"aria-expanded":c.includes(p),"data-orientation":m,asChild:a,...r,children:i})})})}));T.displayName="AccordionTrigger";const y=i.forwardRef((({children:i,index:t,className:a="",forceMount:o,asChild:r=!1,...s},l)=>{const{rootClass:c,orientation:m}=n(v),{headerId:u}=n(R);return e(h.Content,{ref:l,asChild:r,forceMount:o,className:d(c&&`${c}-content`,a),role:"region","aria-labelledby":u,"data-orientation":m,...s,children:r?i:e("div",{className:c?`${c}-content-inner`:void 0,children:i})})}));y.displayName="AccordionContent";const A=Object.assign(N,{Root:N,Item:x,Header:j,Trigger:T,Content:y});export{A as default};
@@ -2,6 +2,7 @@ import * as React$1 from 'react';
2
2
  import React__default from 'react';
3
3
  import DialogPrimitive from '~/core/primitives/Dialog';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import * as _floating_ui_react from '@floating-ui/react';
5
6
  import Primitive from '~/core/primitives/Primitive';
6
7
 
7
8
  type DialogPrimitiveActionProps = {
@@ -14,6 +15,7 @@ type DialogPrimitiveCancelProps = {
14
15
  children: React__default.ReactNode;
15
16
  asChild?: boolean;
16
17
  className?: string;
18
+ onClick?: React__default.MouseEventHandler<HTMLButtonElement>;
17
19
  };
18
20
 
19
21
  type DialogPrimitiveFooterProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Footer>;
@@ -27,6 +29,8 @@ type DialogPrimitiveRootProps$1 = {
27
29
  onOpenChange?: (open: boolean) => void;
28
30
  onClickOutside?: () => void;
29
31
  className?: string;
32
+ /** When true, outside pointer events and escape key will not close the dialog. */
33
+ disablePointerDismissal?: boolean;
30
34
  };
31
35
 
32
36
  type DialogPrimitiveRootProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
@@ -84,11 +88,9 @@ declare const AlertDialog: {
84
88
  className?: string;
85
89
  disabled?: boolean;
86
90
  } & React$1.RefAttributes<HTMLButtonElement>>;
87
- Overlay: React$1.ForwardRefExoticComponent<Omit<{
88
- className?: string;
91
+ Overlay: React$1.ForwardRefExoticComponent<Omit<Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & _floating_ui_react.FloatingOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
89
92
  asChild?: boolean;
90
93
  forceMount?: boolean;
91
- children?: React.ReactNode;
92
94
  } & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
93
95
  className?: string;
94
96
  asChild?: boolean;
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import{createContext as s,forwardRef as r,useState as t,useContext as a,useRef as o,useEffect as i}from"react";import{c as l}from"./index-6If6D2Zi.js";import{c as n}from"./clsx-BaVHROc5.js";import{u as c}from"./index-wRElCyvx.js";import{D as d}from"./index-B77TeBat.js";import{F as m}from"./index-W6-aam_B.js";import{P as p}from"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./ThemeContext-Sm-iNANd.js";import"./floating-ui.react-DMgxgTKq.js";import"react-dom";const h=s({rootClass:"",isOpen:!1,setIsOpen:()=>{},titleId:void 0,descriptionId:void 0,setTitleId:()=>{},setDescriptionId:()=>{}}),C="AlertDialog",u=r((({children:s,className:r="",customRootClass:a="",defaultOpen:o=!1,open:i,onOpenChange:m,...p},u)=>{const N=l(a,C),[f,g]=c(i,o,m),[D,I]=t(void 0),[y,A]=t(void 0),v={rootClass:N,isOpen:f,setIsOpen:g,titleId:D,descriptionId:y,setTitleId:I,setDescriptionId:A};return e(d.Root,{open:f,onOpenChange:g,className:n(N,r),...p,children:e(h.Provider,{value:v,children:e("div",{ref:u,className:n(N,r),children:s})})})}));u.displayName=C;const N=r((({children:s,className:r="",asChild:t=!1,forceMount:o=!1,...i},l)=>{const{rootClass:c,titleId:m,descriptionId:p}=a(h);return e(d.Content,{ref:l,className:n(`${c}-content`,r),asChild:t,forceMount:o,role:"alertdialog","aria-modal":!0,"aria-labelledby":m,"aria-describedby":p,...i,children:s})}));N.displayName="AlertDialogContent";const f=r((({children:s,asChild:r,className:t="",disabled:o=!1,...i},l)=>{const{rootClass:c,isOpen:m}=a(h),p=m?"open":"closed",C=o?"":void 0;return e(d.Trigger,{ref:l,className:n(`${c}-trigger`,t),asChild:r,disabled:o,"data-state":p,"data-disabled":C,...i,children:s})}));f.displayName="AlertDialogTrigger";const g=({children:s,...r})=>e(d.Portal,{...r,children:s});g.displayName="AlertDialogPortal";const D=r((({className:s="",asChild:r=!1,forceMount:t=!1,children:o,...i},l)=>{const{rootClass:c}=a(h);return e(d.Overlay,{ref:l,className:n(`${c}-overlay`,s),asChild:r,forceMount:t,...i,children:o})}));D.displayName="AlertDialogOverlay";const I=r((({children:s,asChild:r,className:t="",...o},i)=>{const{rootClass:l}=a(h);return e(d.Cancel,{ref:i,className:`${l}-cancel ${t}`,asChild:r,...o,children:s})}));I.displayName="AlertDialogCancel";const y=r((({children:s,asChild:r,className:t="",...o},i)=>{const{rootClass:l}=a(h);return e(d.Action,{ref:i,className:`${l}-action ${t}`,asChild:r,...o,children:s})}));y.displayName="AlertDialogAction";const A=r((({children:s,className:r="",...t},o)=>{const{rootClass:i}=a(h);return e(d.Footer,{ref:o,className:n(`${i}-footer`,r),...t,children:s})}));A.displayName="AlertDialogFooter";const v=r((({children:s,className:r="",asChild:t=!1,id:l,...n},c)=>{const{rootClass:d,setTitleId:C,titleId:u}=a(h),N=m.useId(),f=l??N,g=o(f),D=o(u);return i((()=>{D.current=u}),[u]),i((()=>(g.current=f,f&&C(f),()=>{D.current===g.current&&C(void 0)})),[f,C]),e(p.h2,{ref:c,id:f,className:`${d}-title ${r}`,asChild:t,...n,children:s})}));v.displayName="AlertDialogTitle";const $=r((({children:s,className:r="",asChild:t=!1,id:l,...n},c)=>{const{rootClass:d,setDescriptionId:C,descriptionId:u}=a(h),N=m.useId(),f=l??N,g=o(f),D=o(u);return i((()=>{D.current=u}),[u]),i((()=>(g.current=f,f&&C(f),()=>{D.current===g.current&&C(void 0)})),[f,C]),e(p.p,{ref:c,id:f,className:`${d}-description ${r}`,asChild:t,...n,children:s})}));$.displayName="AlertDialogDescription";const O=()=>(console.warn("Direct usage of AlertDialog is not supported. Please use AlertDialog.Root, AlertDialog.Content, etc. instead."),null);O.Root=u,O.Trigger=f,O.Overlay=D,O.Portal=g,O.Content=N,O.Title=v,O.Description=$,O.Footer=A,O.Cancel=I,O.Action=y;export{O as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{createContext as s,forwardRef as r,useState as t,useContext as o,useRef as a,useEffect as i}from"react";import{u as l}from"./useComponentClass-QwNivz0h.js";import{c as n}from"./clsx-BaVHROc5.js";import{u as c}from"./index-wRElCyvx.js";import{D as d}from"./index-BbEsAodL.js";import{F as m}from"./index-Db-tduwt.js";import{P as p}from"./index-m6qHOeQ9.js";import"./ThemeContext-Sm-iNANd.js";import"./index-gM8bbyw1.js";import"./floating-ui.react-Byzse64h.js";import"react-dom";import"./mergeProps-B9ocQsG4.js";const h=s({rootClass:"",isOpen:!1,setIsOpen:()=>{},titleId:void 0,descriptionId:void 0,setTitleId:()=>{},setDescriptionId:()=>{}}),C="AlertDialog",u=r((({children:s,className:r="",customRootClass:o="",defaultOpen:a=!1,open:i,onOpenChange:m,...p},u)=>{const N=l(o,C),[g,f]=c(i,a,m),[D,I]=t(void 0),[y,A]=t(void 0),v={rootClass:N,isOpen:g,setIsOpen:f,titleId:D,descriptionId:y,setTitleId:I,setDescriptionId:A};return e(d.Root,{open:g,onOpenChange:f,className:n(N,r),...p,children:e(h.Provider,{value:v,children:e("div",{ref:u,className:n(N,r),children:s})})})}));u.displayName=C;const N=r((({children:s,className:r="",asChild:t=!1,forceMount:a=!1,...i},l)=>{const{rootClass:c,titleId:m,descriptionId:p}=o(h);return e(d.Content,{ref:l,className:n(c&&`${c}-content`,r),asChild:t,forceMount:a,role:"alertdialog","aria-modal":!0,"aria-labelledby":m,"aria-describedby":p,...i,children:s})}));N.displayName="AlertDialogContent";const g=r((({children:s,asChild:r,className:t="",disabled:a=!1,...i},l)=>{const{rootClass:c,isOpen:m}=o(h),p=m?"open":"closed",C=a?"":void 0;return e(d.Trigger,{ref:l,className:n(c&&`${c}-trigger`,t),asChild:r,disabled:a,"data-state":p,"data-disabled":C,...i,children:s})}));g.displayName="AlertDialogTrigger";const f=({children:s,...r})=>e(d.Portal,{...r,children:s});f.displayName="AlertDialogPortal";const D=r((({className:s="",asChild:r=!1,forceMount:t=!1,children:a,...i},l)=>{const{rootClass:c}=o(h);return e(d.Overlay,{ref:l,className:n(c&&`${c}-overlay`,s),asChild:r,forceMount:t,...i,children:a})}));D.displayName="AlertDialogOverlay";const I=r((({children:s,asChild:r,className:t="",...a},i)=>{const{rootClass:l}=o(h);return e(d.Cancel,{ref:i,className:n(l&&`${l}-cancel`,t),asChild:r,...a,children:s})}));I.displayName="AlertDialogCancel";const y=r((({children:s,asChild:r,className:t="",...a},i)=>{const{rootClass:l}=o(h);return e(d.Action,{ref:i,className:n(l&&`${l}-action`,t),asChild:r,...a,children:s})}));y.displayName="AlertDialogAction";const A=r((({children:s,className:r="",...t},a)=>{const{rootClass:i}=o(h);return e(d.Footer,{ref:a,className:n(i&&`${i}-footer`,r),...t,children:s})}));A.displayName="AlertDialogFooter";const v=r((({children:s,className:r="",asChild:t=!1,id:l,...c},d)=>{const{rootClass:C,setTitleId:u,titleId:N}=o(h),g=m.useId(),f=l??g,D=a(f),I=a(N);return i((()=>{I.current=N}),[N]),i((()=>(D.current=f,f&&u(f),()=>{I.current===D.current&&u(void 0)})),[f,u]),e(p.h2,{ref:d,id:f,className:n(C&&`${C}-title`,r),asChild:t,...c,children:s})}));v.displayName="AlertDialogTitle";const j=r((({children:s,className:r="",asChild:t=!1,id:l,...c},d)=>{const{rootClass:C,setDescriptionId:u,descriptionId:N}=o(h),g=m.useId(),f=l??g,D=a(f),I=a(N);return i((()=>{I.current=N}),[N]),i((()=>(D.current=f,f&&u(f),()=>{I.current===D.current&&u(void 0)})),[f,u]),e(p.p,{ref:d,id:f,className:n(C&&`${C}-description`,r),asChild:t,...c,children:s})}));j.displayName="AlertDialogDescription";const O=()=>(console.warn("Direct usage of AlertDialog is not supported. Please use AlertDialog.Root, AlertDialog.Content, etc. instead."),null);O.Root=u,O.Trigger=g,O.Overlay=D,O.Portal=f,O.Content=N,O.Title=v,O.Description=j,O.Footer=A,O.Cancel=I,O.Action=y;export{O as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as r}from"react/jsx-runtime";import s from"react";import{c as t}from"./index-6If6D2Zi.js";import{c as a}from"./clsx-BaVHROc5.js";const e="AspectRatio",o=s.forwardRef((({children:s,customRootClass:o,className:m,ratio:c="1",...i},d)=>{isNaN(Number(c))&&!c.match(/^(\d+)\/(\d+)$/)&&(c="1"),Number(c)<=0&&(c="1");const l=t(o,e);return r("div",{ref:d,style:{aspectRatio:c},className:a(l,m),...i,children:s})}));o.displayName=e;export{o as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import t from"react";import{u as e}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import"./ThemeContext-Sm-iNANd.js";const a="AspectRatio",o=t.forwardRef((({children:t,customRootClass:o,className:m,ratio:c="1",...i},l)=>{isNaN(Number(c))&&!c.match(/^(\d+)\/(\d+)$/)&&(c="1"),Number(c)<=0&&(c="1");const p=e(o,a);return s("div",{ref:l,style:{aspectRatio:c},className:r(p,m),...i,children:t})}));o.displayName=a;export{o as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as e}from"react";import{A as o,a as t,b as l}from"./AvatarPrimitiveFallback-KiY3slgV.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-6If6D2Zi.js";import{c as m,a as n,b as d}from"./index-3dZuI04X.js";import"./index-98jQ1vTr.js";const f=s({size:"",variant:"",color:"",rootClass:""}),v="Avatar",p=r.forwardRef((({children:r,customRootClass:s="",className:e="",size:t="",variant:l="",color:p="",...u},A)=>{const N=i(s,v),b=m("avatar",{variant:l,size:t}),j=d(p),x=n(b,j);return a(f.Provider,{value:{size:t,variant:l,color:p,rootClass:N},children:a(o,{ref:A,className:c(N,e),...x,...u,children:r})})}));p.displayName=v;const u=r.forwardRef((({src:r="",alt:s="",...o},l)=>{const{rootClass:i}=e(f);return a(t,{ref:l,className:c(`${i}-image`),src:r,alt:s,...o})}));u.displayName="AvatarImage";const A=r.forwardRef((({children:r,className:s="",...o},t)=>{const{rootClass:i}=e(f);return a(l,{ref:t,className:c(`${i}-fallback`,s),...o,children:r})}));A.displayName="AvatarFallback";const N=()=>(console.warn("Direct usage of Avatar is not supported. Please use Avatar.Root, Avatar.Image, Avatar.Fallback instead."),null);N.displayName="Avatar",N.Root=p,N.Image=u,N.Fallback=A;export{N as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as e}from"react";import{A as o,a as t,b as l}from"./AvatarPrimitiveFallback-BOYawMc9.js";import{c as i}from"./clsx-BaVHROc5.js";import{u as c}from"./useComponentClass-QwNivz0h.js";import{c as m,a as n,b as d}from"./index-eAZUMNef.js";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";import"./ThemeContext-Sm-iNANd.js";const f=s({size:"",variant:"",color:"",rootClass:""}),p="Avatar",v=r.forwardRef((({children:r,customRootClass:s="",className:e="",size:t="",variant:l="",color:v="",...u},A)=>{const N=c(s,p),j=m("avatar",{variant:l,size:t}),C=d(v),b=n(j,C);return a(f.Provider,{value:{size:t,variant:l,color:v,rootClass:N},children:a(o,{ref:A,className:i(N,e),...b,...u,children:r})})}));v.displayName=p;const u=r.forwardRef((({src:r="",alt:s="",className:o,...l},c)=>{const{rootClass:m}=e(f),n=i(m&&`${m}-image`,o)||void 0;return a(t,{ref:c,className:n,src:r,alt:s,...l})}));u.displayName="AvatarImage";const A=r.forwardRef((({children:r,className:s="",...o},t)=>{const{rootClass:c}=e(f);return a(l,{ref:t,className:i(c&&`${c}-fallback`,s),...o,children:r})}));A.displayName="AvatarFallback";const N=()=>(console.warn("Direct usage of Avatar is not supported. Please use Avatar.Root, Avatar.Image, Avatar.Fallback instead."),null);N.displayName="Avatar",N.Root=v,N.Image=u,N.Fallback=A;export{N as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as t}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as e}from"./index-6If6D2Zi.js";import{c as l,a as i,b as c}from"./index-3dZuI04X.js";import{A as n,a as m,b as d}from"./AvatarPrimitiveFallback-KiY3slgV.js";import"./index-98jQ1vTr.js";const p=s({rootClass:"",size:"",variant:""}),v="AvatarGroup",f=r.forwardRef((({customRootClass:r="",size:s="",variant:t="",children:c,className:n="",...m},d)=>{const f=e(r,v),u=l("avatar",{variant:t,size:s}),A=i(u);return a(p.Provider,{value:{size:s,variant:t,rootClass:f},children:a("div",{ref:d,className:o(f,n),...A,...m,children:c})})}));f.displayName=v;const u=r.forwardRef((({color:r="",children:s,className:e,...l},m)=>{const{rootClass:d}=t(p),v=c(r),f=i(v);return a(n,{ref:m,className:o(`${d}-item`,e),...f,...l,children:s})}));u.displayName="AvatarGroupItem";const A=r.forwardRef((({src:r,alt:s,...t},o)=>a(m,{ref:o,src:r,alt:s,...t})));A.displayName="AvatarGroupAvatar";const N=r.forwardRef((({children:r,className:s,...e},l)=>{const{rootClass:i}=t(p);return a(d,{ref:l,className:o(`${i}-fallback`,s),...e,children:r})}));N.displayName="AvatarGroupFallback";const G=()=>(console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null);G.Root=f,G.Item=u,G.Avatar=A,G.Fallback=N;export{G as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as t}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{u as e}from"./useComponentClass-QwNivz0h.js";import{c as l,a as i,b as c}from"./index-eAZUMNef.js";import{A as m,a as n,b as p}from"./AvatarPrimitiveFallback-BOYawMc9.js";import"./ThemeContext-Sm-iNANd.js";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";const d=s({rootClass:"",size:"",variant:""}),f="AvatarGroup",u=r.forwardRef((({customRootClass:r="",size:s="",variant:t="",children:c,className:m="",...n},p)=>{const u=e(r,f),v=l("avatar",{variant:t,size:s}),A=i(v);return a(d.Provider,{value:{size:s,variant:t,rootClass:u},children:a("div",{ref:p,className:o(u,m),...A,...n,children:c})})}));u.displayName=f;const v=r.forwardRef((({color:r="",children:s,className:e,...l},n)=>{const{rootClass:p}=t(d),f=c(r),u=i(f);return a(m,{ref:n,className:o(p&&`${p}-item`,e),...u,...l,children:s})}));v.displayName="AvatarGroupItem";const A=r.forwardRef((({src:r,alt:s,...t},o)=>a(n,{ref:o,src:r,alt:s,...t})));A.displayName="AvatarGroupAvatar";const N=r.forwardRef((({children:r,className:s,...e},l)=>{const{rootClass:i}=t(d);return a(p,{ref:l,className:o(i&&`${i}-fallback`,s),...e,children:r})}));N.displayName="AvatarGroupFallback";const G=()=>(console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null);G.Root=u,G.Item=v,G.Avatar=A,G.Fallback=N;export{G as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useState as i,useMemo as s,useContext as o,useEffect as n}from"react";import{P as t}from"./index-98jQ1vTr.js";const d=e({}),l=a.forwardRef((({children:e,asChild:o=!1,...n},l)=>{const[m,c]=i(!1),[h,p]=i(!1),f=s((()=>{if(!e)return!1;const r=e=>{if(a.isValidElement(e)){if("img"===e.type&&e.props?.src)return!0;if(e.props?.src)return!0;if(e.props?.children)return a.Children.toArray(e.props.children).some(r)}return!1};return a.Children.toArray(e).some(r)}),[e]),u={isImageLoaded:m,hasError:h,setHasError:p,handleLoadImage:()=>{c(!0),p(!1)},handleErrorImage:()=>{c(!1),p(!0)}};return r(d.Provider,{value:u,children:r(t.span,{ref:l,asChild:o,"data-rad-ui-has-image":f?"":void 0,...n,children:e})})}));l.displayName="AvatarPrimitiveRoot";const m=a.forwardRef((({src:a="",alt:e="",...i},s)=>{const{handleErrorImage:l,handleLoadImage:m,hasError:c}=o(d);return c?null:(n((()=>{a||l()}),[a,l,c]),r(t.img,{ref:s,src:a,alt:e,onError:l,onLoad:m,...i}))}));m.displayName="AvatarPrimitiveImage";const c=a.forwardRef((({children:a,asChild:e=!1,className:i="",...s},n)=>{const{isImageLoaded:l}=o(d);return l?null:r(t.span,{ref:n,asChild:e,className:i,...s,children:a})}));c.displayName="AvatarPrimitiveFallback";export{l as A,m as a,c as b};
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useState as i,useMemo as s,useContext as o,useEffect as n}from"react";import{P as t}from"./index-m6qHOeQ9.js";const d=e({}),l=a.forwardRef((({children:e,asChild:o=!1,...n},l)=>{const[m,c]=i(!1),[h,p]=i(!1),f=s((()=>{if(!e)return!1;const r=e=>{if(a.isValidElement(e)){if("img"===e.type&&e.props?.src)return!0;if(e.props?.src)return!0;if(e.props?.children)return a.Children.toArray(e.props.children).some(r)}return!1};return a.Children.toArray(e).some(r)}),[e]),u={isImageLoaded:m,hasError:h,setHasError:p,handleLoadImage:()=>{c(!0),p(!1)},handleErrorImage:()=>{c(!1),p(!0)}};return r(d.Provider,{value:u,children:r(t.span,{ref:l,asChild:o,"data-rad-ui-has-image":f?"":void 0,...n,children:e})})}));l.displayName="AvatarPrimitiveRoot";const m=a.forwardRef((({src:a="",alt:e="",...i},s)=>{const{handleErrorImage:l,handleLoadImage:m,hasError:c}=o(d);return c?null:(n((()=>{a||l()}),[a,l,c]),r(t.img,{ref:s,src:a,alt:e,onError:l,onLoad:m,...i}))}));m.displayName="AvatarPrimitiveImage";const c=a.forwardRef((({children:a,asChild:e=!1,className:i="",...s},n)=>{const{isImageLoaded:l}=o(d);return l?null:r(t.span,{ref:n,asChild:e,className:i,...s,children:a})}));c.displayName="AvatarPrimitiveFallback";export{l as A,m as a,c as b};
@@ -1 +1 @@
1
- 'use client';import{jsx as a}from"react/jsx-runtime";import r from"react";import{c as s}from"./index-6If6D2Zi.js";import{c as e}from"./clsx-BaVHROc5.js";import{c as o,a as i,b as m}from"./index-3dZuI04X.js";const t="Badge",c=r.forwardRef((({children:r,customRootClass:c="",className:d="",color:l="",variant:n="solid",size:f="medium",...p},u)=>{const x=s(c,t),j=o("badge",{variant:n,size:f}),v=m(l),N=i(j,v);return a("div",{ref:u,className:e(x,d),...N,...p,children:r})}));c.displayName=t;export{c as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import a from"react";import{u as o}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import{c as e,a as t,b as m}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";const i="Badge",c=a.forwardRef((({children:a,customRootClass:c="",className:n="",color:d="",variant:l="solid",size:f="medium",...p},u)=>{const j=o(c,i,"root"),x=e("badge",{variant:l,size:f}),C=m(d),h=t(x,C);return s("div",{ref:u,className:r(j,n),...h,...p,children:a})}));c.displayName=i;export{c as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as o}from"react/jsx-runtime";import a from"react";import{c as r}from"./clsx-BaVHROc5.js";import{c as t}from"./index-6If6D2Zi.js";const e="BlockQuote",c=a.forwardRef((({children:a,customRootClass:c="",className:s="",color:i="",variant:l="",size:m="",...d},n)=>{const u=t(c,e),f={};return l&&(f["data-block-quote-variant"]=l),m&&(f["data-block-quote-size"]=m),i&&(f["data-rad-ui-accent-color"]=i),o("blockquote",{ref:n,className:r(u,s),...d,...f,children:a})}));c.displayName=e;export{c as default};
1
+ 'use client';import{jsx as o}from"react/jsx-runtime";import a from"react";import{c as t}from"./clsx-BaVHROc5.js";import{u as r}from"./useComponentClass-QwNivz0h.js";import"./ThemeContext-Sm-iNANd.js";const s="BlockQuote",e=a.forwardRef((({children:a,customRootClass:e="",className:m="",color:c="",variant:i="",size:l="",...n},d)=>{const f=r(e,s),p={};return i&&(p["data-variant"]=i),l&&(p["data-size"]=l),c&&(p["data-color"]=c),o("blockquote",{ref:d,className:t(f,m),...n,...p,children:a})}));e.displayName=s;export{e as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{c as a}from"./index-6If6D2Zi.js";import{c as s}from"./clsx-BaVHROc5.js";import{B as r}from"./index-BOy86lYu.js";import{c as e,a as i,b as n}from"./index-3dZuI04X.js";import"./index-98jQ1vTr.js";const m="Button",d=o((({children:o,type:d="button",customRootClass:c="",className:l="",variant:p="",size:f="",color:u="",disabled:x=!1,onClick:b,...j},v)=>{const y=a(c,m),C=e("button",{variant:p,size:f}),N=n(u),h=i(C,N);return t(r,{ref:v,type:d,disabled:x,"data-disabled":x?"":void 0,className:s(y,l),...h,onClick:t=>{if(x)return t.preventDefault(),void t.stopPropagation();b?.(t)},...j,children:o})}));d.displayName=m;export{d as default};
1
+ 'use client';import{jsx as o}from"react/jsx-runtime";import{forwardRef as t}from"react";import{u as s}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import{B as e}from"./index-gM8bbyw1.js";import{c as a,a as i,b as m}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";const n="Button",p=t((({children:t,type:p="button",customRootClass:d="",className:l="",variant:c="",size:f="",color:u="",disabled:j=!1,onClick:x,...b},C)=>{const v=s(d,n,"root"),h=a("button",{variant:c,size:f}),y=m(u),N=i(h,y);return o(e,{ref:C,type:p,disabled:j,"data-disabled":j?"":void 0,className:r(v,l),...N,onClick:o=>{if(j)return o.preventDefault(),void o.stopPropagation();x?.(o)},...b,children:t})}));p.displayName=n;export{p as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as s}from"react/jsx-runtime";import e,{createContext as o,useContext as t}from"react";import{c as a}from"./index-6If6D2Zi.js";import{c as r}from"./clsx-BaVHROc5.js";import{P as l}from"./index-98jQ1vTr.js";import{c,a as i,b as n}from"./index-3dZuI04X.js";const d=o({rootClass:""}),m="Callout",u=e.forwardRef((({children:e,asChild:o=!1,className:t="",color:u="",variant:f="",intent:p="",size:C="",customRootClass:h="",...x},N)=>{const v=a(h,m),R=c("callout",{variant:"destructive"===f?"":f,intent:p||("destructive"===f?"destructive":""),size:C}),j=n(u),w=i(R,j);return s(d.Provider,{value:{rootClass:v},children:s(l.div,{ref:N,asChild:o,className:r(v,t),...w,...x,children:e})})}));u.displayName=m;const f=e.forwardRef((({children:e,className:o="",...a},c)=>{const{rootClass:i}=t(d);return s(l.span,{ref:c,className:r(`${i}-icon`,o),...a,children:e})}));f.displayName="CalloutIcon";const p=e.forwardRef((({children:e,className:o="",...a},c)=>{const{rootClass:i}=t(d);return s(l.p,{ref:c,className:r(`${i}-text`,o),...a,children:e})}));p.displayName="CalloutText";const C=()=>(console.warn("Direct usage of Callout is not supported. Please use Callout.Root, Callout.Icon, etc. instead."),null);C.Root=u,C.Icon=f,C.Text=p;export{C as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import e,{createContext as o,useContext as t}from"react";import{u as a}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import{P as l}from"./index-m6qHOeQ9.js";import{c as n,a as c,b as i}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-B9ocQsG4.js";const m=o({rootClass:""}),d="Callout",u=e.forwardRef((({children:e,asChild:o=!1,className:t="",color:u="",variant:f="",intent:p="",size:C="",customRootClass:h="",...x},N)=>{const v=a(h,d),j=n("callout",{variant:"destructive"===f?"":f,intent:p||("destructive"===f?"destructive":""),size:C}),R=i(u),w=c(j,R);return s(m.Provider,{value:{rootClass:v},children:s(l.div,{ref:N,asChild:o,className:r(v,t),...w,...x,children:e})})}));u.displayName=d;const f=e.forwardRef((({children:e,className:o="",...a},n)=>{const{rootClass:c}=t(m);return s(l.span,{ref:n,className:r(c&&`${c}-icon`,o),...a,children:e})}));f.displayName="CalloutIcon";const p=e.forwardRef((({children:e,className:o="",...a},n)=>{const{rootClass:c}=t(m);return s(l.p,{ref:n,className:r(c&&`${c}-text`,o),...a,children:e})}));p.displayName="CalloutText";const C=()=>(console.warn("Direct usage of Callout is not supported. Please use Callout.Root, Callout.Icon, etc. instead."),null);C.Root=u,C.Icon=f,C.Text=p;export{C as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useMemo as s,useContext as o}from"react";import{c as t}from"./index-6If6D2Zi.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-3dZuI04X.js";const l=e({rootClass:"rad-ui-card"}),n="Card",d=a.forwardRef((({children:a,customRootClass:e,className:o="",variant:d="",size:m="",...f},N)=>{const C=t(e,n),h=i("card",{variant:d,size:m}),p=s((()=>({rootClass:C})),[C]);return r(l.Provider,{value:p,children:r("div",{ref:N,className:c(C,o),...h,...f,children:a})})}));d.displayName=n;const m=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("div",{ref:t,className:c(`${i}-action`,e),...s,children:a})}));m.displayName="CardAction";const f=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("div",{ref:t,className:c(`${i}-content`,e),...s,children:a})}));f.displayName="CardContent";const N=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("p",{ref:t,className:c(`${i}-description`,e),...s,children:a})}));N.displayName="CardDescription";const C=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("div",{ref:t,className:c(`${i}-footer`,e),...s,children:a})}));C.displayName="CardFooter";const h=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("div",{ref:t,className:c(`${i}-header`,e),...s,children:a})}));h.displayName="CardHeader";const p=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("h3",{ref:t,className:c(`${i}-title`,e),...s,children:a})}));p.displayName="CardTitle";const u=a.forwardRef((({children:a,className:e="",customRootClass:s,variant:o="",size:t="",...i},l)=>r(d,{ref:l,className:c(e),customRootClass:s,variant:o,size:t,...i,children:a})));u.displayName="Card",u.Root=d,u.Action=m,u.Content=f,u.Description=N,u.Footer=C,u.Header=h,u.Title=p;export{u as default};
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as s,useMemo as e,useContext as o}from"react";import{u as t}from"./useComponentClass-QwNivz0h.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";const n=s({rootClass:"rad-ui-card"}),l="Card",d=a.forwardRef((({children:a,customRootClass:s,className:o="",variant:d="",size:m="",...f},C)=>{const N=t(s,l),h=t(s,l,"root"),p=i("card",{variant:d,size:m}),u=e((()=>({rootClass:N})),[N]);return r(n.Provider,{value:u,children:r("div",{ref:C,className:c(h,o),...p,...f,children:a})})}));d.displayName=l;const m=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("div",{ref:t,className:c(i&&`${i}-action`,s),...e,children:a})}));m.displayName="CardAction";const f=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("div",{ref:t,className:c(i&&`${i}-content`,s),...e,children:a})}));f.displayName="CardContent";const C=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("p",{ref:t,className:c(i&&`${i}-description`,s),...e,children:a})}));C.displayName="CardDescription";const N=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("div",{ref:t,className:c(i&&`${i}-footer`,s),...e,children:a})}));N.displayName="CardFooter";const h=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("div",{ref:t,className:c(i&&`${i}-header`,s),...e,children:a})}));h.displayName="CardHeader";const p=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("h3",{ref:t,className:c(i&&`${i}-title`,s),...e,children:a})}));p.displayName="CardTitle";const u=a.forwardRef((({children:a,className:s="",customRootClass:e,variant:o="",size:t="",...i},n)=>r(d,{ref:n,className:c(s),customRootClass:e,variant:o,size:t,...i,children:a})));u.displayName="Card",u.Root=d,u.Action=m,u.Content=f,u.Description=C,u.Footer=N,u.Header=h,u.Title=p;export{u as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import i,{forwardRef as a,useRef as s,useEffect as t,useContext as c}from"react";import{B as d}from"./index-BOy86lYu.js";import{u as n}from"./index-wRElCyvx.js";import{c as o}from"./index-6If6D2Zi.js";import{c as l}from"./clsx-BaVHROc5.js";import{c as m,a as h,b as u}from"./index-3dZuI04X.js";import{C as k}from"./check-DujVUWP-.js";import"./index-98jQ1vTr.js";const C=i.createContext({isChecked:!1,setIsChecked:()=>{},id:"",required:!1,disabled:!1}),x=a((({children:r,className:a="",...s},t)=>{const{isChecked:c,setIsChecked:n,id:o,required:l,disabled:m}=i.useContext(C);return e(d,{ref:t,onClick:()=>{n("indeterminate"===c||null===c||!c)},role:"checkbox",id:o,"aria-checked":"indeterminate"===c||null===c?"mixed":c,"aria-required":l,"data-checked":c,"data-state":"indeterminate"===c||null===c?"indeterminate":c?"checked":"unchecked",disabled:m,"data-disabled":m,className:a,...s,children:r})}));x.displayName="CheckboxPrimitiveTrigger";const p=a((({children:i,className:a="",checked:c,defaultChecked:d=!1,onCheckedChange:o,disabled:l,required:m,name:h,value:u,id:k,...p},b)=>{const[f,N]=n(c,d,o),v=s(null);t((()=>{v.current&&(v.current.indeterminate="indeterminate"===f||null===f)}),[f]);const y={isChecked:f,setIsChecked:N,id:k,required:m,disabled:l};return r(C.Provider,{value:y,children:[e(x,{ref:b,className:a,disabled:l,required:m,...p,children:i}),e("input",{ref:v,type:"checkbox",id:k,style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"},name:h,value:u,checked:!0===f,disabled:l,required:m,readOnly:!0})]})}));p.displayName="CheckboxPrimitiveRoot";const b=i.createContext({rootClass:""}),f="Checkbox",N=a((({children:r,className:i="",customRootClass:a,color:s="",variant:t,size:c,...d},n)=>{const k=o(a,f),C=m("checkbox",{variant:t,size:c}),x=u(s),N=h(C,x);return e(b.Provider,{value:{rootClass:k},children:e(p,{ref:n,className:l(k,i),...d,...N,children:r})})}));N.displayName=f;const v=a((({children:r,className:a="",...s},t)=>{const{isChecked:c}=i.useContext(C);return!0!==c?null:e("span",{ref:t,className:a,...s,children:r})}));v.displayName="CheckboxPrimitiveIndicator";const y=a((({children:i,className:a="",...s},t)=>{const{rootClass:d}=c(b);return r(v,{ref:t,...s,children:[e(k,{width:15,height:15,className:l(`${d}-indicator`,a)}),i]})}));y.displayName="CheckboxIndicator";const j=()=>(console.warn("Direct usage of Checkbox is not supported. Please use Checkbox.Root, Checkbox.Indicator instead."),null);j.Root=N,j.Indicator=y;export{j as default};
1
+ 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import i,{forwardRef as s,useRef as a,useEffect as t,useContext as c}from"react";import{B as n}from"./index-gM8bbyw1.js";import{u as o}from"./index-wRElCyvx.js";import{u as d}from"./useComponentClass-QwNivz0h.js";import{c as l}from"./clsx-BaVHROc5.js";import{c as m,a as h,b as u}from"./index-eAZUMNef.js";import{C}from"./check-DujVUWP-.js";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";import"./ThemeContext-Sm-iNANd.js";const k=i.createContext({isChecked:!1,setIsChecked:()=>{},id:"",required:!1,disabled:!1}),p=s((({children:r,className:s="",...a},t)=>{const{isChecked:c,setIsChecked:o,id:d,required:l,disabled:m}=i.useContext(k);return e(n,{ref:t,onClick:()=>{o("indeterminate"===c||null===c||!c)},role:"checkbox",id:d,"aria-checked":"indeterminate"===c||null===c?"mixed":c,"aria-required":l,"data-checked":c,"data-state":"indeterminate"===c||null===c?"indeterminate":c?"checked":"unchecked",disabled:m,"data-disabled":m,className:s,...a,children:r})}));p.displayName="CheckboxPrimitiveTrigger";const x=s((({children:i,className:s="",checked:c,defaultChecked:n=!1,onCheckedChange:d,disabled:l,required:m,name:h,value:u,id:C,...x},b)=>{const[f,N]=o(c,n,d),v=a(null);t((()=>{v.current&&(v.current.indeterminate="indeterminate"===f||null===f)}),[f]);const j={isChecked:f,setIsChecked:N,id:C,required:m,disabled:l};return r(k.Provider,{value:j,children:[e(p,{ref:b,className:s,disabled:l,required:m,...x,children:i}),e("input",{ref:v,type:"checkbox",id:C,style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"},name:h,value:u,checked:!0===f,disabled:l,required:m,readOnly:!0})]})}));x.displayName="CheckboxPrimitiveRoot";const b=i.createContext({rootClass:""}),f="Checkbox",N=s((({children:r,className:i="",customRootClass:s,color:a="",variant:t,size:c,...n},o)=>{const C=d(s,f),k=m("checkbox",{variant:t,size:c}),p=u(a),N=h(k,p);return e(b.Provider,{value:{rootClass:C},children:e(x,{ref:o,className:l(C,i),...n,...N,children:r})})}));N.displayName=f;const v=s((({children:r,className:s="",...a},t)=>{const{isChecked:c}=i.useContext(k);return!0!==c?null:e("span",{ref:t,className:s,...a,children:r})}));v.displayName="CheckboxPrimitiveIndicator";const j=s((({children:i,className:s="",...a},t)=>{const{rootClass:n}=c(b);return r(v,{ref:t,...a,children:[e(C,{width:15,height:15,className:l(n&&`${n}-indicator`,s)}),i]})}));j.displayName="CheckboxIndicator";const y=()=>(console.warn("Direct usage of Checkbox is not supported. Please use Checkbox.Root, Checkbox.Indicator instead."),null);y.Root=N,y.Indicator=j;export{y as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import o,{forwardRef as s,useContext as t}from"react";import{C as r}from"./CheckboxGroupPrimitive-DgfnzMT9.js";import{c as a}from"./index-6If6D2Zi.js";import{c as i}from"./clsx-BaVHROc5.js";import{c,a as n,b as m}from"./index-3dZuI04X.js";import{C as l}from"./check-DujVUWP-.js";import"./index-TYaYKM2M.js";import"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";const d=o.createContext({rootClass:""}),C="CheckboxCards",h=s((({children:o,customRootClass:s="",className:t="",color:l="",variant:h="",size:x="",orientation:p="both",...u},f)=>{const b=a(s,C),j=c("checkbox-cards",{variant:h,size:x}),k=m(l),N=n(j,k);return e(d.Provider,{value:{rootClass:b},children:e(r.Root,{ref:f,className:i(`${b}-root`,b,t),...u,...N,orientation:p,children:o})})}));h.displayName=C;const x=s((({children:s,className:t="",value:a,...c},n)=>{const{rootClass:m}=o.useContext(d);return e(r.Trigger,{ref:n,className:i(`${m}-item`,t),value:a,...c,children:s})}));x.displayName="CheckboxCardsItem";const p=s((({children:s,...t},a)=>{const{rootClass:i}=o.useContext(d);return e(r.Content,{ref:a,className:`${i}-content`,...t,children:s})}));p.displayName="CheckboxCardsContent";const u=s((({className:o,...s},r)=>{const{rootClass:a}=t(d);return e(l,{ref:r,width:15,height:15,className:i(`${a}-tick-icon`,o),...s})}));u.displayName="CheckboxCardsIndicator";const f=()=>(console.warn("Direct usage of CheckboxCards is not supported. Please use CheckboxCards.Root, CheckboxCards.Item instead."),null);f.Root=h,f.Content=p,f.Item=x,f.Indicator=u;export{f as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import o,{forwardRef as s,useContext as t}from"react";import{C as r}from"./CheckboxGroupPrimitive-Cd8ra39e.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{c as i}from"./clsx-BaVHROc5.js";import{c as n,a as c,b as m}from"./index-eAZUMNef.js";import{C as l}from"./check-DujVUWP-.js";import"./index-DOVR6Rd5.js";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";import"./index-gM8bbyw1.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";const d=o.createContext({rootClass:""}),C="CheckboxCards",p=s((({children:o,customRootClass:s="",className:t="",color:l="",variant:p="",size:h="",orientation:x="both",...u},f)=>{const j=a(s,C),N=n("checkbox-cards",{variant:p,size:h}),b=m(l),k=c(N,b);return e(d.Provider,{value:{rootClass:j},children:e(r.Root,{ref:f,className:i(j&&`${j}-root`,j,t),...u,...k,orientation:x,children:o})})}));p.displayName=C;const h=s((({children:s,className:t="",value:a,...n},c)=>{const{rootClass:m}=o.useContext(d);return e(r.Trigger,{ref:c,className:i(m&&`${m}-item`,t),value:a,...n,children:s})}));h.displayName="CheckboxCardsItem";const x=s((({children:s,className:t,...a},n)=>{const{rootClass:c}=o.useContext(d),m=i(c?`${c}-content`:void 0,t)||void 0;return e(r.Content,{ref:n,className:m,...a,children:s})}));x.displayName="CheckboxCardsContent";const u=s((({className:o,...s},r)=>{const{rootClass:a}=t(d);return e(l,{ref:r,width:15,height:15,className:i(a&&`${a}-tick-icon`,o),...s})}));u.displayName="CheckboxCardsIndicator";const f=()=>(console.warn("Direct usage of CheckboxCards is not supported. Please use CheckboxCards.Root, CheckboxCards.Item instead."),null);f.Root=p,f.Content=x,f.Item=h,f.Indicator=u;export{f as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import o,{forwardRef as r,useContext as s}from"react";import{C as t}from"./CheckboxGroupPrimitive-DgfnzMT9.js";import{c as a}from"./index-6If6D2Zi.js";import{c}from"./clsx-BaVHROc5.js";import{c as i,a as l,b as n}from"./index-3dZuI04X.js";import{P as m}from"./index-98jQ1vTr.js";import{C as p}from"./check-DujVUWP-.js";import"./index-TYaYKM2M.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";const d=o.createContext({rootClass:""}),u="CheckboxGroup",h=r((({children:o,customRootClass:r="",className:s="",color:m="",variant:p="",size:h="",...x},C)=>{const f=a(r,u),b=i("checkbox-group",{variant:p,size:h}),g=n(m),N=l(b,g);return e(d.Provider,{value:{rootClass:f},children:e(t.Root,{ref:C,className:c(`${f}-root`,f,s),...x,...N,children:o})})}));h.displayName=u;const x=r((({children:r,className:s="",value:a,...i},l)=>{const{rootClass:n}=o.useContext(d);return e(t.Trigger,{ref:l,className:c(`${n}-trigger`,s),value:a,...i,children:e(t.Content,{children:r})})}));x.displayName="CheckboxGroupTrigger";const C=r((({children:o,className:r="",...t},a)=>{const{rootClass:i}=s(d);return e(m.label,{ref:a,className:c(`${i}-label`,r),...t,children:o})}));C.displayName="CheckboxGroupLabel";const f=r((({className:o,...r},t)=>{const{rootClass:a}=s(d);return e(p,{ref:t,width:15,height:15,className:c(`${a}-tick-icon`,o),...r})}));f.displayName="CheckboxGroupIndicator";const b=()=>(console.warn("Direct usage of CheckboxGroup is not supported. Please use CheckboxGroup.Root, CheckboxGroup.Item instead."),null);b.Root=h,b.Trigger=x,b.Label=C,b.Indicator=f;export{b as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import o,{forwardRef as r,useContext as s}from"react";import{C as t}from"./CheckboxGroupPrimitive-Cd8ra39e.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{c as i}from"./clsx-BaVHROc5.js";import{c,a as n,b as l}from"./index-eAZUMNef.js";import{P as m}from"./index-m6qHOeQ9.js";import{C as p}from"./check-DujVUWP-.js";import"./index-DOVR6Rd5.js";import"./index-gM8bbyw1.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-B9ocQsG4.js";const u=o.createContext({rootClass:""}),d="CheckboxGroup",h=r((({children:o,customRootClass:r="",className:s="",color:m="",variant:p="",size:h="",...C},x)=>{const f=a(r,d),b=c("checkbox-group",{variant:p,size:h}),g=l(m),j=n(b,g);return e(u.Provider,{value:{rootClass:f},children:e(t.Root,{ref:x,className:i(f&&`${f}-root`,f,s),...C,...j,children:o})})}));h.displayName=d;const C=r((({children:r,className:s="",value:a,...c},n)=>{const{rootClass:l}=o.useContext(u);return e(t.Trigger,{ref:n,className:i(l&&`${l}-trigger`,s),value:a,...c,children:e(t.Content,{children:r})})}));C.displayName="CheckboxGroupTrigger";const x=r((({children:o,className:r="",...t},a)=>{const{rootClass:c}=s(u);return e(m.label,{ref:a,className:i(c&&`${c}-label`,r),...t,children:o})}));x.displayName="CheckboxGroupLabel";const f=r((({className:o,...r},t)=>{const{rootClass:a}=s(u);return e(p,{ref:t,width:15,height:15,className:i(a&&`${a}-tick-icon`,o),...r})}));f.displayName="CheckboxGroupIndicator";const b=()=>(console.warn("Direct usage of CheckboxGroup is not supported. Please use CheckboxGroup.Root, CheckboxGroup.Item instead."),null);b.Root=h,b.Trigger=C,b.Label=x,b.Indicator=f;export{b as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import i,{forwardRef as a}from"react";import{R as d}from"./index-TYaYKM2M.js";import{u as o}from"./index-wRElCyvx.js";const t=i.createContext({checkedValues:[],setCheckedValues:()=>{},name:"",required:!1,disabled:!1}),c=a((({dir:r,orientation:i,loop:a,defaultValue:c=[],value:n,onValueChange:s,children:l,name:u,required:h,disabled:m,className:p="",...k},C)=>{const[b,x]=o(n,c,s);return e("div",{ref:C,className:p,...k,children:e(d.Root,{dir:r,orientation:i??"horizontal",loop:a??!0,children:e(t.Provider,{value:{checkedValues:b,setCheckedValues:x,name:u,required:h,disabled:m},children:e(d.Group,{children:l})})})})}));c.displayName="CheckboxGroupPrimitiveRoot";const n=i.createContext({isChecked:!1}),s=a((({children:a,className:o="",value:c,required:s,disabled:l,checked:u,onCheckedChange:h,onClick:m,...p},k)=>{const{checkedValues:C,setCheckedValues:b,name:x,required:v,disabled:f}=i.useContext(t),N=C.includes(c),g=s||v,y=l||f,{role:V,...q}=p;return r("div",{children:[e(n.Provider,{value:{isChecked:N},children:e(d.Item,{ref:k,onClick:e=>{m?.(e),e.preventDefault(),e.stopPropagation(),C.includes(c)?(b(C.filter((e=>e!==c))),h?.(!1)):C.includes(c)||(b([...C,c]),h?.(!0))},className:o,role:"checkbox","aria-checked":N,"aria-required":g,"aria-disabled":y||void 0,disabled:y,...q,"data-state":N?"checked":"unchecked",children:e("button",{type:"button",disabled:y,children:a})})}),e("input",{type:"checkbox",checked:N,name:x,value:c,style:{display:"none"},required:g,disabled:y,"aria-hidden":"true",readOnly:!0})]})}));s.displayName="CheckboxGroupPrimitiveTrigger";const l=a((({children:r,className:a,...d},o)=>{const{isChecked:t}=i.useContext(n);return e("span",{ref:o,className:a,...d,children:t?r:null})}));l.displayName="CheckboxGroupPrimitiveContent";const u=()=>(console.warn("Direct usage of CheckboxGroup is not supported. Please use CheckboxGroup.Root, CheckboxGroup.Item instead."),null);u.Root=c,u.Trigger=s,u.Content=l;export{u as C};
1
+ 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import i,{forwardRef as a}from"react";import{R as d}from"./index-DOVR6Rd5.js";import{u as o}from"./index-wRElCyvx.js";const t=i.createContext({checkedValues:[],setCheckedValues:()=>{},name:"",required:!1,disabled:!1}),c=a((({dir:r,orientation:i,loop:a,defaultValue:c=[],value:n,onValueChange:s,children:l,name:u,required:h,disabled:m,className:p="",...k},C)=>{const[b,x]=o(n,c,s);return e("div",{ref:C,className:p,...k,children:e(d.Root,{dir:r,orientation:i??"horizontal",loop:a??!0,children:e(t.Provider,{value:{checkedValues:b,setCheckedValues:x,name:u,required:h,disabled:m},children:e(d.Group,{children:l})})})})}));c.displayName="CheckboxGroupPrimitiveRoot";const n=i.createContext({isChecked:!1}),s=a((({children:a,className:o="",value:c,required:s,disabled:l,checked:u,onCheckedChange:h,onClick:m,...p},k)=>{const{checkedValues:C,setCheckedValues:b,name:x,required:v,disabled:f}=i.useContext(t),N=C.includes(c),g=s||v,y=l||f,{role:V,...q}=p;return r("div",{children:[e(n.Provider,{value:{isChecked:N},children:e(d.Item,{ref:k,onClick:e=>{m?.(e),e.preventDefault(),e.stopPropagation(),C.includes(c)?(b(C.filter((e=>e!==c))),h?.(!1)):C.includes(c)||(b([...C,c]),h?.(!0))},className:o,role:"checkbox","aria-checked":N,"aria-required":g,"aria-disabled":y||void 0,disabled:y,...q,"data-state":N?"checked":"unchecked",children:e("button",{type:"button",disabled:y,children:a})})}),e("input",{type:"checkbox",checked:N,name:x,value:c,style:{display:"none"},required:g,disabled:y,"aria-hidden":"true",readOnly:!0})]})}));s.displayName="CheckboxGroupPrimitiveTrigger";const l=a((({children:r,className:a,...d},o)=>{const{isChecked:t}=i.useContext(n);return e("span",{ref:o,className:a,...d,children:t?r:null})}));l.displayName="CheckboxGroupPrimitiveContent";const u=()=>(console.warn("Direct usage of CheckboxGroup is not supported. Please use CheckboxGroup.Root, CheckboxGroup.Item instead."),null);u.Root=c,u.Trigger=s,u.Content=l;export{u as C};
@@ -1 +1 @@
1
- 'use client';import{jsx as r}from"react/jsx-runtime";import s from"react";import{c as a}from"./clsx-BaVHROc5.js";import{c as o}from"./index-6If6D2Zi.js";import{a as e,b as t,c}from"./index-3dZuI04X.js";const i="Code",m=s.forwardRef((({children:s,customRootClass:m="",color:d="",variant:n="",size:f="",className:l,...p},x)=>{const j=o(m,i),u=e(c("code",{variant:n,size:f}),t(d));return r("code",{ref:x,className:a(j,l),...u,...p,children:s})}));m.displayName=i;export{m as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import o from"react";import{c as r}from"./clsx-BaVHROc5.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{a as e,b as t,c as m}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";const c="Code",i=o.forwardRef((({children:o,customRootClass:i="",color:n="",variant:f="",size:l="",className:d,...p},u)=>{const j=a(i,c),x=e(m("code",{variant:f,size:l}),t(n));return s("code",{ref:u,className:r(j,d),...x,...p,children:o})}));i.displayName=c;export{i as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import{c as o}from"./clsx-BaVHROc5.js";import s,{createContext as r,useContext as a}from"react";import{c as t}from"./index-6If6D2Zi.js";import{C as l}from"./index-DTYJVF-V.js";import"./index-98jQ1vTr.js";import"./index-wRElCyvx.js";import"./index-BOy86lYu.js";const i=r({rootClass:"",open:!1,onOpenChange:()=>{},disabled:!1,defaultOpen:!1}),n=s.forwardRef((({children:s,className:r="",transitionDuration:a=0,disabled:n,customRootClass:c,...d},m)=>{const p=t(c,"Collapsible");return e(i.Provider,{value:{rootClass:p},children:e(l.Root,{ref:m,className:o(p,r),transitionDuration:a,disabled:n,...d,children:s})})}));n.displayName="CollapsibleRoot";const c=s.forwardRef((({children:s,className:r,...t},n)=>{const{rootClass:c}=a(i),d=c?`${c}-trigger`:"";return e(l.Trigger,{ref:n,className:o(d,r),...t,children:s})}));c.displayName="CollapsibleTrigger";const d=s.forwardRef((({children:s,className:r="",...t},n)=>{const{rootClass:c}=a(i),d=c?`${c}-content`:"";return e(l.Content,{ref:n,className:o(d,r),...t,children:s})}));d.displayName="CollapsibleContent";const m=()=>(console.warn("Direct usage of Collapsible is not supported. Please use Collapsible.Root, Collapsible.Trigger, etc. instead."),null);m.Root=n,m.Trigger=c,m.Content=d;export{m as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{c as o}from"./clsx-BaVHROc5.js";import s,{createContext as r,useContext as t}from"react";import{u as a}from"./useComponentClass-QwNivz0h.js";import{C as l}from"./index-Ir5FYyWW.js";import"./ThemeContext-Sm-iNANd.js";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";import"./index-wRElCyvx.js";import"./index-gM8bbyw1.js";const i=r({rootClass:"",open:!1,onOpenChange:()=>{},disabled:!1,defaultOpen:!1}),n=s.forwardRef((({children:s,className:r="",transitionDuration:t=0,disabled:n,customRootClass:c,...m},d)=>{const p=a(c,"Collapsible");return e(i.Provider,{value:{rootClass:p},children:e(l.Root,{ref:d,className:o(p,r),transitionDuration:t,disabled:n,...m,children:s})})}));n.displayName="CollapsibleRoot";const c=s.forwardRef((({children:s,className:r,...a},n)=>{const{rootClass:c}=t(i),m=c?`${c}-trigger`:"";return e(l.Trigger,{ref:n,className:o(m,r),...a,children:s})}));c.displayName="CollapsibleTrigger";const m=s.forwardRef((({children:s,className:r="",...a},n)=>{const{rootClass:c}=t(i),m=c?`${c}-content`:"";return e(l.Content,{ref:n,className:o(m,r),...a,children:s})}));m.displayName="CollapsibleContent";const d=()=>(console.warn("Direct usage of Collapsible is not supported. Please use Collapsible.Root, Collapsible.Trigger, etc. instead."),null);d.Root=n,d.Trigger=c,d.Content=m;export{d as default};
@@ -10,6 +10,7 @@ declare const ComboboxContent: React.ForwardRefExoticComponent<Omit<ComboboxCont
10
10
  interface ComboboxPrimitiveItemProps {
11
11
  children: React.ReactNode;
12
12
  value: string;
13
+ label?: string;
13
14
  disabled?: boolean;
14
15
  className?: string;
15
16
  [key: string]: any;
@@ -30,9 +31,10 @@ declare const ComboboxItem: React.ForwardRefExoticComponent<(Omit<Omit<Omit<Comb
30
31
  }, "ref">) & React.RefAttributes<HTMLElement>>;
31
32
 
32
33
  type ComboboxPrimitiveTriggerProps = {
33
- children: React.ReactNode;
34
+ children?: React.ReactNode;
34
35
  className?: string;
35
36
  disabled?: boolean;
37
+ renderValue?: (value: string, label: string) => React.ReactNode;
36
38
  [key: string]: any;
37
39
  };
38
40
 
@@ -1 +1 @@
1
- 'use client';import o,{useContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{C as a}from"./ComboboxPrimitive-Ddp_PqU6.js";import{c as t}from"./index-6If6D2Zi.js";import{C as s}from"./check-DujVUWP-.js";import"./index-W6-aam_B.js";import"./floating-ui.react-DMgxgTKq.js";import"react-dom";import"./index-98jQ1vTr.js";import"./index-CXzybYmm.js";import"./index-wRElCyvx.js";const i=o.createContext({rootClass:""}),n=o.forwardRef((({customRootClass:o,children:t,position:s="popper",...n},l)=>{const{rootClass:d}=e(i);return r(a.Content,{className:`${d}-content`,position:s,"data-position":s,ref:l,...n,children:t})}));n.displayName="ComboboxContent";const l=o.forwardRef((({customRootClass:o,children:t,value:s,disabled:n,...l},d)=>{const{rootClass:c}=e(i);return r(a.Item,{className:`${c}-item`,value:s,disabled:n,"data-disabled":n?"":void 0,role:"option","aria-disabled":n?"true":void 0,ref:d,...l,children:r("span",{className:`${c}-text`,children:t})})}));l.displayName="ComboboxItem";const d=o.forwardRef((({customRootClass:o,children:t,disabled:s,placeholder:n,...l},d)=>{const{rootClass:c}=e(i);return r(a.Trigger,{className:`${c}-trigger`,"aria-disabled":s?"true":void 0,"data-placeholder":n?"":void 0,disabled:s,ref:d,...l,children:t})}));d.displayName="ComboboxTrigger";const c=o.forwardRef((({customRootClass:o,children:e,defaultValue:s,value:n,onValueChange:l,shift:d,...c},m)=>{const f=t(o,"Combobox");return r(i.Provider,{value:{rootClass:f},children:r(a.Root,{className:`${f}-root`,defaultValue:s,value:n,onValueChange:l,shift:d,ref:m,...c,children:e})})}));c.displayName="ComboboxRoot";const m=o.forwardRef(((o,a)=>{const{rootClass:t}=e(i);return r("div",{className:`${t}-item-indicator`,ref:a,...o,children:r(s,{width:16,height:16})})}));m.displayName="ComboboxIndicator";const f=o.forwardRef((({children:o,container:e,...t},s)=>r(a.Portal,{ref:s,container:e,...t,children:o})));f.displayName="ComboboxPortal";const p=o.forwardRef((({children:o,...t},s)=>{const{rootClass:n}=e(i);return r(a.Group,{className:`${n}-group`,ref:s,...t,children:o})}));p.displayName="ComboboxGroup";const b=o.forwardRef(((o,t)=>{const{rootClass:s}=e(i);return r(a.Search,{className:`${s}-search`,ref:t,...o})}));b.displayName="ComboboxSearch";const u=o.forwardRef(((o,e)=>(console.warn("Direct usage of Combobox is not supported. Please use Combobox.Root, Combobox.Content, etc. instead."),null)));u.displayName="Combobox";const C=u;C.Root=c,C.Content=n,C.Item=l,C.Trigger=d,C.Portal=f,C.Group=p,C.Indicator=m,C.Search=b;export{C as default};
1
+ 'use client';import o,{useContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{C as a}from"./ComboboxPrimitive-BhHSrtiY.js";import{c as s}from"./clsx-BaVHROc5.js";import{u as t}from"./useComponentClass-QwNivz0h.js";import{C as i}from"./check-DujVUWP-.js";import"./index-Db-tduwt.js";import"./floating-ui.react-Byzse64h.js";import"react-dom";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";import"./index-CXzybYmm.js";import"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";const d=o.createContext({rootClass:""}),l=o.forwardRef((({customRootClass:o,children:s,position:t="popper",...i},l)=>{const{rootClass:n}=e(d);return r(a.Content,{className:n?`${n}-content`:void 0,position:t,"data-position":t,ref:l,...i,children:s})}));l.displayName="ComboboxContent";const n=o.forwardRef((({customRootClass:o,children:s,value:t,disabled:i,...l},n)=>{const{rootClass:c}=e(d);return r(a.Item,{className:c?`${c}-item`:void 0,value:t,disabled:i,"data-disabled":i?"":void 0,role:"option","aria-disabled":i?"true":void 0,ref:n,...l,children:r("span",{className:c?`${c}-text`:void 0,children:s})})}));n.displayName="ComboboxItem";const c=o.forwardRef((({customRootClass:o,children:t,disabled:i,placeholder:l,className:n,...c},m)=>{const{rootClass:p}=e(d),f=s(p?`${p}-trigger`:void 0,n)||void 0;return r(a.Trigger,{className:f,"aria-disabled":i?"true":void 0,"data-placeholder":l?"":void 0,disabled:i,ref:m,...c,children:t})}));c.displayName="ComboboxTrigger";const m=o.forwardRef((({customRootClass:o,children:e,defaultValue:s,value:i,onValueChange:l,sideOffset:n=4,...c},m)=>{const p=t(o,"Combobox");return r(d.Provider,{value:{rootClass:p},children:r(a.Root,{className:p?`${p}-root`:void 0,defaultValue:s,value:i,onValueChange:l,sideOffset:n,ref:m,...c,children:e})})}));m.displayName="ComboboxRoot";const p=o.forwardRef((({className:o,...a},t)=>{const{rootClass:l}=e(d),n=s(l?`${l}-item-indicator`:void 0,o)||void 0;return r("div",{className:n,ref:t,...a,children:r(i,{width:16,height:16})})}));p.displayName="ComboboxIndicator";const f=o.forwardRef((({children:o,container:e,...s},t)=>r(a.Portal,{ref:t,container:e,...s,children:o})));f.displayName="ComboboxPortal";const C=o.forwardRef((({children:o,...s},t)=>{const{rootClass:i}=e(d);return r(a.Group,{className:i?`${i}-group`:void 0,ref:t,...s,children:o})}));C.displayName="ComboboxGroup";const u=o.forwardRef((({className:o,...t},i)=>{const{rootClass:l}=e(d),n=s(l?`${l}-search`:void 0,o)||void 0;return r(a.Search,{className:n,ref:i,...t})}));u.displayName="ComboboxSearch";const b=o.forwardRef(((o,e)=>(console.warn("Direct usage of Combobox is not supported. Please use Combobox.Root, Combobox.Content, etc. instead."),null)));b.displayName="Combobox";const h=b;h.Root=m,h.Content=l,h.Item=n,h.Trigger=c,h.Portal=f,h.Group=C,h.Indicator=p,h.Search=u;export{h as default};
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import n,{createContext as i,useContext as a,useState as s,useEffect as o,useLayoutEffect as l}from"react";import{F as d}from"./index-Db-tduwt.js";import{P as c}from"./index-m6qHOeQ9.js";import{c as u}from"./index-CXzybYmm.js";import{u as f}from"./index-wRElCyvx.js";const m=i({});const p=n.forwardRef((({children:r,className:n,style:i,...s},o)=>{const{isOpen:l,elementsRef:c,labelsRef:u,floatingContext:f,refs:p,middlewareData:h,placedPlacement:g,getFloatingProps:b,floatingStyles:v,isPositioned:R}=a(m),y=d.useMergeRefs([p.setFloating,o]),x="undefined"==typeof navigator||!/jsdom/i.test(navigator.userAgent),I=function(e){const[t,r="center"]=e.split("-"),n="start"===r?"left":"end"===r?"right":"center",i="start"===r?"top":"end"===r?"bottom":"center";switch(t){case"top":return{side:t,align:r,transformOrigin:`${n} bottom`};case"bottom":return{side:t,align:r,transformOrigin:`${n} top`};case"left":return{side:t,align:r,transformOrigin:`right ${i}`};case"right":return{side:t,align:r,transformOrigin:`left ${i}`};default:return{side:"bottom",align:"center",transformOrigin:"center top"}}}(g);return e(t,{children:l&&e(d.FocusManager,{context:f,children:e(d.FloatingList,{elementsRef:c,labelsRef:u,children:e("div",{ref:y,style:{...v,...i,"--rad-ui-floating-transform-origin":I.transformOrigin,visibility:!R&&x||h.hide?.referenceHidden?"hidden":i?.visibility||v.visibility,pointerEvents:h.hide?.referenceHidden?"none":i?.pointerEvents},className:n,"data-state":l?"open":"closed","data-side":I.side,"data-align":I.align,"data-positioned":R?"":void 0,...b(),...s,children:r})})})})}));p.displayName="ComboboxPrimitiveContent";const h=i(null),g=n.forwardRef((({children:t,value:r,label:i,disabled:s,className:o,...l},u)=>{const f=a(m);if(!f)return console.error("ComboboxPrimitiveItem must be used within a ComboboxPrimitive"),null;const{handleSelect:p,isTypingRef:g,getItemProps:b,activeIndex:v,selectedIndex:R,selectedValue:y,virtualItemRef:x,selectedItemRef:I,hasSearch:P,search:C,hiddenIndices:S,disabledIndices:w,setDisabledIndices:N,labelsRef:M,displayLabelsRef:O,valuesRef:A,bumpLabelsVersion:k}=f,D=n.useRef(null),$=i||r,{ref:E,index:F}=d.useListItem({label:$}),L=S.includes(F),V=v===F,j=R===F||y===r,H=r||`select-item-${F}`,T=a(h);n.useEffect((()=>{if(T?.registerItem)return T.registerItem(H,!L)}),[T,H,L]),n.useEffect((()=>(A.current[F]=H,M.current[F]=$,O.current[F]=$,()=>{delete A.current[F],delete M.current[F],delete O.current[F]})),[O,F,H,$,M,A]),n.useEffect((()=>(k(),()=>{k()})),[F,$,r,k]),n.useEffect((()=>{const e=F;return N((t=>{if(s&&t.includes(e))return t;if(!s&&!t.includes(e))return t;const r=new Set(t);return s?r.add(e):r.delete(e),Array.from(r).sort(((e,t)=>e-t))})),()=>{N((t=>{if(!t.includes(e))return t;const r=new Set(t);return r.delete(e),Array.from(r).sort(((e,t)=>e-t))}))}}),[F,s,N]);const z=n.useCallback((e=>{j&&!P?I.current=e:I.current===e&&(I.current=null)}),[P,j,I]);return e(c.div,{ref:d.useMergeRefs([E,D,z,u]),id:H,role:"option",className:o,style:{display:L?"none":void 0,...l.style},"data-value":r,"data-label":$,"data-active":P?x.current?.id==H:V,"aria-selected":j,"aria-disabled":!!s||void 0,"data-disabled":s?"":void 0,...b({tabIndex:s?-1:V?0:-1,onClick:()=>!s&&p(F),onKeyDown:e=>{s||("Enter"===e.key&&(e.preventDefault(),p(F))," "!==e.key||g.current||(e.preventDefault(),p(F)))}}),...l,tabIndex:s?-1:V?0:-1,children:t})}));g.displayName="ComboboxPrimitiveItem";const b=n.forwardRef((({children:t,className:r,disabled:n,asChild:i,onClick:s,renderValue:o,...l},f)=>{const{isOpen:p,setIsOpen:h,selectedLabel:g,selectedValue:b,refs:v,getReferenceProps:R}=a(m),{onClick:y,...x}=R(),I=u(s,(()=>{n||h((e=>!e))})),P=Boolean(g||b)?o?.(b,g||b):void 0;return e(c.button,{type:i?void 0:"button",className:r,"aria-expanded":p,"data-state":p?"open":"closed","aria-disabled":!!n||void 0,disabled:!!n||void 0,ref:d.useMergeRefs([v.setReference,f]),role:"combobox",asChild:i,onClick:I,...x,...l,children:P??(g||b||t)})}));b.displayName="ComboboxPrimitiveTrigger";const v=n.forwardRef((({children:t,className:i,value:a,name:u,defaultValue:p="",onValueChange:h,onClickOutside:g=()=>{},align:b="start",alignOffset:v=0,avoidCollisions:R=!0,collisionBoundary:y=null,collisionPadding:x=8,constrainSize:I=!0,enableFlip:P=!0,enableShift:C=!0,hideWhenDetached:S=!1,matchReferenceWidth:w=!1,offsetValue:N,onPlaced:M,placement:O,positioningStrategy:A="fixed",side:k="bottom",sideOffset:D,sticky:$="partial",updatePositionStrategy:E="optimized",...F},L)=>{const[V,j]=n.useState(!1),[H,T]=f(a,p,h),[z,B]=n.useState(p),W=n.useRef(null),G=n.useRef([]),K=n.useRef([]),q=n.useRef([]),U=n.useRef([]),J=n.useRef({}),[Q,X]=n.useState([]),Y=n.useRef(!1),Z=n.useRef(null),_=n.useRef(null),[ee,te]=n.useState(null),[re,ne]=n.useState(null),[ie,ae]=n.useState(!1),[se,oe]=n.useState(""),[le,de]=n.useReducer((e=>e+1),0),ce=n.useMemo((()=>{if(!se)return[];const e=[];for(let t=0;t<K.current.length;t++){const r=K.current[t];r&&!r.toLowerCase().includes(se.toLowerCase())&&e.push(t)}return e}),[se,le]),ue=n.useMemo((()=>{const e=new Set([...Q,...ce]);return Array.from(e).sort(((e,t)=>e-t))}),[Q,ce]),fe=function(e){const[t,r]=s(!1);return o((()=>{if(!e)return void r(!1);let t=e;for(;t;){if("FORM"===t.tagName)return void r(!0);t=t.parentElement}r(!1)}),[e]),t}(Z.current),me=O??function(e,t){return"center"===t?e:`${e}-${t}`}(k,b),pe=D??N??0,he=n.useMemo((()=>Array.isArray(y)?y:[y]),[y]),ge=n.useMemo((()=>{const e=he.filter((e=>null!=e));return{padding:x,boundary:e,altBoundary:e.length>0}}),[he,x]),be=n.useMemo((()=>[d.offset({mainAxis:pe,alignmentAxis:v}),R&&C&&d.shift({mainAxis:!0,crossAxis:!1,limiter:"partial"===$?d.limitShift():void 0,...ge}),R&&P&&d.flip(ge),I&&d.size({...ge,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const i=e.floating.style;i.setProperty("--rad-ui-floating-available-width",`${Math.max(0,r)}px`),i.setProperty("--rad-ui-floating-available-height",`${Math.max(0,n)}px`),i.setProperty("--rad-ui-floating-reference-width",`${t.reference.width}px`),i.setProperty("--rad-ui-floating-reference-height",`${t.reference.height}px`),w?i.width=`${t.reference.width}px`:i.removeProperty("width")}}),S&&d.hide({strategy:"referenceHidden",...ge})].filter(Boolean)),[v,R,I,ge,P,C,S,pe,w,$]),{refs:ve,floatingStyles:Re,context:ye,isPositioned:xe,middlewareData:Ie,update:Pe,placement:Ce}=d.useFloating({middleware:be,open:V,onOpenChange:j,placement:me,strategy:A,whileElementsMounted:(e,t,r)=>d.autoUpdate(e,t,r,{animationFrame:"always"===E})});l((()=>{xe&&M?.()}),[xe,M]);const Se=d.useClick(ye),we=d.useDismiss(ye),Ne=d.useRole(ye,{role:"listbox"});const Me=n.useCallback((e=>{if(null!==e&&!ue.includes(e)&&(ne(e),j(!1),ve.reference.current?.focus(),null!==e)){const t=G.current[e],r=t?.getAttribute("data-value")||U.current[e],n=t?.getAttribute("data-label")||q.current[e]||K.current[e];r&&(T(r),n&&(J.current[r]=n)),n&&B(n)}}),[ue,ve,T]);l((()=>{const e=U.current.findIndex((e=>e===H));if(-1===e)return ne(null),void B(J.current[H]||H);ne(e);const t=G.current[e]?.getAttribute("data-label")||q.current[e]||K.current[e]||H;J.current[H]=t,B(t)}),[le,H]);const Oe=d.useListNavigation(ye,{listRef:G,activeIndex:ee,selectedIndex:re,onNavigate:te,virtual:ie,virtualItemRef:_,disabledIndices:ue}),Ae=d.useTypeahead(ye,{listRef:K,activeIndex:ee,selectedIndex:re,enabled:!ie,onMatch:function(e){null===e||ue.includes(e)||(V?te(e):Me(e))},onTypingChange(e){Y.current=e}}),{getReferenceProps:ke,getFloatingProps:De,getItemProps:$e}=d.useInteractions([Se,we,Ne,Oe,Ae]),Ee=n.useMemo((()=>({isOpen:V,setIsOpen:j,handleSelect:Me,floatingContext:ye,refs:ve,isPositioned:xe,updatePosition:Pe,middlewareData:Ie,placedPlacement:Ce,getFloatingProps:De,getReferenceProps:ke,floatingStyles:Re,getItemProps:$e,activeIndex:ee,selectedIndex:re,elementsRef:G,labelsRef:K,displayLabelsRef:q,valuesRef:U,disabledIndices:Q,setDisabledIndices:X,setActiveIndex:te,selectedLabel:z,selectedValue:H,isTypingRef:Y,virtualItemRef:_,hasSearch:ie,setHasSearch:ae,search:se,setSearch:oe,hiddenIndices:ce,selectedItemRef:W,labelsVersion:le,bumpLabelsVersion:de})),[V,Me,ye,ve,xe,Pe,Ie,Ce,De,ke,Re,$e,ee,re,Q,z,H,ie,se,ce,le]);return e(m.Provider,{value:Ee,children:r(c.div,{...F,className:i,ref:d.useMergeRefs([Z,L]),"data-state":V?"open":"closed",children:[t,fe&&e("select",{name:u,value:H,hidden:!0,"aria-hidden":"true",tabIndex:-1,onChange:()=>{},children:e("option",{value:H,children:H})})]})})}));v.displayName="ComboboxPrimitiveRoot";const R=n.forwardRef((({children:t,container:r,...n},i)=>{const{isOpen:l}=a(m),[c,u]=s(!1),f=r||document.querySelector("#rad-ui-theme-container")||document.body;return o((()=>{f&&u(!0)}),[f]),l&&c?e(d.Portal,{root:f,...n,children:t}):null}));R.displayName="ComboboxPrimitivePortal";const y=n.forwardRef((({children:t,className:r,...i},a)=>{const[s,o]=n.useState(new Set),{search:l}=n.useContext(m),d=n.useCallback(((e,t)=>(o((r=>{if(t&&r.has(e))return r;if(!t&&!r.has(e))return r;const n=new Set(r);return t?n.add(e):n.delete(e),n})),()=>{o((t=>{if(!t.has(e))return t;const r=new Set(t);return r.delete(e),r}))})),[]),c=s.size>0,u=""!==l&&!c,f=n.useMemo((()=>({registerItem:d})),[d]);return e(h.Provider,{value:f,children:e("div",{className:r,ref:a,...i,style:{display:u?"none":void 0,...i.style},children:t})})}));y.displayName="ComboboxPrimitiveGroup";const x=n.forwardRef((({className:t,...r},i)=>{const s=a(m),{refs:o,handleSelect:l,labelsRef:u,valuesRef:f,activeIndex:p,elementsRef:h,virtualItemRef:g,getReferenceProps:b,setHasSearch:v,search:R,setSearch:y,setActiveIndex:x}=s,I=n.useRef(null);n.useEffect((()=>(v(!0),x(0),()=>{v(!1),y("")})),[v,x,y]);const P=b();return e(c.input,{type:"search",className:t,placeholder:"Search...",ref:d.useMergeRefs([I,i]),value:R,"aria-activedescendant":g.current?.id||(null!==p&&f.current[p]?f.current[p]:void 0),onChange:e=>y(e.target.value),...P,onKeyDown:e=>{null!==p&&"Enter"===e.key&&(e.preventDefault(),l(p))},...r})}));x.displayName="ComboboxPrimitiveSearch";const I=n.forwardRef(((e,t)=>(console.warn("Direct usage of Combobox is not supported. Please use Combobox.Root, Combobox.Content, etc. instead."),null)));I.displayName="ComboboxPrimitive";const P=I;P.Root=v,P.Content=p,P.Portal=R,P.Item=g,P.Trigger=b,P.Group=y,P.Search=x;export{P as C};
@@ -0,0 +1,112 @@
1
+ import React from 'react';
2
+ import Primitive from '~/core/primitives/Primitive';
3
+ import DialogPrimitive from '~/core/primitives/Dialog';
4
+
5
+ type CommandFilter = (value: string, search: string, keywords: string[]) => number;
6
+
7
+ type CommandRootProps = React.ComponentPropsWithoutRef<typeof Primitive.div> & {
8
+ customRootClass?: string;
9
+ value?: string;
10
+ defaultValue?: string;
11
+ onValueChange?: (value: string) => void;
12
+ label?: string;
13
+ shouldFilter?: boolean;
14
+ filter?: CommandFilter;
15
+ loop?: boolean;
16
+ };
17
+ declare const CommandRoot: React.ForwardRefExoticComponent<CommandRootProps & React.RefAttributes<HTMLElement>>;
18
+
19
+ type DialogPrimitiveRootProps$1 = {
20
+ children: React.ReactNode;
21
+ open?: boolean;
22
+ onOpenChange?: (open: boolean) => void;
23
+ onClickOutside?: () => void;
24
+ className?: string;
25
+ /** When true, outside pointer events and escape key will not close the dialog. */
26
+ disablePointerDismissal?: boolean;
27
+ };
28
+
29
+ type DialogPrimitiveRootProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
30
+ type DialogPrimitivePortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
31
+ type DialogPrimitiveOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
32
+ type DialogPrimitiveContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
33
+ type CommandDialogProps = Omit<CommandRootProps, 'ref'> & Pick<DialogPrimitiveRootProps, 'open' | 'onOpenChange' | 'onClickOutside'> & {
34
+ container?: DialogPrimitivePortalProps['container'];
35
+ overlayClassName?: string;
36
+ contentClassName?: string;
37
+ forceMount?: boolean;
38
+ contentProps?: Omit<DialogPrimitiveContentProps, 'children' | 'className'>;
39
+ overlayProps?: Omit<DialogPrimitiveOverlayProps, 'className'>;
40
+ };
41
+ declare const CommandDialog: React.ForwardRefExoticComponent<Omit<CommandRootProps, "ref"> & Pick<Omit<DialogPrimitiveRootProps$1 & React.RefAttributes<HTMLDivElement>, "ref">, "open" | "onOpenChange" | "onClickOutside"> & {
42
+ container?: DialogPrimitivePortalProps["container"];
43
+ overlayClassName?: string;
44
+ contentClassName?: string;
45
+ forceMount?: boolean;
46
+ contentProps?: Omit<DialogPrimitiveContentProps, "children" | "className">;
47
+ overlayProps?: Omit<DialogPrimitiveOverlayProps, "className">;
48
+ } & React.RefAttributes<HTMLDivElement>>;
49
+
50
+ type CommandInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> & {
51
+ value?: string;
52
+ onValueChange?: (value: string) => void;
53
+ };
54
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange"> & {
55
+ value?: string;
56
+ onValueChange?: (value: string) => void;
57
+ } & React.RefAttributes<HTMLElement>>;
58
+
59
+ type CommandListProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
60
+ declare const CommandList: React.ForwardRefExoticComponent<CommandListProps & React.RefAttributes<HTMLElement>>;
61
+
62
+ type CommandItemProps = React.HTMLAttributes<HTMLDivElement> & {
63
+ value?: string;
64
+ keywords?: string[];
65
+ onSelect?: (value: string) => void;
66
+ disabled?: boolean;
67
+ forceMount?: boolean;
68
+ };
69
+ declare const CommandItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
70
+ value?: string;
71
+ keywords?: string[];
72
+ onSelect?: (value: string) => void;
73
+ disabled?: boolean;
74
+ forceMount?: boolean;
75
+ } & React.RefAttributes<HTMLElement>>;
76
+
77
+ type CommandGroupProps = React.ComponentPropsWithoutRef<typeof Primitive.div> & {
78
+ heading?: React.ReactNode;
79
+ forceMount?: boolean;
80
+ };
81
+ declare const CommandGroup: React.ForwardRefExoticComponent<CommandGroupProps & React.RefAttributes<HTMLElement>>;
82
+
83
+ type CommandEmptyProps = React.ComponentPropsWithoutRef<typeof Primitive.div> & {
84
+ forceMount?: boolean;
85
+ };
86
+ declare const CommandEmpty: React.ForwardRefExoticComponent<CommandEmptyProps & React.RefAttributes<HTMLElement>>;
87
+
88
+ type CommandLoadingProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
89
+ declare const CommandLoading: React.ForwardRefExoticComponent<CommandLoadingProps & React.RefAttributes<HTMLElement>>;
90
+
91
+ type CommandSeparatorProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
92
+ declare const CommandSeparator: React.ForwardRefExoticComponent<CommandSeparatorProps & React.RefAttributes<HTMLElement>>;
93
+
94
+ type CommandShortcutProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
95
+ declare const CommandShortcut: React.ForwardRefExoticComponent<CommandShortcutProps & React.RefAttributes<HTMLElement>>;
96
+
97
+ type CommandComponent = typeof CommandRoot & {
98
+ Root: typeof CommandRoot;
99
+ Dialog: typeof CommandDialog;
100
+ Input: typeof CommandInput;
101
+ List: typeof CommandList;
102
+ Item: typeof CommandItem;
103
+ Group: typeof CommandGroup;
104
+ Empty: typeof CommandEmpty;
105
+ Loading: typeof CommandLoading;
106
+ Separator: typeof CommandSeparator;
107
+ Shortcut: typeof CommandShortcut;
108
+ };
109
+ declare const Command: CommandComponent;
110
+
111
+ export { Command as default };
112
+ export type { CommandDialogProps, CommandEmptyProps, CommandFilter, CommandGroupProps, CommandInputProps, CommandItemProps, CommandListProps, CommandLoadingProps, CommandRootProps, CommandSeparatorProps, CommandShortcutProps };
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"react";import{c as a}from"./clsx-BaVHROc5.js";import{P as r}from"./index-m6qHOeQ9.js";import{u as s}from"./index-wRElCyvx.js";import{u as n}from"./useComponentClass-QwNivz0h.js";import{D as l}from"./index-BbEsAodL.js";import{c as i}from"./mergeProps-B9ocQsG4.js";import"./ThemeContext-Sm-iNANd.js";import"./index-Db-tduwt.js";import"./floating-ui.react-Byzse64h.js";import"react-dom";import"./index-gM8bbyw1.js";const d=o.createContext(null),m=()=>{const e=o.useContext(d);if(!e)throw new Error("Command components must be used within Command.Root or Command.Dialog.");return e},c=(e,t,o)=>{const a=t.trim().toLowerCase();if(!a)return 1;return[e,...o].map((e=>e.toLowerCase())).some((e=>e.includes(a)))?1:0},u=o.forwardRef((({children:t,className:l,customRootClass:i="",value:m,defaultValue:u="",onValueChange:p,label:f="Command menu",shouldFilter:v=!0,filter:C=c,loop:g=!1,...h},b)=>{const y=n(i,"Command"),[I,N]=s(m,u,p),[k,w]=o.useState([]),[x,M]=o.useState([]),[S,R]=o.useState(null),D=o.useRef(0),$=o.useId(),j=o.useId(),E=o.useCallback((e=>{N(e.trimStart())}),[N]),V=o.useCallback((e=>{const t=D.current++;return w((o=>{const a=o.filter((t=>t.id!==e.id));return a.push({...e,order:t}),a.sort(((e,t)=>e.order-t.order)),a})),()=>{w((t=>t.filter((t=>t.id!==e.id))))}}),[]),A=o.useCallback(((e,t)=>{w((o=>o.map((o=>o.id===e?{...o,...t}:o))))}),[]),P=o.useCallback((e=>{w((t=>t.filter((t=>t.id!==e))))}),[]),L=o.useCallback((e=>{const t=D.current++;return M((o=>{const a=o.filter((t=>t.id!==e));return a.push({id:e,order:t}),a.sort(((e,t)=>e.order-t.order)),a})),()=>{M((t=>t.filter((t=>t.id!==e))))}}),[]),O=I.trim(),G=o.useMemo((()=>k.map((e=>{const t=v&&O?C(e.value,O,e.keywords):1,o=e.forceMount||t>0;return{...e,score:t,visible:o}}))),[C,k,O,v]),T=o.useMemo((()=>G.filter((e=>e.visible&&!e.disabled))),[G]),B=o.useMemo((()=>T.map((e=>e.id))),[T]),K=o.useMemo((()=>G.reduce(((e,t)=>t.groupId&&t.visible?(e[t.groupId]=(e[t.groupId]||0)+1,e):e),{})),[G]);o.useEffect((()=>{0!==B.length?R((e=>e&&B.includes(e)?e:B[0])):R(null)}),[B]),o.useEffect((()=>{if(!S)return;const e=k.find((e=>e.id===S)),t=e?.ref.current;t&&"function"==typeof t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"nearest"})}),[S,k]);const F=o.useCallback((e=>{if(0===T.length)return;const t=S?T.findIndex((e=>e.id===S)):-1;let o=t+e;-1===t&&(o=1===e?0:T.length-1),g?(o<0&&(o=T.length-1),o>=T.length&&(o=0)):o=Math.max(0,Math.min(T.length-1,o)),R(T[o]?.id||null)}),[S,g,T]),H=o.useCallback((e=>{0!==T.length&&R("start"===e?T[0].id:T[T.length-1].id)}),[T]),U=o.useCallback((()=>{if(!S)return;const e=T.find((e=>e.id===S));e&&!e.disabled&&e.onSelect?.(e.value)}),[S,T]),q=o.useCallback((e=>{const t=G.find((t=>t.id===e)),o=Boolean(t?.visible),a=S===e;return{active:a,visible:o,selected:a}}),[S,G]),z=o.useCallback((e=>K[e]||0),[K]),J=o.useCallback((e=>{const t=x.find((t=>t.id===e));if(!t)return!1;const o=G.some((e=>e.visible&&e.order<t.order)),a=G.some((e=>e.visible&&e.order>t.order));return o&&a}),[G,x]),Q=o.useMemo((()=>({rootClass:y,label:f,listId:$,inputId:j,search:I,setSearch:E,loop:g,shouldFilter:v,registerItem:V,updateItem:A,unregisterItem:P,registerSeparator:L,activeItemId:S,setActiveItemId:R,moveActive:F,moveToBoundary:H,selectActiveItem:U,getItemState:q,visibleItemCount:G.filter((e=>e.visible)).length,getVisibleGroupItemCount:z,getSeparatorVisible:J})),[S,q,J,z,j,f,$,g,F,H,V,L,y,I,U,E,v,G,P,A]);return e(d.Provider,{value:Q,children:e(r.div,{ref:b,className:a(y,l),"data-slot":"command-root","data-value":O||void 0,...h,children:t})})}));u.displayName="Command";const p=o.forwardRef((({children:o,className:r,customRootClass:s="",open:i,onOpenChange:d,onClickOutside:m,container:c,overlayClassName:p,contentClassName:f,forceMount:v=!1,contentProps:C,overlayProps:g,...h},b)=>{const y=n(s,"Command");return e(l.Root,{open:i,onOpenChange:d,onClickOutside:m,children:t(l.Portal,{container:c,forceMount:v,children:[e(l.Overlay,{className:a(y&&`${y}-overlay`,p),"data-slot":"command-overlay",...g}),e(l.Content,{ref:b,className:a(y&&`${y}-dialog-content`,f),"data-slot":"command-dialog-content",...C,children:e(u,{customRootClass:s,className:r,...h,children:o})})]})})}));p.displayName="CommandDialog";const f=o.forwardRef((({className:t,value:o,onValueChange:s,onKeyDown:n,...l},i)=>{const{rootClass:d,label:c,listId:u,inputId:p,search:f,setSearch:v,moveActive:C,moveToBoundary:g,selectActiveItem:h}=m(),b=o??f;return e(r.input,{ref:i,type:"text",id:p,className:a(d&&`${d}-input`,t),"data-slot":"command-input",role:"combobox","aria-autocomplete":"list","aria-controls":u,"aria-expanded":"true","aria-label":c,value:b,onChange:e=>{const t=e.currentTarget.value;void 0===o&&v(t),s?.(t)},onKeyDown:e=>{"ArrowDown"===e.key&&(e.preventDefault(),C(1)),"ArrowUp"===e.key&&(e.preventDefault(),C(-1)),"Home"===e.key&&(e.preventDefault(),g("start")),"End"===e.key&&(e.preventDefault(),g("end")),"Enter"===e.key&&(e.preventDefault(),h()),n?.(e)},...l})}));f.displayName="CommandInput";const v=o.forwardRef((({className:t,...o},s)=>{const{rootClass:n,listId:l,label:i}=m();return e(r.div,{ref:s,id:l,className:a(n&&`${n}-list`,t),"data-slot":"command-list",role:"listbox","aria-label":i,...o})}));v.displayName="CommandList";const C=o.createContext(null),g=o.forwardRef((({children:t,className:s,value:n,keywords:l,onSelect:d,disabled:c=!1,forceMount:u=!1,onMouseMove:p,onClick:f,...v},g)=>{const{registerItem:b,setActiveItemId:y,getItemState:I,rootClass:N}=m(),k=o.useContext(C),w=o.useId(),x=o.useRef(null),M=o.useMemo((()=>l??[]),[l]),S=o.useMemo((()=>"string"==typeof n&&n.length>0?n:"string"==typeof t||"number"==typeof t?String(t):w),[t,w,n]);o.useEffect((()=>b({id:w,value:S,keywords:M,disabled:c,forceMount:u,groupId:k,ref:x,onSelect:d})),[c,u,k,S,w,M,d,b]);const{active:R,visible:D,selected:$}=I(w);return D||u?e(r.div,{ref:i(x,g),className:a(h(N),s),"data-slot":"command-item","data-disabled":c?"":void 0,"data-selected":$?"":void 0,"data-value":S,role:"option","aria-disabled":c||void 0,"aria-selected":$,tabIndex:c?-1:0,hidden:!D,onMouseMove:e=>{c||y(w),p?.(e)},onClick:e=>{c||(y(w),d?.(S)),f?.(e)},onKeyDown:e=>{c||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),d?.(S))},...v,children:t}):null})),h=e=>e?`${e}-item`:void 0;g.displayName="CommandItem";const b=o.forwardRef((({children:s,className:n,heading:l,forceMount:i=!1,...d},c)=>{const{rootClass:u,getVisibleGroupItemCount:p}=m(),f=o.useId(),v=o.useId(),g=p(f),h=i||g>0;return e(C.Provider,{value:f,children:t(r.div,{ref:c,className:a(u&&`${u}-group`,n),"data-slot":"command-group",role:"presentation",hidden:!h,...d,children:[l?e(r.div,{className:u?`${u}-group-heading`:void 0,"data-slot":"command-group-heading",id:v,children:l}):null,e(r.div,{className:u?`${u}-group-items`:void 0,"data-slot":"command-group-items",role:"group","aria-labelledby":l?v:void 0,children:s})]})})}));b.displayName="CommandGroup";const y=o.forwardRef((({className:t,forceMount:o=!1,...s},n)=>{const{rootClass:l,visibleItemCount:i}=m(),d=o||0===i;return d||o?e(r.div,{ref:n,className:a(l&&`${l}-empty`,t),"data-slot":"command-empty",role:"status",hidden:!d,...s}):null}));y.displayName="CommandEmpty";const I=o.forwardRef((({className:t,...o},s)=>{const{rootClass:n}=m();return e(r.div,{ref:s,className:a(n&&`${n}-loading`,t),"data-slot":"command-loading","aria-live":"polite","aria-busy":"true",...o})}));I.displayName="CommandLoading";const N=o.forwardRef((({className:t,...s},n)=>{const{rootClass:l,registerSeparator:i,getSeparatorVisible:d}=m(),c=o.useId();o.useEffect((()=>i(c)),[i,c]);return d(c)?e(r.div,{ref:n,className:a(l&&`${l}-separator`,t),"data-slot":"command-separator",role:"separator",...s}):null}));N.displayName="CommandSeparator";const k=o.forwardRef((({className:t,...o},s)=>{const{rootClass:n}=m();return e(r.span,{ref:s,className:a(n&&`${n}-shortcut`,t),"data-slot":"command-shortcut",...o})}));k.displayName="CommandShortcut";const w=u;w.Root=u,w.Dialog=p,w.Input=f,w.List=v,w.Item=g,w.Group=b,w.Empty=y,w.Loading=I,w.Separator=N,w.Shortcut=k;export{w as default};
@@ -7,11 +7,15 @@ type ContextMenuRootProps = {
7
7
  children: React.ReactNode;
8
8
  customRootClass?: string;
9
9
  className?: string;
10
+ variant?: string;
11
+ size?: string;
10
12
  } & ComponentPropsWithoutRef<typeof MenuPrimitive.Root>;
11
13
  declare const ContextMenuRoot: React.ForwardRefExoticComponent<{
12
14
  children: React.ReactNode;
13
15
  customRootClass?: string;
14
16
  className?: string;
17
+ variant?: string;
18
+ size?: string;
15
19
  } & Omit<{
16
20
  children: React.ReactNode;
17
21
  className?: string;
@@ -20,6 +24,8 @@ declare const ContextMenuRoot: React.ForwardRefExoticComponent<{
20
24
  defaultOpen?: boolean;
21
25
  crossAxisOffset?: number;
22
26
  mainAxisOffset?: number;
27
+ collisionBoundary?: Element | null | Array<Element | null>;
28
+ collisionPadding?: number;
23
29
  loop?: boolean;
24
30
  placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
25
31
  avoidCollision?: boolean;
@@ -49,10 +55,18 @@ type MenuPrimitiveContentProps = {
49
55
  type ContextMenuContentProps = {
50
56
  children: React.ReactNode;
51
57
  className?: string;
58
+ /** Visual style variant of the content panel */
59
+ variant?: 'default' | 'soft' | 'outline';
60
+ /** Size of the content panel */
61
+ size?: 'small' | 'medium' | 'large';
52
62
  } & ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
53
63
  declare const ContextMenuContent: React.ForwardRefExoticComponent<{
54
64
  children: React.ReactNode;
55
65
  className?: string;
66
+ /** Visual style variant of the content panel */
67
+ variant?: "default" | "soft" | "outline";
68
+ /** Size of the content panel */
69
+ size?: "small" | "medium" | "large";
56
70
  } & Omit<MenuPrimitiveContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
57
71
 
58
72
  type ContextMenuPortalProps = {
@@ -105,6 +119,8 @@ declare const ContextMenuSub: React.ForwardRefExoticComponent<{
105
119
  defaultOpen?: boolean;
106
120
  crossAxisOffset?: number;
107
121
  mainAxisOffset?: number;
122
+ collisionBoundary?: Element | null | Array<Element | null>;
123
+ collisionPadding?: number;
108
124
  loop?: boolean;
109
125
  placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
110
126
  avoidCollision?: boolean;