@radui/ui 0.5.0 → 0.6.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 (104) hide show
  1. package/README.md +2 -0
  2. package/dist/components/Accordion.d.ts +19 -33
  3. package/dist/components/Accordion.js +1 -1
  4. package/dist/components/AlertDialog.d.ts +2 -0
  5. package/dist/components/AlertDialog.js +1 -1
  6. package/dist/components/AspectRatio.d.ts +2 -2
  7. package/dist/components/AspectRatio.js +1 -1
  8. package/dist/components/Avatar.js +1 -1
  9. package/dist/components/AvatarGroup.js +1 -1
  10. package/dist/components/{AvatarPrimitiveFallback-BOYawMc9.js → AvatarPrimitiveFallback-B1u295x6.js} +1 -1
  11. package/dist/components/Breadcrumb.d.ts +70 -0
  12. package/dist/components/Breadcrumb.js +1 -0
  13. package/dist/components/Button.js +1 -1
  14. package/dist/components/Callout.js +1 -1
  15. package/dist/components/Checkbox.js +1 -1
  16. package/dist/components/CheckboxCards.js +1 -1
  17. package/dist/components/CheckboxGroup.js +1 -1
  18. package/dist/components/{CheckboxGroupPrimitive-Cd8ra39e.js → CheckboxGroupPrimitive-BWGRST9p.js} +1 -1
  19. package/dist/components/Code.js +1 -1
  20. package/dist/components/Collapsible.js +1 -1
  21. package/dist/components/Combobox.js +1 -1
  22. package/dist/components/ComboboxPrimitive-C2sksm48.js +1 -0
  23. package/dist/components/Command.d.ts +1 -0
  24. package/dist/components/Command.js +1 -1
  25. package/dist/components/ContextMenu.d.ts +6 -6
  26. package/dist/components/ContextMenu.js +1 -1
  27. package/dist/components/Dialog.d.ts +1 -0
  28. package/dist/components/Dialog.js +1 -1
  29. package/dist/components/Disclosure.d.ts +2 -0
  30. package/dist/components/Disclosure.js +1 -1
  31. package/dist/components/Drawer.d.ts +94 -16
  32. package/dist/components/Drawer.js +1 -1
  33. package/dist/components/DropdownMenu.d.ts +6 -6
  34. package/dist/components/DropdownMenu.js +1 -1
  35. package/dist/components/Fieldset.d.ts +43 -0
  36. package/dist/components/Fieldset.js +1 -0
  37. package/dist/components/HoverCard.js +1 -1
  38. package/dist/components/Link.js +1 -1
  39. package/dist/components/LiveRegion.d.ts +73 -0
  40. package/dist/components/LiveRegion.js +1 -0
  41. package/dist/components/MenuPrimitive-COEgTo6S.js +1 -0
  42. package/dist/components/Menubar.d.ts +6 -6
  43. package/dist/components/Menubar.js +1 -1
  44. package/dist/components/Minimap.js +1 -1
  45. package/dist/components/NavigationMenu.d.ts +3 -0
  46. package/dist/components/NavigationMenu.js +1 -1
  47. package/dist/components/NumberField.js +1 -1
  48. package/dist/components/Popover.d.ts +68 -0
  49. package/dist/components/Popover.js +1 -0
  50. package/dist/components/Progress.js +1 -1
  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-CcvI-_wm.js → RadioGroupPrimitive-BWUU-0Qh.js} +1 -1
  56. package/dist/components/ScrollArea.d.ts +15 -3
  57. package/dist/components/ScrollArea.js +1 -1
  58. package/dist/components/Select.js +1 -1
  59. package/dist/components/Separator.js +1 -1
  60. package/dist/components/Slider.d.ts +1 -1
  61. package/dist/components/Slider.js +1 -1
  62. package/dist/components/Spinner.js +1 -1
  63. package/dist/components/Splitter.js +1 -1
  64. package/dist/components/Steps.js +1 -1
  65. package/dist/components/Switch.js +1 -1
  66. package/dist/components/TabNav.js +1 -1
  67. package/dist/components/Table.d.ts +65 -19
  68. package/dist/components/Table.js +1 -1
  69. package/dist/components/Tabs.d.ts +2 -0
  70. package/dist/components/Tabs.js +1 -1
  71. package/dist/components/TextArea.js +1 -1
  72. package/dist/components/TextField.js +1 -1
  73. package/dist/components/Toast.d.ts +322 -0
  74. package/dist/components/Toast.js +1 -0
  75. package/dist/components/Toggle.js +1 -1
  76. package/dist/components/ToggleGroup.js +1 -1
  77. package/dist/components/Toolbar.js +1 -1
  78. package/dist/components/Tooltip.js +1 -1
  79. package/dist/components/Tree.d.ts +1 -0
  80. package/dist/components/Tree.js +1 -1
  81. package/dist/components/VisuallyHidden.js +1 -1
  82. package/dist/components/documentOverlayOpen-coyGmcyL.js +1 -0
  83. package/dist/components/index-C09ZQH_q.js +1 -0
  84. package/dist/components/index-CD_nZA9X.js +1 -0
  85. package/dist/components/{index-gM8bbyw1.js → index-CfC8-kd8.js} +1 -1
  86. package/dist/components/index-UODM4mVT.js +1 -0
  87. package/dist/components/index-XF8itt-H.js +1 -0
  88. package/dist/components/index-YhJvxumL.js +1 -0
  89. package/dist/components/index-m8Mhi26u.js +1 -0
  90. package/dist/components/keyboard-BKF7hXqL.js +1 -0
  91. package/dist/components/mergeProps-0RucjqeH.js +1 -0
  92. package/dist/themes/baremetal.css +1 -0
  93. package/dist/themes/default.css +1 -0
  94. package/dist/themes/tailwind-presets/default.css +396 -0
  95. package/package.json +65 -23
  96. package/dist/components/ComboboxPrimitive-BhHSrtiY.js +0 -1
  97. package/dist/components/MenuPrimitive-wJbEC-gM.js +0 -1
  98. package/dist/components/index-BbEsAodL.js +0 -1
  99. package/dist/components/index-DOVR6Rd5.js +0 -1
  100. package/dist/components/index-DU_6Msfu.js +0 -1
  101. package/dist/components/index-Ir5FYyWW.js +0 -1
  102. package/dist/components/index-m6qHOeQ9.js +0 -1
  103. package/dist/components/mergeProps-B9ocQsG4.js +0 -1
  104. package/dist/themes/tailwind-presets/default.js +0 -1
package/README.md CHANGED
@@ -79,6 +79,8 @@ npm install
79
79
  npm run sb
80
80
  ```
81
81
 
82
+ If you create a fresh clone or `git worktree`, run `npm install` before committing so Husky regenerates the local hook helpers under `.husky/_/`.
83
+
82
84
  Run the docs app locally:
83
85
 
84
86
  ```bash
@@ -1,59 +1,45 @@
1
1
  import React from 'react';
2
2
 
3
- type AccordionRootProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
3
+ type AccordionItemValue = string;
4
+ type AccordionRootSharedProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
4
5
  customRootClass?: string;
5
- transitionDuration?: number;
6
- transitionTimingFunction?: string;
7
6
  orientation?: 'horizontal' | 'vertical';
8
7
  /** When true, every item is non-interactive (Radix Accordion.Root `disabled`). */
9
8
  disabled?: boolean;
10
9
  asChild?: boolean;
11
10
  loop?: boolean;
12
11
  disableTabIndexing?: boolean;
13
- /** @deprecated Prefer `type="multiple"`. */
12
+ /** @deprecated Prefer `type="multiple"` to match the Radix Accordion API. */
14
13
  openMultiple?: boolean;
15
- /** Radix-aligned mode: single allows one open section; multiple allows several. */
16
- type?: 'single' | 'multiple';
14
+ };
15
+ type AccordionRootSingleProps = {
16
+ type?: 'single';
17
17
  /**
18
18
  * When `type` is single (default), whether the open item can be closed by activating its trigger again.
19
19
  * Matches Radix: defaults to false (trigger does not collapse the only open item).
20
20
  */
21
21
  collapsible?: boolean;
22
- value?: (number | string)[];
23
- defaultValue?: (number | string)[];
24
- onValueChange?: (value: (number | string)[]) => void;
22
+ value?: AccordionItemValue;
23
+ defaultValue?: AccordionItemValue;
24
+ onValueChange?: (value: AccordionItemValue | undefined) => void;
25
25
  };
26
- declare const AccordionRoot: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & {
27
- customRootClass?: string;
28
- transitionDuration?: number;
29
- transitionTimingFunction?: string;
30
- orientation?: "horizontal" | "vertical";
31
- /** When true, every item is non-interactive (Radix Accordion.Root `disabled`). */
32
- disabled?: boolean;
33
- asChild?: boolean;
34
- loop?: boolean;
35
- disableTabIndexing?: boolean;
36
- /** @deprecated Prefer `type="multiple"`. */
37
- openMultiple?: boolean;
38
- /** Radix-aligned mode: single allows one open section; multiple allows several. */
39
- type?: "single" | "multiple";
40
- /**
41
- * When `type` is single (default), whether the open item can be closed by activating its trigger again.
42
- * Matches Radix: defaults to false (trigger does not collapse the only open item).
43
- */
26
+ type AccordionRootMultipleProps = {
27
+ type: 'multiple';
28
+ value?: AccordionItemValue[];
29
+ defaultValue?: AccordionItemValue[];
30
+ onValueChange?: (value: AccordionItemValue[]) => void;
44
31
  collapsible?: boolean;
45
- value?: (number | string)[];
46
- defaultValue?: (number | string)[];
47
- onValueChange?: (value: (number | string)[]) => void;
48
- } & React.RefAttributes<HTMLDivElement>>;
32
+ };
33
+ type AccordionRootProps = AccordionRootSharedProps & (AccordionRootSingleProps | AccordionRootMultipleProps);
34
+ declare const AccordionRoot: React.ForwardRefExoticComponent<AccordionRootProps & React.RefAttributes<HTMLDivElement>>;
49
35
 
50
36
  type AccordionItemProps = React.ComponentPropsWithoutRef<'div'> & {
51
- value?: number | string;
37
+ value: string;
52
38
  disabled?: boolean;
53
39
  asChild?: boolean;
54
40
  };
55
41
  declare const AccordionItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
56
- value?: number | string;
42
+ value: string;
57
43
  disabled?: boolean;
58
44
  asChild?: boolean;
59
45
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
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};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import a,{createContext as o,useRef as i,useId as t,useContext as r,useCallback as n,isValidElement as d,cloneElement as s}from"react";import{c as l}from"./clsx-BaVHROc5.js";import{u as c}from"./useComponentClass-QwNivz0h.js";import{u as m}from"./index-wRElCyvx.js";import{R as h}from"./index-m8Mhi26u.js";import{P as p}from"./index-XF8itt-H.js";import{C as u}from"./index-YhJvxumL.js";import{m as f}from"./mergeRefs-B8eZ_q-T.js";import{m as b,c as v,g as C}from"./mergeProps-0RucjqeH.js";import{B as g}from"./index-CfC8-kd8.js";import"./ThemeContext-Sm-iNANd.js";import"./keyboard-BKF7hXqL.js";const x=o({rootClass:"",activeItems:[],setActiveItems:()=>{},accordionRef:void 0,multiple:!1,collapsible:!1,disabled:!1,orientation:"vertical"}),I="Accordion",N=a.forwardRef(((a,o)=>{const{children:t,className:r="",orientation:n="vertical",disableTabIndexing:d=!0,asChild:s,customRootClass:u,disabled:f=!1,loop:b=!0,collapsible:v=!1,type:C,value:g,defaultValue:N,onValueChange:y,openMultiple:R=!1,dir:j,...A}=a,w=i(null),T=c(u,I),V=c(u,I,"root"),$="multiple"===C||R,P=!!$||v,M=g,H=N,O=void 0===M?void 0:Array.isArray(M)?M:[M],k=void 0===H?[]:Array.isArray(H)?H:[H],[B,D]=m(O,k,(e=>{y?.($?e:e[0])})),F="rtl"===j?"rtl":"ltr";return e(x.Provider,{value:{rootClass:T,activeItems:B,setActiveItems:D,accordionRef:w,multiple:$,collapsible:P,disabled:f,orientation:n},children:e(h.Root,{orientation:n,loop:b,disableTabIndexing:d,dir:F,children:e(h.Group,{children:e(p.div,{className:l(V,r),dir:j,"data-orientation":n,"data-slot":"accordion-root",ref:e=>{const a=e;w.current=a,"function"==typeof o?o(a):o&&(o.current=a)},asChild:s,...A,children:t})})})})}));N.displayName=I;const y=o({itemValue:"",disabled:!1,headerId:""}),R=a.forwardRef((({children:o,value:i,className:d="",disabled:s=!1,asChild:c=!1,...m},h)=>{const b=a.useRef(null),v=t(),C=i??v,g=t(),{rootClass:I,activeItems:N,setActiveItems:R,multiple:j,collapsible:A,disabled:w,orientation:T}=r(x),V=s||w,$=N.includes(C),P=n((e=>{V||R(j?a=>e?a.includes(C)?a:[...a,C]:a.filter((e=>e!==C)):e?[C]:e=>!A&&e.includes(C)&&1===e.length?e:[])}),[V,j,C,R,A]);return e(y.Provider,{value:{itemValue:C,disabled:V,headerId:g},children:e(u.Root,{open:$,onOpenChange:P,disabled:V,transitionDuration:200,transitionTimingFunction:"ease",asChild:!0,children:e(p.div,{ref:f(b,h),className:l(I&&`${I}-item`,d),"data-state":$?"open":"closed","data-disabled":V?"":void 0,"data-orientation":T,"data-slot":"accordion-item",asChild:c,...m,children:o})})})}));R.displayName="AccordionItem";const j=a.forwardRef((({children:a,className:o="",asChild:i=!1,...t},n)=>{const{rootClass:c,orientation:m}=r(x),h=l(c&&`${c}-header`,o);if(i&&d(a)){const e=a,o=b({className:h,"data-orientation":m,"data-slot":"accordion-header"},e.props);return s(e,{...o,ref:v(n,C(e))})}return e("h3",{ref:n,className:h,"data-orientation":m,"data-slot":"accordion-header",...t,children:a})}));j.displayName="AccordionHeader";const A=a.forwardRef((({children:a,className:o="",asChild:i=!1,id:t,...n},d)=>{const{rootClass:s,activeItems:c,orientation:m}=r(x),{itemValue:p,disabled:f,headerId:b}=r(y);return e(h.Item,{domId:t??b,children:e(u.Trigger,{disabled:f,asChild:!0,children:e(g,{className:l(s&&`${s}-trigger`,o),ref:d,"aria-disabled":f,"aria-expanded":c.includes(p),"data-orientation":m,"data-slot":"accordion-trigger",asChild:i,...n,children:a})})})}));A.displayName="AccordionTrigger";const w=a.forwardRef((({children:a,index:o,className:i="",forceMount:t,asChild:n=!1,style:d,...s},c)=>{const{rootClass:m,orientation:h}=r(x),{headerId:p}=r(y);return e(u.Content,{ref:c,asChild:n,forceMount:t,className:l(m&&`${m}-content`,i),role:"region","aria-labelledby":p,"data-orientation":h,"data-slot":"accordion-content",style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)","--rad-accordion-content-height":"var(--rad-collapsible-content-height)","--rad-accordion-content-width":"var(--rad-collapsible-content-width)",...d},...s,children:n?a:e("div",{className:m?`${m}-content-inner`:void 0,"data-slot":"accordion-content-inner",children:a})})}));w.displayName="AccordionContent";const T=Object.assign(N,{Root:N,Item:R,Header:j,Trigger:A,Content:w});export{T as default};
@@ -9,6 +9,7 @@ type DialogPrimitiveActionProps = {
9
9
  children: React__default.ReactNode;
10
10
  className?: string;
11
11
  asChild?: boolean;
12
+ onClick?: React__default.MouseEventHandler<HTMLButtonElement>;
12
13
  };
13
14
 
14
15
  type DialogPrimitiveCancelProps = {
@@ -26,6 +27,7 @@ type AlertDialogFooterProps = DialogPrimitiveFooterProps & {
26
27
  type DialogPrimitiveRootProps$1 = {
27
28
  children: React__default.ReactNode;
28
29
  open?: boolean;
30
+ defaultOpen?: boolean;
29
31
  onOpenChange?: (open: boolean) => void;
30
32
  onClickOutside?: () => void;
31
33
  className?: string;
@@ -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 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
+ '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-CD_nZA9X.js";import{F as m}from"./index-Db-tduwt.js";import{P as p}from"./index-XF8itt-H.js";import"./ThemeContext-Sm-iNANd.js";import"./index-UODM4mVT.js";import"./documentOverlayOpen-coyGmcyL.js";import"./index-CfC8-kd8.js";import"./floating-ui.react-Byzse64h.js";import"react-dom";import"./mergeProps-0RucjqeH.js";const h=s({rootClass:"",isOpen:!1,setIsOpen:()=>{},titleId:void 0,descriptionId:void 0,setTitleId:()=>{},setDescriptionId:()=>{}}),u="AlertDialog",C=r((({children:s,className:r="",customRootClass:o="",defaultOpen:a=!1,open:i,onOpenChange:m,...p},C)=>{const N=l(o,u),[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:C,className:n(N,r),children:s})})})}));C.displayName=u;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",u=a?"":void 0;return e(d.Trigger,{ref:l,className:n(c&&`${c}-trigger`,t),asChild:r,disabled:a,"data-state":p,"data-disabled":u,...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:u,setTitleId:C,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&&C(f),()=>{I.current===D.current&&C(void 0)})),[f,C]),e(p.h2,{ref:d,id:f,className:n(u&&`${u}-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:u,setDescriptionId:C,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&&C(f),()=>{I.current===D.current&&C(void 0)})),[f,C]),e(p.p,{ref:d,id:f,className:n(u&&`${u}-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=C,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};
@@ -2,11 +2,11 @@ import React, { ComponentPropsWithoutRef } from 'react';
2
2
 
3
3
  type AspectRatioProps = ComponentPropsWithoutRef<'div'> & {
4
4
  customRootClass?: string;
5
- ratio?: string;
5
+ ratio?: string | number;
6
6
  };
7
7
  declare const AspectRatio: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
8
  customRootClass?: string;
9
- ratio?: string;
9
+ ratio?: string | number;
10
10
  } & React.RefAttributes<HTMLDivElement>>;
11
11
 
12
12
  export { AspectRatio as default };
@@ -1 +1 @@
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
+ 'use client';import{jsx as t}from"react/jsx-runtime";import r from"react";import{u as e}from"./useComponentClass-QwNivz0h.js";import{c as s}from"./clsx-BaVHROc5.js";import"./ThemeContext-Sm-iNANd.js";const o="AspectRatio",m=t=>{const r=String(t).trim(),e=r.match(/^(\d+(?:\.\d+)?)\/(\d+(?:\.\d+)?)$/);if(e){const[,t,s]=e;return Number(t)>0&&Number(s)>0?r:"1"}const s=Number(r);return Number.isFinite(s)&&s>0?r:"1"},a=r.forwardRef((({children:r,customRootClass:a,className:i,ratio:c="1",style:n,...u},l)=>{const d=e(a,o);return t("div",{ref:l,style:{...n,aspectRatio:m(c)},className:s(d,i),...u,children:r})}));a.displayName=o;export{a 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-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
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as o}from"react";import{A as e,a as t,b as l}from"./AvatarPrimitiveFallback-B1u295x6.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-XF8itt-H.js";import"./mergeProps-0RucjqeH.js";import"./ThemeContext-Sm-iNANd.js";const f=s({size:"",variant:"",color:"",rootClass:""}),p="Avatar",v=r.forwardRef((({children:r,customRootClass:s="",className:o="",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(e,{ref:A,className:i(N,o),...b,...u,children:r})})}));v.displayName=p;const u=r.forwardRef((({src:r="",alt:s="",className:e,...l},c)=>{const{rootClass:m}=o(f),n=i(m&&`${m}-image`,e)||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="",...e},t)=>{const{rootClass:c}=o(f);return a(l,{ref:t,className:i(c&&`${c}-fallback`,s),...e,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{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
+ '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-B1u295x6.js";import"./ThemeContext-Sm-iNANd.js";import"./index-XF8itt-H.js";import"./mergeProps-0RucjqeH.js";const d=s({rootClass:"",size:"",variant:""}),u="AvatarGroup",v=r.forwardRef((({customRootClass:r="",size:s="",variant:t="",children:c,className:m="",...n},p)=>{const v=e(r,u),f=l("avatar",{variant:t,size:s}),A=i(f);return a(d.Provider,{value:{size:s,variant:t,rootClass:v},children:a("div",{ref:p,className:o(v,m),...A,...n,children:c})})}));v.displayName=u;const f=r.forwardRef((({color:r="",children:s,className:e,...l},n)=>{const{rootClass:p}=t(d),u=c(r),v=i(u);return a(m,{ref:n,className:o(p&&`${p}-item`,e),...v,...l,children:s})}));f.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 h=()=>(console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null);h.Root=v,h.Item=f,h.Avatar=A,h.Fallback=N;export{h 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-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
+ '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-XF8itt-H.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};
@@ -0,0 +1,70 @@
1
+ import React from 'react';
2
+
3
+ type RootElement = HTMLElement;
4
+ type ListElement = HTMLOListElement;
5
+ type ItemElement = HTMLLIElement;
6
+ type LinkElement = HTMLAnchorElement;
7
+ type PageElement = HTMLSpanElement;
8
+ type SeparatorElement = HTMLSpanElement;
9
+ type BreadcrumbRootProps = React.ComponentPropsWithoutRef<'nav'> & {
10
+ customRootClass?: string;
11
+ };
12
+ type BreadcrumbListProps = React.ComponentPropsWithoutRef<'ol'> & {
13
+ customRootClass?: string;
14
+ };
15
+ type BreadcrumbItemProps = React.ComponentPropsWithoutRef<'li'> & {
16
+ customRootClass?: string;
17
+ };
18
+ type BreadcrumbLinkProps = React.ComponentPropsWithoutRef<'a'> & {
19
+ customRootClass?: string;
20
+ asChild?: boolean;
21
+ };
22
+ type BreadcrumbPageProps = React.ComponentPropsWithoutRef<'span'> & {
23
+ customRootClass?: string;
24
+ };
25
+ type BreadcrumbSeparatorProps = React.ComponentPropsWithoutRef<'span'> & {
26
+ customRootClass?: string;
27
+ };
28
+ declare const BreadcrumbRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
29
+ customRootClass?: string;
30
+ } & React.RefAttributes<HTMLElement>>;
31
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & {
32
+ customRootClass?: string;
33
+ } & React.RefAttributes<HTMLOListElement>>;
34
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
35
+ customRootClass?: string;
36
+ } & React.RefAttributes<HTMLLIElement>>;
37
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
38
+ customRootClass?: string;
39
+ asChild?: boolean;
40
+ } & React.RefAttributes<HTMLAnchorElement>>;
41
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
42
+ customRootClass?: string;
43
+ } & React.RefAttributes<HTMLSpanElement>>;
44
+ declare const BreadcrumbSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
45
+ customRootClass?: string;
46
+ } & React.RefAttributes<HTMLSpanElement>>;
47
+ declare const Breadcrumb: {
48
+ Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
49
+ customRootClass?: string;
50
+ } & React.RefAttributes<HTMLElement>>;
51
+ List: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & {
52
+ customRootClass?: string;
53
+ } & React.RefAttributes<HTMLOListElement>>;
54
+ Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
55
+ customRootClass?: string;
56
+ } & React.RefAttributes<HTMLLIElement>>;
57
+ Link: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
58
+ customRootClass?: string;
59
+ asChild?: boolean;
60
+ } & React.RefAttributes<HTMLAnchorElement>>;
61
+ Page: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
62
+ customRootClass?: string;
63
+ } & React.RefAttributes<HTMLSpanElement>>;
64
+ Separator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
65
+ customRootClass?: string;
66
+ } & React.RefAttributes<HTMLSpanElement>>;
67
+ };
68
+
69
+ export { BreadcrumbItem as Item, BreadcrumbLink as Link, BreadcrumbList as List, BreadcrumbPage as Page, BreadcrumbRoot as Root, BreadcrumbSeparator as Separator, Breadcrumb as default };
70
+ export type { ItemElement as BreadcrumbItemElement, BreadcrumbItemProps, LinkElement as BreadcrumbLinkElement, BreadcrumbLinkProps, ListElement as BreadcrumbListElement, BreadcrumbListProps, PageElement as BreadcrumbPageElement, BreadcrumbPageProps, RootElement as BreadcrumbRootElement, BreadcrumbRootProps, SeparatorElement as BreadcrumbSeparatorElement, BreadcrumbSeparatorProps };
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r from"react";import{c as e}from"./clsx-BaVHROc5.js";import{u as s}from"./useComponentClass-QwNivz0h.js";import{P as o}from"./index-XF8itt-H.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-0RucjqeH.js";const t="Breadcrumb",c=r.forwardRef((({children:r,customRootClass:o="",className:c="","aria-label":m="Breadcrumb",...l},i)=>{const n=s(o,t,"root");return a("nav",{ref:i,"aria-label":m,className:e(n,c),...l,children:r})})),m=r.forwardRef((({children:r,customRootClass:o="",className:c="",...m},l)=>{const i=s(o,t,"list");return a("ol",{ref:l,className:e(i,c),...m,children:r})})),l=r.forwardRef((({children:r,customRootClass:o="",className:c="",...m},l)=>{const i=s(o,t,"item");return a("li",{ref:l,className:e(i,c),...m,children:r})})),i=r.forwardRef((({children:r,customRootClass:c="",className:m="",asChild:l=!1,...i},n)=>{const d=s(c,t,"link"),u=o.a;return a(u,{ref:n,asChild:l,className:e(d,m),...i,children:r})})),n=r.forwardRef((({children:r,customRootClass:o="",className:c="","aria-current":m="page",...l},i)=>{const n=s(o,t,"page");return a("span",{ref:i,"aria-current":m,className:e(n,c),...l,children:r})})),d=r.forwardRef((({children:r="/",customRootClass:o="",className:c="",...m},l)=>{const i=s(o,t,"separator");return a("span",{ref:l,"aria-hidden":"true",className:e(i,c),...m,children:r})}));c.displayName="Breadcrumb.Root",m.displayName="Breadcrumb.List",l.displayName="Breadcrumb.Item",i.displayName="Breadcrumb.Link",n.displayName="Breadcrumb.Page",d.displayName="Breadcrumb.Separator";const u={Root:c,List:m,Item:l,Link:i,Page:n,Separator:d};export{l as Item,i as Link,m as List,n as Page,c as Root,d as Separator,u as default};
@@ -1 +1 @@
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
+ '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-CfC8-kd8.js";import{c as a,a as i,b as m}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";import"./index-XF8itt-H.js";import"./mergeProps-0RucjqeH.js";const n="Button",p=t((({children:t,type:p="button",customRootClass:d="",className:l="",variant:c="",size:u="",color:f="",disabled:j=!1,onClick:x,...b},C)=>{const v=s(d,n,"root"),h=a("button",{variant:c,size:u}),y=m(f),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{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
+ '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-XF8itt-H.js";import{c as i,a as n,b as c}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-0RucjqeH.js";const m=o({rootClass:""}),d="Callout",u=e.forwardRef((({children:e,asChild:o=!1,className:t="",color:u="",variant:p="",intent:f="",size:C="",customRootClass:h="",...x},N)=>{const v=a(h,d),j=i("callout",{variant:"destructive"===p?"":p,intent:f||("destructive"===p?"destructive":""),size:C}),R=c(u),w=n(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 p=e.forwardRef((({children:e,className:o="",...a},i)=>{const{rootClass:n}=t(m);return s(l.span,{ref:i,className:r(n&&`${n}-icon`,o),...a,children:e})}));p.displayName="CalloutIcon";const f=e.forwardRef((({children:e,className:o="",...a},i)=>{const{rootClass:n}=t(m);return s(l.p,{ref:i,className:r(n&&`${n}-text`,o),...a,children:e})}));f.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=p,C.Text=f;export{C as default};
@@ -1 +1 @@
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
+ 'use client';import{jsx as e,jsxs as a}from"react/jsx-runtime";import i,{forwardRef as r,useRef as t,useEffect as s,useContext as o}from"react";import{B as d}from"./index-CfC8-kd8.js";import{c}from"./index-CXzybYmm.js";import{u as n}from"./index-wRElCyvx.js";import{u as l}from"./useComponentClass-QwNivz0h.js";import{c as m}from"./clsx-BaVHROc5.js";import{c as h,a as u,b as k}from"./index-eAZUMNef.js";import{C}from"./check-DujVUWP-.js";import"./index-XF8itt-H.js";import"./mergeProps-0RucjqeH.js";import"./ThemeContext-Sm-iNANd.js";const p=i.createContext({isChecked:!1,setIsChecked:()=>{},id:"",required:!1,disabled:!1}),x=r((({children:a,className:r="",onClick:t,...s},o)=>{const{isChecked:n,setIsChecked:l,id:m,required:h,disabled:u}=i.useContext(p),k="indeterminate"===n||null===n?"indeterminate":n?"checked":"unchecked",C="indeterminate"===n||null===n?"mixed":n;return e(d,{ref:o,...s,onClick:c(t,(()=>{l("indeterminate"===n||null===n||!n)})),role:"checkbox",id:m,"aria-checked":C,"aria-required":h,"data-checked":n,"data-state":k,disabled:u,"data-disabled":u?"":void 0,className:r,children:a})}));x.displayName="CheckboxPrimitiveTrigger";const b=r((({children:i,className:r="",checked:o,defaultChecked:d=!1,onCheckedChange:c,disabled:l,required:m,name:h,value:u,id:k,...C},b)=>{const[f,N]=n(o,d,c),v=t(null);s((()=>{v.current&&(v.current.indeterminate="indeterminate"===f||null===f)}),[f]);const j={isChecked:f,setIsChecked:N,id:k,required:m,disabled:l};return a(p.Provider,{value:j,children:[e(x,{ref:b,className:r,disabled:l,required:m,...C,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})]})}));b.displayName="CheckboxPrimitiveRoot";const f=i.createContext({rootClass:""}),N="Checkbox",v=r((({children:a,className:i="",customRootClass:r,color:t="",variant:s,size:o,...d},c)=>{const n=l(r,N),C=h("checkbox",{variant:s,size:o}),p=k(t),x=u(C,p,{"data-slot":"checkbox-root"});return e(f.Provider,{value:{rootClass:n},children:e(b,{ref:c,className:m(n,i),...d,...x,children:a})})}));v.displayName=N;const j=r((({children:a,className:r="",...t},s)=>{const{isChecked:o,disabled:d}=i.useContext(p);return!0!==o?null:e("span",{ref:s,...t,className:r,"data-state":"checked","data-disabled":d?"":void 0,children:a})}));j.displayName="CheckboxPrimitiveIndicator";const y=r((({children:i,className:r="",...t},s)=>{const{rootClass:d}=o(f);return a(j,{ref:s,...t,"data-slot":"checkbox-indicator",children:[e(C,{width:15,height:15,className:m(d&&`${d}-indicator`,r)}),i]})}));y.displayName="CheckboxIndicator";const g=()=>(console.warn("Direct usage of Checkbox is not supported. Please use Checkbox.Root, Checkbox.Indicator instead."),null);g.Root=v,g.Indicator=y;export{g 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-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
+ 'use client';import{jsx as o}from"react/jsx-runtime";import e,{forwardRef as s,useContext as t}from"react";import{C as r}from"./CheckboxGroupPrimitive-BWGRST9p.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-m8Mhi26u.js";import"./index-XF8itt-H.js";import"./mergeProps-0RucjqeH.js";import"./index-CfC8-kd8.js";import"./keyboard-BKF7hXqL.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";const d=e.createContext({rootClass:""}),C="CheckboxCards",p=s((({children:e,customRootClass:s="",className:t="",color:l="",variant:p="",size:h="",orientation:x="both",...u},f)=>{const j=a(s,C),b=n("checkbox-cards",{variant:p,size:h}),k=m(l),N=c(b,k);return o(d.Provider,{value:{rootClass:j},children:o(r.Root,{ref:f,className:i(j&&`${j}-root`,j,t),...u,...N,orientation:x,children:e})})}));p.displayName=C;const h=s((({children:s,className:t="",value:a,...n},c)=>{const{rootClass:m}=e.useContext(d);return o(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}=e.useContext(d),m=i(c?`${c}-content`:void 0,t)||void 0;return o(r.Content,{ref:n,className:m,...a,children:s})}));x.displayName="CheckboxCardsContent";const u=s((({className:e,...s},r)=>{const{rootClass:a}=t(d);return o(l,{ref:r,width:15,height:15,className:i(a&&`${a}-tick-icon`,e),...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-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
+ 'use client';import{jsx as o}from"react/jsx-runtime";import e,{forwardRef as r,useContext as s}from"react";import{C as t}from"./CheckboxGroupPrimitive-BWGRST9p.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{c}from"./clsx-BaVHROc5.js";import{c as i,a as l,b as n}from"./index-eAZUMNef.js";import{P as m}from"./index-XF8itt-H.js";import{C as p}from"./check-DujVUWP-.js";import"./index-m8Mhi26u.js";import"./index-CfC8-kd8.js";import"./keyboard-BKF7hXqL.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-0RucjqeH.js";const d=e.createContext({rootClass:""}),u="CheckboxGroup",h=r((({children:e,customRootClass:r="",className:s="",color:m="",variant:p="",size:h="",...x},C)=>{const b=a(r,u),g=i("checkbox-group",{variant:p,size:h}),k=n(m),f=l(g,k,{"data-slot":"checkbox-group-root"});return o(d.Provider,{value:{rootClass:b},children:o(t.Root,{ref:C,className:c(b&&`${b}-root`,b,s),...x,...f,children:e})})}));h.displayName=u;const x=r((({children:r,className:s="",value:a,...i},l)=>{const{rootClass:n}=e.useContext(d);return o(t.Trigger,{ref:l,className:c(n&&`${n}-trigger`,s),value:a,"data-slot":"checkbox-group-trigger",...i,children:o(t.Content,{children:r})})}));x.displayName="CheckboxGroupTrigger";const C=r((({children:e,className:r="",...t},a)=>{const{rootClass:i}=s(d);return o(m.label,{ref:a,className:c(i&&`${i}-label`,r),"data-slot":"checkbox-group-label",...t,children:e})}));C.displayName="CheckboxGroupLabel";const b=r((({className:e,...r},t)=>{const{rootClass:a}=s(d);return o(p,{ref:t,width:15,height:15,className:c(a&&`${a}-tick-icon`,e),"data-slot":"checkbox-group-indicator",...r})}));b.displayName="CheckboxGroupIndicator";const g=()=>(console.warn("Direct usage of CheckboxGroup is not supported. Please use CheckboxGroup.Root, CheckboxGroup.Item instead."),null);g.Root=h,g.Trigger=x,g.Label=C,g.Indicator=b;export{g 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-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
+ '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-m8Mhi26u.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 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
+ '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 i="Code",c=o.forwardRef((({children:o,customRootClass:c="",color:n="",variant:l="",size:d="",className:f,...p},u)=>{const j=a(c,i),x=e(m("code",{variant:l,size:d}),t(n));return s("code",{ref:u,className:r(j,f),...x,...p,children:o})}));c.displayName=i;export{c 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 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};
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-YhJvxumL.js";import"./ThemeContext-Sm-iNANd.js";import"./index-XF8itt-H.js";import"./mergeProps-0RucjqeH.js";import"./index-wRElCyvx.js";import"./index-CfC8-kd8.js";import"./keyboard-BKF7hXqL.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:m,...c},d)=>{const p=a(m,"Collapsible");return e(i.Provider,{value:{rootClass:p},children:e(l.Root,{ref:d,className:o(p,r),transitionDuration:t,disabled:n,...c,children:s})})}));n.displayName="CollapsibleRoot";const m=s.forwardRef((({children:s,className:r,...a},n)=>{const{rootClass:m}=t(i),c=m?`${m}-trigger`:"";return e(l.Trigger,{ref:n,className:o(c,r),...a,children:s})}));m.displayName="CollapsibleTrigger";const c=s.forwardRef((({children:s,className:r="",...a},n)=>{const{rootClass:m}=t(i),c=m?`${m}-content`:"";return e(l.Content,{ref:n,className:o(c,r),...a,children:s})}));c.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=m,d.Content=c;export{d as default};
@@ -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-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};
1
+ 'use client';import o,{useContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{C as a}from"./ComboboxPrimitive-C2sksm48.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-XF8itt-H.js";import"./mergeProps-0RucjqeH.js";import"./keyboard-BKF7hXqL.js";import"./index-CXzybYmm.js";import"./index-wRElCyvx.js";import"./index-UODM4mVT.js";import"./documentOverlayOpen-coyGmcyL.js";import"./ThemeContext-Sm-iNANd.js";const d=o.createContext({rootClass:""}),n=o.forwardRef((({customRootClass:o,children:s,position:t="popper",...i},n)=>{const{rootClass:l}=e(d);return r(a.Content,{className:l?`${l}-content`:void 0,position:t,"data-position":t,ref:n,...i,children:s})}));n.displayName="ComboboxContent";const l=o.forwardRef((({customRootClass:o,children:s,value:t,disabled:i,...n},l)=>{const{rootClass:m}=e(d);return r(a.Item,{className:m?`${m}-item`:void 0,value:t,disabled:i,"data-disabled":i?"":void 0,role:"option","aria-disabled":i?"true":void 0,ref:l,...n,children:r("span",{className:m?`${m}-text`:void 0,children:s})})}));l.displayName="ComboboxItem";const m=o.forwardRef((({customRootClass:o,children:t,disabled:i,placeholder:n,className:l,...m},c)=>{const{rootClass:p}=e(d),f=s(p?`${p}-trigger`:void 0,l)||void 0;return r(a.Trigger,{className:f,"aria-disabled":i?"true":void 0,"data-placeholder":n?"":void 0,disabled:i,ref:c,...m,children:t})}));m.displayName="ComboboxTrigger";const c=o.forwardRef((({customRootClass:o,children:e,defaultValue:s,value:i,onValueChange:n,sideOffset:l=4,...m},c)=>{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:n,sideOffset:l,ref:c,...m,children:e})})}));c.displayName="ComboboxRoot";const p=o.forwardRef((({className:o,...a},t)=>{const{rootClass:n}=e(d),l=s(n?`${n}-item-indicator`:void 0,o)||void 0;return r("div",{className:l,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 u=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})}));u.displayName="ComboboxGroup";const C=o.forwardRef((({className:o,...t},i)=>{const{rootClass:n}=e(d),l=s(n?`${n}-search`:void 0,o)||void 0;return r(a.Search,{className:l,ref:i,...t})}));C.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=c,h.Content=n,h.Item=l,h.Trigger=m,h.Portal=f,h.Group=u,h.Indicator=p,h.Search=C;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-XF8itt-H.js";import{K as u}from"./keyboard-BKF7hXqL.js";import{c as f}from"./index-CXzybYmm.js";import{u as m}from"./index-wRElCyvx.js";import{u as p}from"./index-UODM4mVT.js";import{T as h}from"./ThemeContext-Sm-iNANd.js";const g=i({});const b=n.forwardRef((({children:r,className:n,style:i,...s},o)=>{const{isOpen:l,elementsRef:c,labelsRef:u,floatingContext:f,refs:m,middlewareData:p,placedPlacement:h,getFloatingProps:b,floatingStyles:v,isPositioned:R}=a(g),y=d.useMergeRefs([m.setFloating,o]),x="undefined"==typeof navigator||!/jsdom/i.test(navigator.userAgent),P=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"}}}(h);return e(t,{children:l&&e(d.FocusManager,{context:f,children:e(d.FloatingList,{elementsRef:c,labelsRef:u,children:e("div",{ref:y,...b({...s,className:n,style:{...v,...i,"--rad-ui-floating-transform-origin":P.transformOrigin,visibility:!R&&x||p.hide?.referenceHidden?"hidden":i?.visibility||v.visibility,pointerEvents:p.hide?.referenceHidden?"none":i?.pointerEvents},"data-state":l?"open":"closed","data-side":P.side,"data-align":P.align,"data-positioned":R?"":void 0}),children:r})})})})}));b.displayName="ComboboxPrimitiveContent";const v=i(null),R=n.forwardRef((({children:t,value:r,label:i,disabled:s,className:o,...l},f)=>{const m=a(g);if(!m)return console.error("ComboboxPrimitiveItem must be used within a ComboboxPrimitive"),null;const{handleSelect:p,isTypingRef:h,getItemProps:b,activeIndex:R,selectedIndex:y,selectedValue:x,virtualItemRef:P,selectedItemRef:C,hasSearch:I,search:S,hiddenIndices:w,disabledIndices:N,setDisabledIndices:M,labelsRef:A,displayLabelsRef:O,valuesRef:D,bumpLabelsVersion:E}=m,k=n.useRef(null),$=i||r,{ref:F,index:L}=d.useListItem({label:$}),j=w.includes(L),T=R===L,V=y===L||x===r,H=r||`select-item-${L}`,z=a(v);n.useEffect((()=>{if(z?.registerItem)return z.registerItem(H,!j)}),[z,H,j]),n.useEffect((()=>(D.current[L]=H,A.current[L]=$,O.current[L]=$,()=>{delete D.current[L],delete A.current[L],delete O.current[L]})),[O,L,H,$,A,D]),n.useEffect((()=>(E(),()=>{E()})),[L,$,r,E]),n.useEffect((()=>{const e=L;return M((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))})),()=>{M((t=>{if(!t.includes(e))return t;const r=new Set(t);return r.delete(e),Array.from(r).sort(((e,t)=>e-t))}))}}),[L,s,M]);const B=n.useCallback((e=>{V&&!I?C.current=e:C.current===e&&(C.current=null)}),[I,V,C]);return e(c.div,{ref:d.useMergeRefs([F,k,B,f]),id:H,role:"option",className:o,style:{display:j?"none":void 0,...l.style},"data-value":r,"data-label":$,"data-active":I?P.current?.id==H:T,"aria-selected":V,"aria-disabled":!!s||void 0,"data-disabled":s?"":void 0,...b({tabIndex:s?-1:T?0:-1,onClick:()=>!s&&p(L),onKeyDown:e=>{s||(e.key===u.ENTER&&(e.preventDefault(),p(L)),e.key!==u.SPACE||h.current||(e.preventDefault(),p(L)))}}),...l,tabIndex:s?-1:T?0:-1,children:t})}));R.displayName="ComboboxPrimitiveItem";const y=n.forwardRef((({children:t,className:r,disabled:n,asChild:i,onClick:s,renderValue:o,...l},u)=>{const{isOpen:m,selectedLabel:p,selectedValue:h,refs:b,getReferenceProps:v}=a(g),R=f(s),y=Boolean(p||h)?o?.(h,p||h):void 0;return e(c.button,{type:i?void 0:"button",className:r,"aria-expanded":m,"data-state":m?"open":"closed","aria-disabled":!!n||void 0,disabled:!!n||void 0,ref:d.useMergeRefs([b.setReference,u]),role:"combobox",asChild:i,...v({...l,onClick:R,disabled:n}),children:y??(p||h||t)})}));y.displayName="ComboboxPrimitiveTrigger";const x=n.forwardRef((({children:t,className:i,value:a,name:u,defaultValue:f="",onValueChange:h,onClickOutside:b=()=>{},align:v="start",alignOffset:R=0,avoidCollisions:y=!0,collisionBoundary:x=null,collisionPadding:P=8,constrainSize:C=!0,enableFlip:I=!0,enableShift:S=!0,hideWhenDetached:w=!1,matchReferenceWidth:N=!1,offsetValue:M,onPlaced:A,placement:O,positioningStrategy:D="fixed",side:E="bottom",sideOffset:k,sticky:$="partial",updatePositionStrategy:F="optimized",...L},j)=>{const[T,V]=n.useState(!1);p(T);const[H,z]=m(a,f,h),[B,K]=n.useState(f),W=n.useRef(null),G=n.useRef([]),U=n.useRef([]),q=n.useRef([]),J=n.useRef([]),Q=n.useRef({}),[X,Y]=n.useState([]),Z=n.useRef(!1),_=n.useRef(null),ee=n.useRef(null),[te,re]=n.useState(null),[ne,ie]=n.useState(null),[ae,se]=n.useState(!1),[oe,le]=n.useState(""),[de,ce]=n.useReducer((e=>e+1),0),ue=n.useMemo((()=>{if(!oe)return[];const e=[];for(let t=0;t<U.current.length;t++){const r=U.current[t];r&&!r.toLowerCase().includes(oe.toLowerCase())&&e.push(t)}return e}),[oe,de]),fe=n.useMemo((()=>{const e=new Set([...X,...ue]);return Array.from(e).sort(((e,t)=>e-t))}),[X,ue]),me=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}(_.current),pe=O??function(e,t){return"center"===t?e:`${e}-${t}`}(E,v),he=k??M??0,ge=n.useMemo((()=>Array.isArray(x)?x:[x]),[x]),be=n.useMemo((()=>{const e=ge.filter((e=>null!=e));return{padding:P,boundary:e,altBoundary:e.length>0}}),[ge,P]),ve=n.useMemo((()=>[d.offset({mainAxis:he,alignmentAxis:R}),y&&S&&d.shift({mainAxis:!0,crossAxis:!1,limiter:"partial"===$?d.limitShift():void 0,...be}),y&&I&&d.flip(be),C&&d.size({...be,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`),N?i.width=`${t.reference.width}px`:i.removeProperty("width")}}),w&&d.hide({strategy:"referenceHidden",...be})].filter(Boolean)),[R,y,C,be,I,S,w,he,N,$]),{refs:Re,floatingStyles:ye,context:xe,isPositioned:Pe,middlewareData:Ce,update:Ie,placement:Se}=d.useFloating({middleware:ve,open:T,onOpenChange:V,placement:pe,strategy:D,whileElementsMounted:(e,t,r)=>d.autoUpdate(e,t,r,{animationFrame:"always"===F})});l((()=>{Pe&&A?.()}),[Pe,A]);const we=d.useClick(xe),Ne=d.useDismiss(xe),Me=d.useRole(xe,{role:"listbox"});const Ae=n.useCallback((e=>{if(null!==e&&!fe.includes(e)&&(ie(e),V(!1),Re.reference.current?.focus(),null!==e)){const t=G.current[e],r=t?.getAttribute("data-value")||J.current[e],n=t?.getAttribute("data-label")||q.current[e]||U.current[e];r&&(z(r),n&&(Q.current[r]=n)),n&&K(n)}}),[fe,Re,z]);l((()=>{const e=J.current.findIndex((e=>e===H));if(-1===e)return ie(null),void K(Q.current[H]||H);ie(e);const t=G.current[e]?.getAttribute("data-label")||q.current[e]||U.current[e]||H;Q.current[H]=t,K(t)}),[de,H]);const Oe=d.useListNavigation(xe,{listRef:G,activeIndex:te,selectedIndex:ne,onNavigate:re,virtual:ae,virtualItemRef:ee,disabledIndices:fe}),De=d.useTypeahead(xe,{listRef:U,activeIndex:te,selectedIndex:ne,enabled:!ae,onMatch:function(e){null===e||fe.includes(e)||(T?re(e):Ae(e))},onTypingChange(e){Z.current=e}}),{getReferenceProps:Ee,getFloatingProps:ke,getItemProps:$e}=d.useInteractions([we,Ne,Me,Oe,De]),Fe=n.useMemo((()=>({isOpen:T,setIsOpen:V,handleSelect:Ae,floatingContext:xe,refs:Re,isPositioned:Pe,updatePosition:Ie,middlewareData:Ce,placedPlacement:Se,getFloatingProps:ke,getReferenceProps:Ee,floatingStyles:ye,getItemProps:$e,activeIndex:te,selectedIndex:ne,elementsRef:G,labelsRef:U,displayLabelsRef:q,valuesRef:J,disabledIndices:X,setDisabledIndices:Y,setActiveIndex:re,selectedLabel:B,selectedValue:H,isTypingRef:Z,virtualItemRef:ee,hasSearch:ae,setHasSearch:se,search:oe,setSearch:le,hiddenIndices:ue,selectedItemRef:W,labelsVersion:de,bumpLabelsVersion:ce})),[T,Ae,xe,Re,Pe,Ie,Ce,Se,ke,Ee,ye,$e,te,ne,X,B,H,ae,oe,ue,de]);return e(g.Provider,{value:Fe,children:r(c.div,{...L,className:i,ref:d.useMergeRefs([_,j]),"data-state":T?"open":"closed",children:[t,me&&e("select",{name:u,value:H,hidden:!0,"aria-hidden":"true",tabIndex:-1,onChange:()=>{},children:e("option",{value:H,children:H})})]})})}));x.displayName="ComboboxPrimitiveRoot";const P=n.forwardRef((({children:t,container:r,...n},i)=>{const{isOpen:l}=a(g),c=a(h),[u,f]=s(!1),m=r??c?.portalRootRef.current??c?.containerRef.current??document.body;return o((()=>{m&&f(!0)}),[m]),l&&u?e(d.Portal,{root:m,...n,children:t}):null}));P.displayName="ComboboxPrimitivePortal";const C=n.forwardRef((({children:t,className:r,...i},a)=>{const[s,o]=n.useState(new Set),{search:l}=n.useContext(g),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(v.Provider,{value:f,children:e("div",{className:r,ref:a,...i,style:{display:u?"none":void 0,...i.style},children:t})})}));C.displayName="ComboboxPrimitiveGroup";const I=n.forwardRef((({className:t,...r},i)=>{const s=a(g),{refs:o,handleSelect:l,labelsRef:f,valuesRef:m,activeIndex:p,elementsRef:h,virtualItemRef:b,getReferenceProps:v,setHasSearch:R,search:y,setSearch:x,setActiveIndex:P}=s,C=n.useRef(null);n.useEffect((()=>(R(!0),P(0),()=>{R(!1),x("")})),[R,P,x]);return e(c.input,{type:"search",className:t,placeholder:"Search...",ref:d.useMergeRefs([C,i]),"aria-activedescendant":b.current?.id||(null!==p&&m.current[p]?m.current[p]:void 0),...v({...r,value:y,onChange:e=>x(e.target.value),onKeyDown:e=>{null!==p&&e.key===u.ENTER&&(e.preventDefault(),l(p)),r.onKeyDown?.(e)}})})}));I.displayName="ComboboxPrimitiveSearch";const S=n.forwardRef(((e,t)=>(console.warn("Direct usage of Combobox is not supported. Please use Combobox.Root, Combobox.Content, etc. instead."),null)));S.displayName="ComboboxPrimitive";const w=S;w.Root=x,w.Content=b,w.Portal=P,w.Item=R,w.Trigger=y,w.Group=C,w.Search=I;export{w as C};
@@ -19,6 +19,7 @@ declare const CommandRoot: React.ForwardRefExoticComponent<CommandRootProps & Re
19
19
  type DialogPrimitiveRootProps$1 = {
20
20
  children: React.ReactNode;
21
21
  open?: boolean;
22
+ defaultOpen?: boolean;
22
23
  onOpenChange?: (open: boolean) => void;
23
24
  onClickOutside?: () => void;
24
25
  className?: string;
@@ -1 +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};
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-XF8itt-H.js";import{u as s}from"./index-wRElCyvx.js";import{u as n}from"./useComponentClass-QwNivz0h.js";import{D as l}from"./index-CD_nZA9X.js";import{K as i,i as d}from"./keyboard-BKF7hXqL.js";import{c as m}from"./mergeProps-0RucjqeH.js";import"./ThemeContext-Sm-iNANd.js";import"./index-Db-tduwt.js";import"./floating-ui.react-Byzse64h.js";import"react-dom";import"./index-UODM4mVT.js";import"./documentOverlayOpen-coyGmcyL.js";import"./index-CfC8-kd8.js";const c=o.createContext(null),u=()=>{const e=o.useContext(c);if(!e)throw new Error("Command components must be used within Command.Root or Command.Dialog.");return e},p=(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},f=o.forwardRef((({children:t,className:l,customRootClass:i="",value:d,defaultValue:m="",onValueChange:u,label:f="Command menu",shouldFilter:v=!0,filter:C=p,loop:g=!1,...h},b)=>{const y=n(i,"Command"),[I,N]=s(d,m,u),[k,w]=o.useState([]),[R,x]=o.useState([]),[M,S]=o.useState(null),D=o.useRef(0),j=o.useId(),$=o.useId(),E=o.useCallback((e=>{N(e.trimStart())}),[N]),O=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))))}}),[]),V=o.useCallback(((e,t)=>{w((o=>o.map((o=>o.id===e?{...o,...t}:o))))}),[]),A=o.useCallback((e=>{w((t=>t.filter((t=>t.id!==e))))}),[]),P=o.useCallback((e=>{const t=D.current++;return x((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})),()=>{x((t=>t.filter((t=>t.id!==e))))}}),[]),L=I.trim(),T=o.useMemo((()=>k.map((e=>{const t=v&&L?C(e.value,L,e.keywords):1,o=e.forceMount||t>0;return{...e,score:t,visible:o}}))),[C,k,L,v]),G=o.useMemo((()=>T.filter((e=>e.visible&&!e.disabled))),[T]),K=o.useMemo((()=>G.map((e=>e.id))),[G]),B=o.useMemo((()=>T.reduce(((e,t)=>t.groupId&&t.visible?(e[t.groupId]=(e[t.groupId]||0)+1,e):e),{})),[T]);o.useEffect((()=>{0!==K.length?S((e=>e&&K.includes(e)?e:K[0])):S(null)}),[K]),o.useEffect((()=>{if(!M)return;const e=k.find((e=>e.id===M)),t=e?.ref.current;t&&"function"==typeof t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"nearest"})}),[M,k]);const W=o.useCallback((e=>{if(0===G.length)return;const t=M?G.findIndex((e=>e.id===M)):-1;let o=t+e;-1===t&&(o=1===e?0:G.length-1),g?(o<0&&(o=G.length-1),o>=G.length&&(o=0)):o=Math.max(0,Math.min(G.length-1,o)),S(G[o]?.id||null)}),[M,g,G]),F=o.useCallback((e=>{0!==G.length&&S("start"===e?G[0].id:G[G.length-1].id)}),[G]),_=o.useCallback((()=>{if(!M)return;const e=G.find((e=>e.id===M));e&&!e.disabled&&e.onSelect?.(e.value)}),[M,G]),H=o.useCallback((e=>{const t=T.find((t=>t.id===e)),o=Boolean(t?.visible),a=M===e;return{active:a,visible:o,selected:a}}),[M,T]),U=o.useCallback((e=>B[e]||0),[B]),q=o.useCallback((e=>{const t=R.find((t=>t.id===e));if(!t)return!1;const o=T.some((e=>e.visible&&e.order<t.order)),a=T.some((e=>e.visible&&e.order>t.order));return o&&a}),[T,R]),z=o.useMemo((()=>({rootClass:y,label:f,listId:j,inputId:$,search:I,setSearch:E,loop:g,shouldFilter:v,registerItem:O,updateItem:V,unregisterItem:A,registerSeparator:P,activeItemId:M,setActiveItemId:S,moveActive:W,moveToBoundary:F,selectActiveItem:_,getItemState:H,visibleItemCount:T.filter((e=>e.visible)).length,getVisibleGroupItemCount:U,getSeparatorVisible:q})),[M,H,q,U,$,f,j,g,W,F,O,P,y,I,_,E,v,T,A,V]);return e(c.Provider,{value:z,children:e(r.div,{ref:b,className:a(y,l),"data-slot":"command-root","data-value":L||void 0,...h,children:t})})}));f.displayName="Command";const v=o.forwardRef((({children:o,className:r,customRootClass:s="",open:i,onOpenChange:d,onClickOutside:m,container:c,overlayClassName:u,contentClassName:p,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`,u),"data-slot":"command-overlay",...g}),e(l.Content,{ref:b,className:a(y&&`${y}-dialog-content`,p),"data-slot":"command-dialog-content",...C,children:e(f,{customRootClass:s,className:r,...h,children:o})})]})})}));v.displayName="CommandDialog";const C=o.forwardRef((({className:t,value:o,onValueChange:s,onKeyDown:n,...l},d)=>{const{rootClass:m,label:c,listId:p,inputId:f,search:v,setSearch:C,moveActive:g,moveToBoundary:h,selectActiveItem:b}=u(),y=o??v;return e(r.input,{ref:d,type:"text",id:f,className:a(m&&`${m}-input`,t),"data-slot":"command-input",role:"combobox","aria-autocomplete":"list","aria-controls":p,"aria-expanded":"true","aria-label":c,value:y,onChange:e=>{const t=e.currentTarget.value;void 0===o&&C(t),s?.(t)},onKeyDown:e=>{e.key===i.ARROW_DOWN&&(e.preventDefault(),g(1)),e.key===i.ARROW_UP&&(e.preventDefault(),g(-1)),e.key===i.HOME&&(e.preventDefault(),h("start")),e.key===i.END&&(e.preventDefault(),h("end")),e.key===i.ENTER&&(e.preventDefault(),b()),n?.(e)},...l})}));C.displayName="CommandInput";const g=o.forwardRef((({className:t,...o},s)=>{const{rootClass:n,listId:l,label:i}=u();return e(r.div,{ref:s,id:l,className:a(n&&`${n}-list`,t),"data-slot":"command-list",role:"listbox","aria-label":i,...o})}));g.displayName="CommandList";const h=o.createContext(null),b=o.forwardRef((({children:t,className:s,value:n,keywords:l,onSelect:i,disabled:c=!1,forceMount:p=!1,onMouseMove:f,onClick:v,...C},g)=>{const{registerItem:b,setActiveItemId:I,getItemState:N,rootClass:k}=u(),w=o.useContext(h),R=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):R),[t,R,n]);o.useEffect((()=>b({id:R,value:S,keywords:M,disabled:c,forceMount:p,groupId:w,ref:x,onSelect:i})),[c,p,w,S,R,M,i,b]);const{active:D,visible:j,selected:$}=N(R);return j||p?e(r.div,{ref:m(x,g),className:a(y(k),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:!j,onMouseMove:e=>{c||I(R),f?.(e)},onClick:e=>{c||(I(R),i?.(S)),v?.(e)},onKeyDown:e=>{c||d(e.key)&&(e.preventDefault(),i?.(S))},...C,children:t}):null})),y=e=>e?`${e}-item`:void 0;b.displayName="CommandItem";const I=o.forwardRef((({children:s,className:n,heading:l,forceMount:i=!1,...d},m)=>{const{rootClass:c,getVisibleGroupItemCount:p}=u(),f=o.useId(),v=o.useId(),C=p(f),g=i||C>0;return e(h.Provider,{value:f,children:t(r.div,{ref:m,className:a(c&&`${c}-group`,n),"data-slot":"command-group",role:"presentation",hidden:!g,...d,children:[l?e(r.div,{className:c?`${c}-group-heading`:void 0,"data-slot":"command-group-heading",id:v,children:l}):null,e(r.div,{className:c?`${c}-group-items`:void 0,"data-slot":"command-group-items",role:"group","aria-labelledby":l?v:void 0,children:s})]})})}));I.displayName="CommandGroup";const N=o.forwardRef((({className:t,forceMount:o=!1,...s},n)=>{const{rootClass:l,visibleItemCount:i}=u(),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}));N.displayName="CommandEmpty";const k=o.forwardRef((({className:t,...o},s)=>{const{rootClass:n}=u();return e(r.div,{ref:s,className:a(n&&`${n}-loading`,t),"data-slot":"command-loading","aria-live":"polite","aria-busy":"true",...o})}));k.displayName="CommandLoading";const w=o.forwardRef((({className:t,...s},n)=>{const{rootClass:l,registerSeparator:i,getSeparatorVisible:d}=u(),m=o.useId();o.useEffect((()=>i(m)),[i,m]);return d(m)?e(r.div,{ref:n,className:a(l&&`${l}-separator`,t),"data-slot":"command-separator",role:"separator",...s}):null}));w.displayName="CommandSeparator";const R=o.forwardRef((({className:t,...o},s)=>{const{rootClass:n}=u();return e(r.span,{ref:s,className:a(n&&`${n}-shortcut`,t),"data-slot":"command-shortcut",...o})}));R.displayName="CommandShortcut";const x=f;x.Root=f,x.Dialog=v,x.Input=C,x.List=g,x.Item=b,x.Group=I,x.Empty=N,x.Loading=k,x.Separator=w,x.Shortcut=R;export{x as default};
@@ -47,11 +47,6 @@ declare const ContextMenuTrigger: React.ForwardRefExoticComponent<{
47
47
  className?: string;
48
48
  } & Omit<MenuPrimitiveTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
49
49
 
50
- type MenuPrimitiveContentProps = {
51
- children: React.ReactNode;
52
- className?: string;
53
- };
54
-
55
50
  type ContextMenuContentProps = {
56
51
  children: React.ReactNode;
57
52
  className?: string;
@@ -67,7 +62,12 @@ declare const ContextMenuContent: React.ForwardRefExoticComponent<{
67
62
  variant?: "default" | "soft" | "outline";
68
63
  /** Size of the content panel */
69
64
  size?: "small" | "medium" | "large";
70
- } & Omit<MenuPrimitiveContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
65
+ } & Omit<{
66
+ children: React.ReactNode;
67
+ className?: string;
68
+ initialFocus?: number;
69
+ focusManagerDisabled?: boolean;
70
+ } & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
71
71
 
72
72
  type ContextMenuPortalProps = {
73
73
  children: React.ReactNode;