@radui/ui 0.4.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 (130) 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 +7 -3
  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-KiY3slgV.js → AvatarPrimitiveFallback-B1u295x6.js} +1 -1
  11. package/dist/components/Badge.js +1 -1
  12. package/dist/components/BlockQuote.js +1 -1
  13. package/dist/components/Breadcrumb.d.ts +70 -0
  14. package/dist/components/Breadcrumb.js +1 -0
  15. package/dist/components/Button.js +1 -1
  16. package/dist/components/Callout.js +1 -1
  17. package/dist/components/Card.js +1 -1
  18. package/dist/components/Checkbox.js +1 -1
  19. package/dist/components/CheckboxCards.js +1 -1
  20. package/dist/components/CheckboxGroup.js +1 -1
  21. package/dist/components/{CheckboxGroupPrimitive-DgfnzMT9.js → CheckboxGroupPrimitive-BWGRST9p.js} +1 -1
  22. package/dist/components/Code.js +1 -1
  23. package/dist/components/Collapsible.js +1 -1
  24. package/dist/components/Combobox.d.ts +3 -1
  25. package/dist/components/Combobox.js +1 -1
  26. package/dist/components/ComboboxPrimitive-C2sksm48.js +1 -0
  27. package/dist/components/Command.d.ts +113 -0
  28. package/dist/components/Command.js +1 -0
  29. package/dist/components/ContextMenu.d.ts +14 -10
  30. package/dist/components/ContextMenu.js +1 -1
  31. package/dist/components/DataList.d.ts +7 -2
  32. package/dist/components/DataList.js +1 -1
  33. package/dist/components/Dialog.d.ts +6 -3
  34. package/dist/components/Dialog.js +1 -1
  35. package/dist/components/Disclosure.d.ts +2 -0
  36. package/dist/components/Disclosure.js +1 -1
  37. package/dist/components/Drawer.d.ts +231 -0
  38. package/dist/components/Drawer.js +1 -0
  39. package/dist/components/DropdownMenu.d.ts +10 -6
  40. package/dist/components/DropdownMenu.js +1 -1
  41. package/dist/components/Em.js +1 -1
  42. package/dist/components/Fieldset.d.ts +43 -0
  43. package/dist/components/Fieldset.js +1 -0
  44. package/dist/components/Heading.js +1 -1
  45. package/dist/components/HoverCard.d.ts +10 -2
  46. package/dist/components/HoverCard.js +1 -1
  47. package/dist/components/Kbd.js +1 -1
  48. package/dist/components/Link.js +1 -1
  49. package/dist/components/LiveRegion.d.ts +73 -0
  50. package/dist/components/LiveRegion.js +1 -0
  51. package/dist/components/MenuPrimitive-COEgTo6S.js +1 -0
  52. package/dist/components/Menubar.d.ts +10 -6
  53. package/dist/components/Menubar.js +1 -1
  54. package/dist/components/Minimap.js +1 -1
  55. package/dist/components/NavigationMenu.d.ts +3 -0
  56. package/dist/components/NavigationMenu.js +1 -1
  57. package/dist/components/NumberField.d.ts +2 -0
  58. package/dist/components/NumberField.js +1 -1
  59. package/dist/components/Popover.d.ts +68 -0
  60. package/dist/components/Popover.js +1 -0
  61. package/dist/components/Progress.js +1 -1
  62. package/dist/components/Quote.d.ts +2 -0
  63. package/dist/components/Quote.js +1 -1
  64. package/dist/components/Radio.js +1 -1
  65. package/dist/components/RadioCards.js +1 -1
  66. package/dist/components/RadioGroup.js +1 -1
  67. package/dist/components/{RadioGroupPrimitive-tlWBfWJ8.js → RadioGroupPrimitive-BWUU-0Qh.js} +1 -1
  68. package/dist/components/ScrollArea.d.ts +15 -3
  69. package/dist/components/ScrollArea.js +1 -1
  70. package/dist/components/Select.d.ts +3 -1
  71. package/dist/components/Select.js +1 -1
  72. package/dist/components/Separator.js +1 -1
  73. package/dist/components/Skeleton.js +1 -1
  74. package/dist/components/Slider.js +1 -1
  75. package/dist/components/Spinner.js +1 -1
  76. package/dist/components/Splitter.js +1 -1
  77. package/dist/components/Steps.js +1 -1
  78. package/dist/components/Strong.js +1 -1
  79. package/dist/components/Switch.js +1 -1
  80. package/dist/components/TabNav.js +1 -1
  81. package/dist/components/Table.d.ts +65 -19
  82. package/dist/components/Table.js +1 -1
  83. package/dist/components/Tabs.d.ts +2 -0
  84. package/dist/components/Tabs.js +1 -1
  85. package/dist/components/Text.js +1 -1
  86. package/dist/components/TextArea.js +1 -1
  87. package/dist/components/TextField.d.ts +41 -0
  88. package/dist/components/TextField.js +1 -0
  89. package/dist/components/Theme.d.ts +2 -0
  90. package/dist/components/Theme.js +1 -1
  91. package/dist/components/Toast.d.ts +322 -0
  92. package/dist/components/Toast.js +1 -0
  93. package/dist/components/Toggle.js +1 -1
  94. package/dist/components/ToggleGroup.js +1 -1
  95. package/dist/components/Toolbar.js +1 -1
  96. package/dist/components/Tooltip.d.ts +3 -0
  97. package/dist/components/Tooltip.js +1 -1
  98. package/dist/components/Tree.d.ts +1 -0
  99. package/dist/components/Tree.js +1 -1
  100. package/dist/components/VisuallyHidden.js +1 -1
  101. package/dist/components/documentOverlayOpen-coyGmcyL.js +1 -0
  102. package/dist/components/floating-ui.react-Byzse64h.js +5 -0
  103. package/dist/components/index-C09ZQH_q.js +1 -0
  104. package/dist/components/index-CD_nZA9X.js +1 -0
  105. package/dist/components/{index-BOy86lYu.js → index-CfC8-kd8.js} +1 -1
  106. package/dist/components/index-Db-tduwt.js +1 -0
  107. package/dist/components/index-UODM4mVT.js +1 -0
  108. package/dist/components/index-XF8itt-H.js +1 -0
  109. package/dist/components/index-YhJvxumL.js +1 -0
  110. package/dist/components/index-eAZUMNef.js +1 -0
  111. package/dist/components/index-m8Mhi26u.js +1 -0
  112. package/dist/components/keyboard-BKF7hXqL.js +1 -0
  113. package/dist/components/mergeProps-0RucjqeH.js +1 -0
  114. package/dist/components/useComponentClass-QwNivz0h.js +1 -0
  115. package/dist/themes/baremetal.css +1 -0
  116. package/dist/themes/default.css +1 -1
  117. package/dist/themes/tailwind-presets/default.css +396 -0
  118. package/package.json +76 -23
  119. package/dist/components/ComboboxPrimitive-D5wWLl2_.js +0 -1
  120. package/dist/components/MenuPrimitive-BvxwQFGM.js +0 -1
  121. package/dist/components/floating-ui.react-gB901AP2.js +0 -5
  122. package/dist/components/index-3dZuI04X.js +0 -1
  123. package/dist/components/index-6If6D2Zi.js +0 -1
  124. package/dist/components/index-98jQ1vTr.js +0 -1
  125. package/dist/components/index-BQ2Hbb_x.js +0 -1
  126. package/dist/components/index-BZVbVgqN.js +0 -1
  127. package/dist/components/index-BoRAvltW.js +0 -1
  128. package/dist/components/index-DTYJVF-V.js +0 -1
  129. package/dist/components/index-TYaYKM2M.js +0 -1
  130. 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 a,useRef as t,useId as n,useContext as o,useCallback as r,isValidElement as s,cloneElement as l}from"react";import{c as d}from"./clsx-BaVHROc5.js";import{c}from"./index-6If6D2Zi.js";import{u as m}from"./index-wRElCyvx.js";import{R as u}from"./index-TYaYKM2M.js";import{P as h,m as p,c as f}from"./index-98jQ1vTr.js";import{C as g}from"./index-DTYJVF-V.js";import{m as C}from"./mergeRefs-B8eZ_q-T.js";import{B as b}from"./index-BOy86lYu.js";const v=a({rootClass:"",activeItems:[],setActiveItems:()=>{},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1,collapsible:!1,disabled:!1,orientation:"vertical"}),I="Accordion",N=i.forwardRef((({children:i,orientation:a="vertical",disableTabIndexing:n=!1,asChild:o,transitionDuration:r=0,transitionTimingFunction:s="linear",customRootClass:l,disabled:p=!1,loop:f=!0,openMultiple:g=!1,type:C,collapsible:b=!1,value:N,defaultValue:R=[],onValueChange:x,dir:j,...T},y)=>{const A=t(null),M=c(l,I),$="multiple"===C||"single"!==C&&g,w=!!$||b,D=void 0!==N?$?N:N.length>0?[N[0]]:[]:void 0,F=$?R:R.length>0?[R[0]]:[],[V,P]=m(D,F,x),H="rtl"===j?"rtl":"ltr";return e(v.Provider,{value:{rootClass:M,activeItems:V,setActiveItems:P,accordionRef:A,transitionDuration:r,transitionTimingFunction:s,openMultiple:$,collapsible:w,disabled:p,orientation:a},children:e(u.Root,{orientation:a,loop:f,disableTabIndexing:n,dir:H,children:e(u.Group,{children:e(h.div,{className:d(`${M}-root`),dir:j,"data-orientation":a,ref:e=>{const i=e;A.current=i,"function"==typeof y?y(i):y&&(y.current=i)},asChild:o,...T,children:i})})})})}));N.displayName=I;const R=a({itemValue:"",disabled:!1,headerId:""}),x=i.forwardRef((({children:a,value:t,className:s="",disabled:l=!1,asChild:c=!1,...m},u)=>{const p=i.useRef(null),f=n(),b=t??f,I=n(),{rootClass:N,activeItems:x,setActiveItems:j,transitionDuration:T,transitionTimingFunction:y,openMultiple:A,collapsible:M,disabled:$,orientation:w}=o(v),D=l||$,F=x.includes(b),V=r((e=>{D||j(A?i=>e?i.includes(b)?i:[...i,b]:i.filter((e=>e!==b)):e?[b]:e=>!M&&e.includes(b)&&1===e.length?e:[])}),[D,A,b,j,M]);return e(R.Provider,{value:{itemValue:b,disabled:D,headerId:I},children:e(g.Root,{open:F,onOpenChange:V,disabled:D,transitionDuration:T,transitionTimingFunction:y,asChild:!0,children:e(h.div,{ref:C(p,u),className:d(`${N}-item`,s),"data-state":F?"open":"closed","data-disabled":D?"":void 0,"data-orientation":w,asChild:c,...m,children:a})})})}));x.displayName="AccordionItem";const j=i.forwardRef((({children:i,className:a="",asChild:t=!1,...n},r)=>{const{rootClass:c,orientation:m}=o(v),u=d(`${c}-header`,a);if(t&&s(i)){const e=i,a=p({className:u,"data-orientation":m},e.props);return l(e,{...a,ref:f(r,e.ref)})}return e("h3",{ref:r,className:u,"data-orientation":m,...n,children:i})}));j.displayName="AccordionHeader";const T=i.forwardRef((({children:i,className:a="",asChild:t=!1,id:n,...r},s)=>{const{rootClass:l,activeItems:c,orientation:m}=o(v),{itemValue:h,disabled:p,headerId:f}=o(R);return e(u.Item,{domId:n??f,children:e(g.Trigger,{disabled:p,asChild:!0,children:e(b,{className:d(`${l}-trigger`,a),ref:s,"aria-disabled":p,"aria-expanded":c.includes(h),"data-orientation":m,asChild:t,...r,children:i})})})}));T.displayName="AccordionTrigger";const y=i.forwardRef((({children:i,index:a,className:t="",forceMount:n,asChild:r=!1,...s},l)=>{const{rootClass:c,orientation:m}=o(v),{headerId:u}=o(R);return e(g.Content,{ref:l,asChild:r,forceMount:n,className:d(`${c}-content`,t),role:"region","aria-labelledby":u,"data-orientation":m,...s,children:r?i:e("div",{className:`${c}-content-inner`,children:i})})}));y.displayName="AccordionContent";const A=Object.assign(N,{Root:N,Item:x,Header:j,Trigger:T,Content:y});export{A as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import 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};
@@ -2,18 +2,21 @@ import * as React$1 from 'react';
2
2
  import React__default from 'react';
3
3
  import DialogPrimitive from '~/core/primitives/Dialog';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import * as _floating_ui_react from '@floating-ui/react';
5
6
  import Primitive from '~/core/primitives/Primitive';
6
7
 
7
8
  type DialogPrimitiveActionProps = {
8
9
  children: React__default.ReactNode;
9
10
  className?: string;
10
11
  asChild?: boolean;
12
+ onClick?: React__default.MouseEventHandler<HTMLButtonElement>;
11
13
  };
12
14
 
13
15
  type DialogPrimitiveCancelProps = {
14
16
  children: React__default.ReactNode;
15
17
  asChild?: boolean;
16
18
  className?: string;
19
+ onClick?: React__default.MouseEventHandler<HTMLButtonElement>;
17
20
  };
18
21
 
19
22
  type DialogPrimitiveFooterProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Footer>;
@@ -24,9 +27,12 @@ type AlertDialogFooterProps = DialogPrimitiveFooterProps & {
24
27
  type DialogPrimitiveRootProps$1 = {
25
28
  children: React__default.ReactNode;
26
29
  open?: boolean;
30
+ defaultOpen?: boolean;
27
31
  onOpenChange?: (open: boolean) => void;
28
32
  onClickOutside?: () => void;
29
33
  className?: string;
34
+ /** When true, outside pointer events and escape key will not close the dialog. */
35
+ disablePointerDismissal?: boolean;
30
36
  };
31
37
 
32
38
  type DialogPrimitiveRootProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
@@ -84,11 +90,9 @@ declare const AlertDialog: {
84
90
  className?: string;
85
91
  disabled?: boolean;
86
92
  } & React$1.RefAttributes<HTMLButtonElement>>;
87
- Overlay: React$1.ForwardRefExoticComponent<Omit<{
88
- className?: string;
93
+ Overlay: React$1.ForwardRefExoticComponent<Omit<Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & _floating_ui_react.FloatingOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
89
94
  asChild?: boolean;
90
95
  forceMount?: boolean;
91
- children?: React.ReactNode;
92
96
  } & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
93
97
  className?: string;
94
98
  asChild?: boolean;
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import{createContext as s,forwardRef as r,useState as t,useContext as a,useRef as o,useEffect as i}from"react";import{c as l}from"./index-6If6D2Zi.js";import{c as n}from"./clsx-BaVHROc5.js";import{u as c}from"./index-wRElCyvx.js";import{D as d}from"./index-BoRAvltW.js";import{F as m}from"./index-BQ2Hbb_x.js";import{P as p}from"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./ThemeContext-Sm-iNANd.js";import"./floating-ui.react-gB901AP2.js";import"react-dom";const h=s({rootClass:"",isOpen:!1,setIsOpen:()=>{},titleId:void 0,descriptionId:void 0,setTitleId:()=>{},setDescriptionId:()=>{}}),C="AlertDialog",u=r((({children:s,className:r="",customRootClass:a="",defaultOpen:o=!1,open:i,onOpenChange:m,...p},u)=>{const N=l(a,C),[f,g]=c(i,o,m),[D,I]=t(void 0),[y,A]=t(void 0),v={rootClass:N,isOpen:f,setIsOpen:g,titleId:D,descriptionId:y,setTitleId:I,setDescriptionId:A};return e(d.Root,{open:f,onOpenChange:g,className:n(N,r),...p,children:e(h.Provider,{value:v,children:e("div",{ref:u,className:n(N,r),children:s})})})}));u.displayName=C;const N=r((({children:s,className:r="",asChild:t=!1,forceMount:o=!1,...i},l)=>{const{rootClass:c,titleId:m,descriptionId:p}=a(h);return e(d.Content,{ref:l,className:n(`${c}-content`,r),asChild:t,forceMount:o,role:"alertdialog","aria-modal":!0,"aria-labelledby":m,"aria-describedby":p,...i,children:s})}));N.displayName="AlertDialogContent";const f=r((({children:s,asChild:r,className:t="",disabled:o=!1,...i},l)=>{const{rootClass:c,isOpen:m}=a(h),p=m?"open":"closed",C=o?"":void 0;return e(d.Trigger,{ref:l,className:n(`${c}-trigger`,t),asChild:r,disabled:o,"data-state":p,"data-disabled":C,...i,children:s})}));f.displayName="AlertDialogTrigger";const g=({children:s,...r})=>e(d.Portal,{...r,children:s});g.displayName="AlertDialogPortal";const D=r((({className:s="",asChild:r=!1,forceMount:t=!1,children:o,...i},l)=>{const{rootClass:c}=a(h);return e(d.Overlay,{ref:l,className:n(`${c}-overlay`,s),asChild:r,forceMount:t,...i,children:o})}));D.displayName="AlertDialogOverlay";const I=r((({children:s,asChild:r,className:t="",...o},i)=>{const{rootClass:l}=a(h);return e(d.Cancel,{ref:i,className:`${l}-cancel ${t}`,asChild:r,...o,children:s})}));I.displayName="AlertDialogCancel";const y=r((({children:s,asChild:r,className:t="",...o},i)=>{const{rootClass:l}=a(h);return e(d.Action,{ref:i,className:`${l}-action ${t}`,asChild:r,...o,children:s})}));y.displayName="AlertDialogAction";const A=r((({children:s,className:r="",...t},o)=>{const{rootClass:i}=a(h);return e(d.Footer,{ref:o,className:n(`${i}-footer`,r),...t,children:s})}));A.displayName="AlertDialogFooter";const v=r((({children:s,className:r="",asChild:t=!1,id:l,...n},c)=>{const{rootClass:d,setTitleId:C,titleId:u}=a(h),N=m.useId(),f=l??N,g=o(f),D=o(u);return i((()=>{D.current=u}),[u]),i((()=>(g.current=f,f&&C(f),()=>{D.current===g.current&&C(void 0)})),[f,C]),e(p.h2,{ref:c,id:f,className:`${d}-title ${r}`,asChild:t,...n,children:s})}));v.displayName="AlertDialogTitle";const $=r((({children:s,className:r="",asChild:t=!1,id:l,...n},c)=>{const{rootClass:d,setDescriptionId:C,descriptionId:u}=a(h),N=m.useId(),f=l??N,g=o(f),D=o(u);return i((()=>{D.current=u}),[u]),i((()=>(g.current=f,f&&C(f),()=>{D.current===g.current&&C(void 0)})),[f,C]),e(p.p,{ref:c,id:f,className:`${d}-description ${r}`,asChild:t,...n,children:s})}));$.displayName="AlertDialogDescription";const O=()=>(console.warn("Direct usage of AlertDialog is not supported. Please use AlertDialog.Root, AlertDialog.Content, etc. instead."),null);O.Root=u,O.Trigger=f,O.Overlay=D,O.Portal=g,O.Content=N,O.Title=v,O.Description=$,O.Footer=A,O.Cancel=I,O.Action=y;export{O as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{createContext as s,forwardRef as r,useState as t,useContext as o,useRef as a,useEffect as i}from"react";import{u as l}from"./useComponentClass-QwNivz0h.js";import{c as n}from"./clsx-BaVHROc5.js";import{u as c}from"./index-wRElCyvx.js";import{D as d}from"./index-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 r}from"react/jsx-runtime";import s from"react";import{c as t}from"./index-6If6D2Zi.js";import{c as a}from"./clsx-BaVHROc5.js";const e="AspectRatio",o=s.forwardRef((({children:s,customRootClass:o,className:m,ratio:c="1",...i},d)=>{isNaN(Number(c))&&!c.match(/^(\d+)\/(\d+)$/)&&(c="1"),Number(c)<=0&&(c="1");const l=t(o,e);return r("div",{ref:d,style:{aspectRatio:c},className:a(l,m),...i,children:s})}));o.displayName=e;export{o as default};
1
+ 'use client';import{jsx as 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-KiY3slgV.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-6If6D2Zi.js";import{c as m,a as n,b as d}from"./index-3dZuI04X.js";import"./index-98jQ1vTr.js";const f=s({size:"",variant:"",color:"",rootClass:""}),v="Avatar",p=r.forwardRef((({children:r,customRootClass:s="",className:e="",size:t="",variant:l="",color:p="",...u},A)=>{const N=i(s,v),b=m("avatar",{variant:l,size:t}),j=d(p),x=n(b,j);return a(f.Provider,{value:{size:t,variant:l,color:p,rootClass:N},children:a(o,{ref:A,className:c(N,e),...x,...u,children:r})})}));p.displayName=v;const u=r.forwardRef((({src:r="",alt:s="",...o},l)=>{const{rootClass:i}=e(f);return a(t,{ref:l,className:c(`${i}-image`),src:r,alt:s,...o})}));u.displayName="AvatarImage";const A=r.forwardRef((({children:r,className:s="",...o},t)=>{const{rootClass:i}=e(f);return a(l,{ref:t,className:c(`${i}-fallback`,s),...o,children:r})}));A.displayName="AvatarFallback";const N=()=>(console.warn("Direct usage of Avatar is not supported. Please use Avatar.Root, Avatar.Image, Avatar.Fallback instead."),null);N.displayName="Avatar",N.Root=p,N.Image=u,N.Fallback=A;export{N as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as 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{c as e}from"./index-6If6D2Zi.js";import{c as l,a as i,b as c}from"./index-3dZuI04X.js";import{A as n,a as m,b as d}from"./AvatarPrimitiveFallback-KiY3slgV.js";import"./index-98jQ1vTr.js";const p=s({rootClass:"",size:"",variant:""}),v="AvatarGroup",f=r.forwardRef((({customRootClass:r="",size:s="",variant:t="",children:c,className:n="",...m},d)=>{const f=e(r,v),u=l("avatar",{variant:t,size:s}),A=i(u);return a(p.Provider,{value:{size:s,variant:t,rootClass:f},children:a("div",{ref:d,className:o(f,n),...A,...m,children:c})})}));f.displayName=v;const u=r.forwardRef((({color:r="",children:s,className:e,...l},m)=>{const{rootClass:d}=t(p),v=c(r),f=i(v);return a(n,{ref:m,className:o(`${d}-item`,e),...f,...l,children:s})}));u.displayName="AvatarGroupItem";const A=r.forwardRef((({src:r,alt:s,...t},o)=>a(m,{ref:o,src:r,alt:s,...t})));A.displayName="AvatarGroupAvatar";const N=r.forwardRef((({children:r,className:s,...e},l)=>{const{rootClass:i}=t(p);return a(d,{ref:l,className:o(`${i}-fallback`,s),...e,children:r})}));N.displayName="AvatarGroupFallback";const G=()=>(console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null);G.Root=f,G.Item=u,G.Avatar=A,G.Fallback=N;export{G as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as t}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{u as e}from"./useComponentClass-QwNivz0h.js";import{c as l,a as i,b as c}from"./index-eAZUMNef.js";import{A as m,a as n,b as p}from"./AvatarPrimitiveFallback-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-98jQ1vTr.js";const d=e({}),l=a.forwardRef((({children:e,asChild:o=!1,...n},l)=>{const[m,c]=i(!1),[h,p]=i(!1),f=s((()=>{if(!e)return!1;const r=e=>{if(a.isValidElement(e)){if("img"===e.type&&e.props?.src)return!0;if(e.props?.src)return!0;if(e.props?.children)return a.Children.toArray(e.props.children).some(r)}return!1};return a.Children.toArray(e).some(r)}),[e]),u={isImageLoaded:m,hasError:h,setHasError:p,handleLoadImage:()=>{c(!0),p(!1)},handleErrorImage:()=>{c(!1),p(!0)}};return r(d.Provider,{value:u,children:r(t.span,{ref:l,asChild:o,"data-rad-ui-has-image":f?"":void 0,...n,children:e})})}));l.displayName="AvatarPrimitiveRoot";const m=a.forwardRef((({src:a="",alt:e="",...i},s)=>{const{handleErrorImage:l,handleLoadImage:m,hasError:c}=o(d);return c?null:(n((()=>{a||l()}),[a,l,c]),r(t.img,{ref:s,src:a,alt:e,onError:l,onLoad:m,...i}))}));m.displayName="AvatarPrimitiveImage";const c=a.forwardRef((({children:a,asChild:e=!1,className:i="",...s},n)=>{const{isImageLoaded:l}=o(d);return l?null:r(t.span,{ref:n,asChild:e,className:i,...s,children:a})}));c.displayName="AvatarPrimitiveFallback";export{l as A,m as a,c as b};
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useState as i,useMemo as s,useContext as o,useEffect as n}from"react";import{P as t}from"./index-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};
@@ -1 +1 @@
1
- 'use client';import{jsx as a}from"react/jsx-runtime";import r from"react";import{c as s}from"./index-6If6D2Zi.js";import{c as e}from"./clsx-BaVHROc5.js";import{c as o,a as i,b as m}from"./index-3dZuI04X.js";const t="Badge",c=r.forwardRef((({children:r,customRootClass:c="",className:d="",color:l="",variant:n="solid",size:f="medium",...p},u)=>{const x=s(c,t),j=o("badge",{variant:n,size:f}),v=m(l),N=i(j,v);return a("div",{ref:u,className:e(x,d),...N,...p,children:r})}));c.displayName=t;export{c as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import a from"react";import{u as o}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import{c as e,a as t,b as m}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";const i="Badge",c=a.forwardRef((({children:a,customRootClass:c="",className:n="",color:d="",variant:l="solid",size:f="medium",...p},u)=>{const j=o(c,i,"root"),x=e("badge",{variant:l,size:f}),C=m(d),h=t(x,C);return s("div",{ref:u,className:r(j,n),...h,...p,children:a})}));c.displayName=i;export{c as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as o}from"react/jsx-runtime";import a from"react";import{c as r}from"./clsx-BaVHROc5.js";import{c as t}from"./index-6If6D2Zi.js";const e="BlockQuote",c=a.forwardRef((({children:a,customRootClass:c="",className:s="",color:i="",variant:l="",size:m="",...d},n)=>{const u=t(c,e),f={};return l&&(f["data-block-quote-variant"]=l),m&&(f["data-block-quote-size"]=m),i&&(f["data-rad-ui-accent-color"]=i),o("blockquote",{ref:n,className:r(u,s),...d,...f,children:a})}));c.displayName=e;export{c as default};
1
+ 'use client';import{jsx as o}from"react/jsx-runtime";import a from"react";import{c as t}from"./clsx-BaVHROc5.js";import{u as r}from"./useComponentClass-QwNivz0h.js";import"./ThemeContext-Sm-iNANd.js";const s="BlockQuote",e=a.forwardRef((({children:a,customRootClass:e="",className:m="",color:c="",variant:i="",size:l="",...n},d)=>{const f=r(e,s),p={};return i&&(p["data-variant"]=i),l&&(p["data-size"]=l),c&&(p["data-color"]=c),o("blockquote",{ref:d,className:t(f,m),...n,...p,children:a})}));e.displayName=s;export{e as default};
@@ -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 t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{c as a}from"./index-6If6D2Zi.js";import{c as s}from"./clsx-BaVHROc5.js";import{B as r}from"./index-BOy86lYu.js";import{c as e,a as i,b as n}from"./index-3dZuI04X.js";import"./index-98jQ1vTr.js";const m="Button",d=o((({children:o,type:d="button",customRootClass:c="",className:l="",variant:p="",size:f="",color:u="",disabled:x=!1,onClick:b,...j},v)=>{const y=a(c,m),C=e("button",{variant:p,size:f}),N=n(u),h=i(C,N);return t(r,{ref:v,type:d,disabled:x,"data-disabled":x?"":void 0,className:s(y,l),...h,onClick:t=>{if(x)return t.preventDefault(),void t.stopPropagation();b?.(t)},...j,children:o})}));d.displayName=m;export{d as default};
1
+ 'use client';import{jsx as o}from"react/jsx-runtime";import{forwardRef as t}from"react";import{u as s}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import{B as e}from"./index-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{c as a}from"./index-6If6D2Zi.js";import{c as r}from"./clsx-BaVHROc5.js";import{P as l}from"./index-98jQ1vTr.js";import{c,a as i,b as n}from"./index-3dZuI04X.js";const d=o({rootClass:""}),m="Callout",u=e.forwardRef((({children:e,asChild:o=!1,className:t="",color:u="",variant:f="",intent:p="",size:C="",customRootClass:h="",...x},N)=>{const v=a(h,m),R=c("callout",{variant:"destructive"===f?"":f,intent:p||("destructive"===f?"destructive":""),size:C}),j=n(u),w=i(R,j);return s(d.Provider,{value:{rootClass:v},children:s(l.div,{ref:N,asChild:o,className:r(v,t),...w,...x,children:e})})}));u.displayName=m;const f=e.forwardRef((({children:e,className:o="",...a},c)=>{const{rootClass:i}=t(d);return s(l.span,{ref:c,className:r(`${i}-icon`,o),...a,children:e})}));f.displayName="CalloutIcon";const p=e.forwardRef((({children:e,className:o="",...a},c)=>{const{rootClass:i}=t(d);return s(l.p,{ref:c,className:r(`${i}-text`,o),...a,children:e})}));p.displayName="CalloutText";const C=()=>(console.warn("Direct usage of Callout is not supported. Please use Callout.Root, Callout.Icon, etc. instead."),null);C.Root=u,C.Icon=f,C.Text=p;export{C as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import e,{createContext as o,useContext as t}from"react";import{u as a}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import{P as l}from"./index-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 r}from"react/jsx-runtime";import a,{createContext as e,useMemo as s,useContext as o}from"react";import{c as t}from"./index-6If6D2Zi.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-3dZuI04X.js";const l=e({rootClass:"rad-ui-card"}),n="Card",d=a.forwardRef((({children:a,customRootClass:e,className:o="",variant:d="",size:m="",...f},N)=>{const C=t(e,n),h=i("card",{variant:d,size:m}),p=s((()=>({rootClass:C})),[C]);return r(l.Provider,{value:p,children:r("div",{ref:N,className:c(C,o),...h,...f,children:a})})}));d.displayName=n;const m=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("div",{ref:t,className:c(`${i}-action`,e),...s,children:a})}));m.displayName="CardAction";const f=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("div",{ref:t,className:c(`${i}-content`,e),...s,children:a})}));f.displayName="CardContent";const N=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("p",{ref:t,className:c(`${i}-description`,e),...s,children:a})}));N.displayName="CardDescription";const C=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("div",{ref:t,className:c(`${i}-footer`,e),...s,children:a})}));C.displayName="CardFooter";const h=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("div",{ref:t,className:c(`${i}-header`,e),...s,children:a})}));h.displayName="CardHeader";const p=a.forwardRef((({children:a,className:e="",...s},t)=>{const{rootClass:i}=o(l);return r("h3",{ref:t,className:c(`${i}-title`,e),...s,children:a})}));p.displayName="CardTitle";const u=a.forwardRef((({children:a,className:e="",customRootClass:s,variant:o="",size:t="",...i},l)=>r(d,{ref:l,className:c(e),customRootClass:s,variant:o,size:t,...i,children:a})));u.displayName="Card",u.Root=d,u.Action=m,u.Content=f,u.Description=N,u.Footer=C,u.Header=h,u.Title=p;export{u as default};
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as s,useMemo as e,useContext as o}from"react";import{u as t}from"./useComponentClass-QwNivz0h.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";const n=s({rootClass:"rad-ui-card"}),l="Card",d=a.forwardRef((({children:a,customRootClass:s,className:o="",variant:d="",size:m="",...f},C)=>{const N=t(s,l),h=t(s,l,"root"),p=i("card",{variant:d,size:m}),u=e((()=>({rootClass:N})),[N]);return r(n.Provider,{value:u,children:r("div",{ref:C,className:c(h,o),...p,...f,children:a})})}));d.displayName=l;const m=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("div",{ref:t,className:c(i&&`${i}-action`,s),...e,children:a})}));m.displayName="CardAction";const f=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("div",{ref:t,className:c(i&&`${i}-content`,s),...e,children:a})}));f.displayName="CardContent";const C=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("p",{ref:t,className:c(i&&`${i}-description`,s),...e,children:a})}));C.displayName="CardDescription";const N=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("div",{ref:t,className:c(i&&`${i}-footer`,s),...e,children:a})}));N.displayName="CardFooter";const h=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("div",{ref:t,className:c(i&&`${i}-header`,s),...e,children:a})}));h.displayName="CardHeader";const p=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(n);return r("h3",{ref:t,className:c(i&&`${i}-title`,s),...e,children:a})}));p.displayName="CardTitle";const u=a.forwardRef((({children:a,className:s="",customRootClass:e,variant:o="",size:t="",...i},n)=>r(d,{ref:n,className:c(s),customRootClass:e,variant:o,size:t,...i,children:a})));u.displayName="Card",u.Root=d,u.Action=m,u.Content=f,u.Description=C,u.Footer=N,u.Header=h,u.Title=p;export{u as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import i,{forwardRef as a,useRef as s,useEffect as t,useContext as c}from"react";import{B as d}from"./index-BOy86lYu.js";import{u as n}from"./index-wRElCyvx.js";import{c as o}from"./index-6If6D2Zi.js";import{c as l}from"./clsx-BaVHROc5.js";import{c as m,a as h,b as u}from"./index-3dZuI04X.js";import{C as k}from"./check-DujVUWP-.js";import"./index-98jQ1vTr.js";const C=i.createContext({isChecked:!1,setIsChecked:()=>{},id:"",required:!1,disabled:!1}),x=a((({children:r,className:a="",...s},t)=>{const{isChecked:c,setIsChecked:n,id:o,required:l,disabled:m}=i.useContext(C);return e(d,{ref:t,onClick:()=>{n("indeterminate"===c||null===c||!c)},role:"checkbox",id:o,"aria-checked":"indeterminate"===c||null===c?"mixed":c,"aria-required":l,"data-checked":c,"data-state":"indeterminate"===c||null===c?"indeterminate":c?"checked":"unchecked",disabled:m,"data-disabled":m,className:a,...s,children:r})}));x.displayName="CheckboxPrimitiveTrigger";const p=a((({children:i,className:a="",checked:c,defaultChecked:d=!1,onCheckedChange:o,disabled:l,required:m,name:h,value:u,id:k,...p},b)=>{const[f,N]=n(c,d,o),v=s(null);t((()=>{v.current&&(v.current.indeterminate="indeterminate"===f||null===f)}),[f]);const y={isChecked:f,setIsChecked:N,id:k,required:m,disabled:l};return r(C.Provider,{value:y,children:[e(x,{ref:b,className:a,disabled:l,required:m,...p,children:i}),e("input",{ref:v,type:"checkbox",id:k,style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"},name:h,value:u,checked:!0===f,disabled:l,required:m,readOnly:!0})]})}));p.displayName="CheckboxPrimitiveRoot";const b=i.createContext({rootClass:""}),f="Checkbox",N=a((({children:r,className:i="",customRootClass:a,color:s="",variant:t,size:c,...d},n)=>{const k=o(a,f),C=m("checkbox",{variant:t,size:c}),x=u(s),N=h(C,x);return e(b.Provider,{value:{rootClass:k},children:e(p,{ref:n,className:l(k,i),...d,...N,children:r})})}));N.displayName=f;const v=a((({children:r,className:a="",...s},t)=>{const{isChecked:c}=i.useContext(C);return!0!==c?null:e("span",{ref:t,className:a,...s,children:r})}));v.displayName="CheckboxPrimitiveIndicator";const y=a((({children:i,className:a="",...s},t)=>{const{rootClass:d}=c(b);return r(v,{ref:t,...s,children:[e(k,{width:15,height:15,className:l(`${d}-indicator`,a)}),i]})}));y.displayName="CheckboxIndicator";const j=()=>(console.warn("Direct usage of Checkbox is not supported. Please use Checkbox.Root, Checkbox.Indicator instead."),null);j.Root=N,j.Indicator=y;export{j as default};
1
+ 'use client';import{jsx as e,jsxs as 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-DgfnzMT9.js";import{c as a}from"./index-6If6D2Zi.js";import{c as i}from"./clsx-BaVHROc5.js";import{c,a as n,b as m}from"./index-3dZuI04X.js";import{C as l}from"./check-DujVUWP-.js";import"./index-TYaYKM2M.js";import"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";const d=o.createContext({rootClass:""}),C="CheckboxCards",h=s((({children:o,customRootClass:s="",className:t="",color:l="",variant:h="",size:x="",orientation:p="both",...u},f)=>{const b=a(s,C),j=c("checkbox-cards",{variant:h,size:x}),k=m(l),N=n(j,k);return e(d.Provider,{value:{rootClass:b},children:e(r.Root,{ref:f,className:i(`${b}-root`,b,t),...u,...N,orientation:p,children:o})})}));h.displayName=C;const x=s((({children:s,className:t="",value:a,...c},n)=>{const{rootClass:m}=o.useContext(d);return e(r.Trigger,{ref:n,className:i(`${m}-item`,t),value:a,...c,children:s})}));x.displayName="CheckboxCardsItem";const p=s((({children:s,...t},a)=>{const{rootClass:i}=o.useContext(d);return e(r.Content,{ref:a,className:`${i}-content`,...t,children:s})}));p.displayName="CheckboxCardsContent";const u=s((({className:o,...s},r)=>{const{rootClass:a}=t(d);return e(l,{ref:r,width:15,height:15,className:i(`${a}-tick-icon`,o),...s})}));u.displayName="CheckboxCardsIndicator";const f=()=>(console.warn("Direct usage of CheckboxCards is not supported. Please use CheckboxCards.Root, CheckboxCards.Item instead."),null);f.Root=h,f.Content=p,f.Item=x,f.Indicator=u;export{f as default};
1
+ 'use client';import{jsx as 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-DgfnzMT9.js";import{c as a}from"./index-6If6D2Zi.js";import{c}from"./clsx-BaVHROc5.js";import{c as i,a as l,b as n}from"./index-3dZuI04X.js";import{P as m}from"./index-98jQ1vTr.js";import{C as p}from"./check-DujVUWP-.js";import"./index-TYaYKM2M.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";const d=o.createContext({rootClass:""}),u="CheckboxGroup",h=r((({children:o,customRootClass:r="",className:s="",color:m="",variant:p="",size:h="",...x},C)=>{const f=a(r,u),b=i("checkbox-group",{variant:p,size:h}),g=n(m),N=l(b,g);return e(d.Provider,{value:{rootClass:f},children:e(t.Root,{ref:C,className:c(`${f}-root`,f,s),...x,...N,children:o})})}));h.displayName=u;const x=r((({children:r,className:s="",value:a,...i},l)=>{const{rootClass:n}=o.useContext(d);return e(t.Trigger,{ref:l,className:c(`${n}-trigger`,s),value:a,...i,children:e(t.Content,{children:r})})}));x.displayName="CheckboxGroupTrigger";const C=r((({children:o,className:r="",...t},a)=>{const{rootClass:i}=s(d);return e(m.label,{ref:a,className:c(`${i}-label`,r),...t,children:o})}));C.displayName="CheckboxGroupLabel";const f=r((({className:o,...r},t)=>{const{rootClass:a}=s(d);return e(p,{ref:t,width:15,height:15,className:c(`${a}-tick-icon`,o),...r})}));f.displayName="CheckboxGroupIndicator";const b=()=>(console.warn("Direct usage of CheckboxGroup is not supported. Please use CheckboxGroup.Root, CheckboxGroup.Item instead."),null);b.Root=h,b.Trigger=x,b.Label=C,b.Indicator=f;export{b as default};
1
+ 'use client';import{jsx as 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-TYaYKM2M.js";import{u as o}from"./index-wRElCyvx.js";const t=i.createContext({checkedValues:[],setCheckedValues:()=>{},name:"",required:!1,disabled:!1}),c=a((({dir:r,orientation:i,loop:a,defaultValue:c=[],value:n,onValueChange:s,children:l,name:u,required:h,disabled:m,className:p="",...k},C)=>{const[b,x]=o(n,c,s);return e("div",{ref:C,className:p,...k,children:e(d.Root,{dir:r,orientation:i??"horizontal",loop:a??!0,children:e(t.Provider,{value:{checkedValues:b,setCheckedValues:x,name:u,required:h,disabled:m},children:e(d.Group,{children:l})})})})}));c.displayName="CheckboxGroupPrimitiveRoot";const n=i.createContext({isChecked:!1}),s=a((({children:a,className:o="",value:c,required:s,disabled:l,checked:u,onCheckedChange:h,onClick:m,...p},k)=>{const{checkedValues:C,setCheckedValues:b,name:x,required:v,disabled:f}=i.useContext(t),N=C.includes(c),g=s||v,y=l||f,{role:V,...q}=p;return r("div",{children:[e(n.Provider,{value:{isChecked:N},children:e(d.Item,{ref:k,onClick:e=>{m?.(e),e.preventDefault(),e.stopPropagation(),C.includes(c)?(b(C.filter((e=>e!==c))),h?.(!1)):C.includes(c)||(b([...C,c]),h?.(!0))},className:o,role:"checkbox","aria-checked":N,"aria-required":g,"aria-disabled":y||void 0,disabled:y,...q,"data-state":N?"checked":"unchecked",children:e("button",{type:"button",disabled:y,children:a})})}),e("input",{type:"checkbox",checked:N,name:x,value:c,style:{display:"none"},required:g,disabled:y,"aria-hidden":"true",readOnly:!0})]})}));s.displayName="CheckboxGroupPrimitiveTrigger";const l=a((({children:r,className:a,...d},o)=>{const{isChecked:t}=i.useContext(n);return e("span",{ref:o,className:a,...d,children:t?r:null})}));l.displayName="CheckboxGroupPrimitiveContent";const u=()=>(console.warn("Direct usage of CheckboxGroup is not supported. Please use CheckboxGroup.Root, CheckboxGroup.Item instead."),null);u.Root=c,u.Trigger=s,u.Content=l;export{u as C};
1
+ 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import i,{forwardRef as a}from"react";import{R as d}from"./index-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 r}from"react/jsx-runtime";import s from"react";import{c as a}from"./clsx-BaVHROc5.js";import{c as o}from"./index-6If6D2Zi.js";import{a as e,b as t,c}from"./index-3dZuI04X.js";const i="Code",m=s.forwardRef((({children:s,customRootClass:m="",color:d="",variant:n="",size:f="",className:l,...p},x)=>{const j=o(m,i),u=e(c("code",{variant:n,size:f}),t(d));return r("code",{ref:x,className:a(j,l),...u,...p,children:s})}));m.displayName=i;export{m as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import o from"react";import{c as r}from"./clsx-BaVHROc5.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{a as e,b as t,c as m}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";const 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 a}from"react";import{c as t}from"./index-6If6D2Zi.js";import{C as l}from"./index-DTYJVF-V.js";import"./index-98jQ1vTr.js";import"./index-wRElCyvx.js";import"./index-BOy86lYu.js";const i=r({rootClass:"",open:!1,onOpenChange:()=>{},disabled:!1,defaultOpen:!1}),n=s.forwardRef((({children:s,className:r="",transitionDuration:a=0,disabled:n,customRootClass:c,...d},m)=>{const p=t(c,"Collapsible");return e(i.Provider,{value:{rootClass:p},children:e(l.Root,{ref:m,className:o(p,r),transitionDuration:a,disabled:n,...d,children:s})})}));n.displayName="CollapsibleRoot";const c=s.forwardRef((({children:s,className:r,...t},n)=>{const{rootClass:c}=a(i),d=c?`${c}-trigger`:"";return e(l.Trigger,{ref:n,className:o(d,r),...t,children:s})}));c.displayName="CollapsibleTrigger";const d=s.forwardRef((({children:s,className:r="",...t},n)=>{const{rootClass:c}=a(i),d=c?`${c}-content`:"";return e(l.Content,{ref:n,className:o(d,r),...t,children:s})}));d.displayName="CollapsibleContent";const m=()=>(console.warn("Direct usage of Collapsible is not supported. Please use Collapsible.Root, Collapsible.Trigger, etc. instead."),null);m.Root=n,m.Trigger=c,m.Content=d;export{m as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{c as o}from"./clsx-BaVHROc5.js";import s,{createContext as r,useContext as t}from"react";import{u as a}from"./useComponentClass-QwNivz0h.js";import{C as l}from"./index-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};
@@ -10,6 +10,7 @@ declare const ComboboxContent: React.ForwardRefExoticComponent<Omit<ComboboxCont
10
10
  interface ComboboxPrimitiveItemProps {
11
11
  children: React.ReactNode;
12
12
  value: string;
13
+ label?: string;
13
14
  disabled?: boolean;
14
15
  className?: string;
15
16
  [key: string]: any;
@@ -30,9 +31,10 @@ declare const ComboboxItem: React.ForwardRefExoticComponent<(Omit<Omit<Omit<Comb
30
31
  }, "ref">) & React.RefAttributes<HTMLElement>>;
31
32
 
32
33
  type ComboboxPrimitiveTriggerProps = {
33
- children: React.ReactNode;
34
+ children?: React.ReactNode;
34
35
  className?: string;
35
36
  disabled?: boolean;
37
+ renderValue?: (value: string, label: string) => React.ReactNode;
36
38
  [key: string]: any;
37
39
  };
38
40
 
@@ -1 +1 @@
1
- 'use client';import o,{useContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{C as a}from"./ComboboxPrimitive-D5wWLl2_.js";import{c as t}from"./index-6If6D2Zi.js";import{C as s}from"./check-DujVUWP-.js";import"./index-BQ2Hbb_x.js";import"./floating-ui.react-gB901AP2.js";import"react-dom";import"./index-98jQ1vTr.js";import"./index-CXzybYmm.js";import"./index-wRElCyvx.js";const i=o.createContext({rootClass:""}),n=o.forwardRef((({customRootClass:o,children:t,position:s="popper",...n},l)=>{const{rootClass:d}=e(i);return r(a.Content,{className:`${d}-content`,position:s,"data-position":s,ref:l,...n,children:t})}));n.displayName="ComboboxContent";const l=o.forwardRef((({customRootClass:o,children:t,value:s,disabled:n,...l},d)=>{const{rootClass:c}=e(i);return r(a.Item,{className:`${c}-item`,value:s,disabled:n,"data-disabled":n?"":void 0,role:"option","aria-disabled":n?"true":void 0,ref:d,...l,children:r("span",{className:`${c}-text`,children:t})})}));l.displayName="ComboboxItem";const d=o.forwardRef((({customRootClass:o,children:t,disabled:s,placeholder:n,...l},d)=>{const{rootClass:c}=e(i);return r(a.Trigger,{className:`${c}-trigger`,"aria-disabled":s?"true":void 0,"data-placeholder":n?"":void 0,disabled:s,ref:d,...l,children:t})}));d.displayName="ComboboxTrigger";const c=o.forwardRef((({customRootClass:o,children:e,defaultValue:s,value:n,onValueChange:l,shift:d,...c},m)=>{const f=t(o,"Combobox");return r(i.Provider,{value:{rootClass:f},children:r(a.Root,{className:`${f}-root`,defaultValue:s,value:n,onValueChange:l,shift:d,ref:m,...c,children:e})})}));c.displayName="ComboboxRoot";const m=o.forwardRef(((o,a)=>{const{rootClass:t}=e(i);return r("div",{className:`${t}-item-indicator`,ref:a,...o,children:r(s,{width:16,height:16})})}));m.displayName="ComboboxIndicator";const f=o.forwardRef((({children:o,container:e,...t},s)=>r(a.Portal,{ref:s,container:e,...t,children:o})));f.displayName="ComboboxPortal";const p=o.forwardRef((({children:o,...t},s)=>{const{rootClass:n}=e(i);return r(a.Group,{className:`${n}-group`,ref:s,...t,children:o})}));p.displayName="ComboboxGroup";const b=o.forwardRef(((o,t)=>{const{rootClass:s}=e(i);return r(a.Search,{className:`${s}-search`,ref:t,...o})}));b.displayName="ComboboxSearch";const u=o.forwardRef(((o,e)=>(console.warn("Direct usage of Combobox is not supported. Please use Combobox.Root, Combobox.Content, etc. instead."),null)));u.displayName="Combobox";const C=u;C.Root=c,C.Content=n,C.Item=l,C.Trigger=d,C.Portal=f,C.Group=p,C.Indicator=m,C.Search=b;export{C as default};
1
+ 'use client';import o,{useContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{C as a}from"./ComboboxPrimitive-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};