@gv-tech/ui-web 2.9.1 → 2.12.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 (214) hide show
  1. package/dist/accordion.cjs.js +1 -0
  2. package/dist/accordion.d.ts +18 -0
  3. package/dist/accordion.es.js +259 -0
  4. package/dist/alert-dialog.cjs.js +7 -0
  5. package/dist/alert-dialog.d.ts +43 -0
  6. package/dist/alert-dialog.es.js +171 -0
  7. package/dist/alert.cjs.js +1 -0
  8. package/dist/alert.d.ts +18 -0
  9. package/dist/alert.es.js +32 -0
  10. package/dist/aspect-ratio.cjs.js +1 -0
  11. package/dist/aspect-ratio.d.ts +10 -0
  12. package/dist/aspect-ratio.es.js +43 -0
  13. package/dist/avatar.cjs.js +1 -0
  14. package/dist/avatar.d.ts +15 -0
  15. package/dist/avatar.es.js +205 -0
  16. package/dist/badge.cjs.js +1 -0
  17. package/dist/badge.d.ts +16 -0
  18. package/dist/badge.es.js +26 -0
  19. package/dist/breadcrumb.cjs.js +1 -0
  20. package/dist/breadcrumb.d.ts +35 -0
  21. package/dist/breadcrumb.es.js +69 -0
  22. package/dist/button.cjs.js +1 -0
  23. package/dist/button.d.ts +17 -0
  24. package/dist/button.es.js +40 -0
  25. package/dist/calendar.cjs.js +1 -0
  26. package/dist/calendar.d.ts +29 -0
  27. package/dist/calendar.es.js +2976 -0
  28. package/dist/card.cjs.js +1 -0
  29. package/dist/card.d.ts +19 -0
  30. package/dist/card.es.js +33 -0
  31. package/dist/carousel.cjs.js +1 -0
  32. package/dist/carousel.d.ts +50 -0
  33. package/dist/carousel.es.js +1403 -0
  34. package/dist/chart.cjs.js +16 -0
  35. package/dist/chart.d.ts +60 -0
  36. package/dist/chart.es.js +4402 -0
  37. package/dist/checkbox.cjs.js +1 -0
  38. package/dist/checkbox.d.ts +10 -0
  39. package/dist/checkbox.es.js +258 -0
  40. package/dist/collapsible.cjs.js +1 -0
  41. package/dist/collapsible.d.ts +20 -0
  42. package/dist/collapsible.es.js +7 -0
  43. package/dist/command.cjs.js +1 -0
  44. package/dist/command.d.ts +115 -0
  45. package/dist/command.es.js +396 -0
  46. package/dist/context-menu.cjs.js +1 -0
  47. package/dist/context-menu.d.ts +80 -0
  48. package/dist/context-menu.es.js +328 -0
  49. package/dist/dialog.cjs.js +1 -0
  50. package/dist/dialog.d.ts +31 -0
  51. package/dist/dialog.es.js +66 -0
  52. package/dist/drawer.cjs.js +3 -0
  53. package/dist/drawer.d.ts +65 -0
  54. package/dist/drawer.es.js +1085 -0
  55. package/dist/dropdown-menu.cjs.js +1 -0
  56. package/dist/dropdown-menu.d.ts +80 -0
  57. package/dist/dropdown-menu.es.js +316 -0
  58. package/dist/form.cjs.js +1 -0
  59. package/dist/form.d.ts +53 -0
  60. package/dist/form.es.js +355 -0
  61. package/dist/hover-card.cjs.js +1 -0
  62. package/dist/hover-card.d.ts +19 -0
  63. package/dist/hover-card.es.js +188 -0
  64. package/dist/index-0ioNhtNM.mjs +10 -0
  65. package/dist/index-3j-XAIXT.mjs +55 -0
  66. package/dist/index-B2XtpfGY.js +1 -0
  67. package/dist/index-B39Lzq0v.js +1 -0
  68. package/dist/index-B7n6fy75.js +1 -0
  69. package/dist/index-B8dxbSWX.js +41 -0
  70. package/dist/index-BGIK9FQF.js +1 -0
  71. package/dist/index-BZPx6jYI.mjs +8 -0
  72. package/dist/index-BoNjHhm4.js +1 -0
  73. package/dist/index-BtZvtDmp.js +1 -0
  74. package/dist/index-Bv7qrYW6.mjs +180 -0
  75. package/dist/index-ByiPJW53.js +5 -0
  76. package/dist/index-C0dlIQIi.js +1 -0
  77. package/dist/index-C1qb0595.mjs +27 -0
  78. package/dist/index-C7HEunrh.mjs +15 -0
  79. package/dist/index-C8ni3LLa.js +1 -0
  80. package/dist/index-CCKe-Mpx.mjs +6 -0
  81. package/dist/index-CD6_IrA-.mjs +10 -0
  82. package/dist/index-CRyCZJLa.mjs +677 -0
  83. package/dist/index-CVx1AgNG.mjs +615 -0
  84. package/dist/index-Ce5TOFAK.js +1 -0
  85. package/dist/index-CeSLNJ60.mjs +32 -0
  86. package/dist/index-CefEQe_4.js +1 -0
  87. package/dist/index-Cj5hzyBi.js +1 -0
  88. package/dist/index-Cjj_rUPu.js +1 -0
  89. package/dist/index-Cl3G0jzM.js +1 -0
  90. package/dist/index-CsjrqSSN.js +1 -0
  91. package/dist/index-CwfE56Ep.mjs +1545 -0
  92. package/dist/index-CwyAfCwY.js +1 -0
  93. package/dist/index-CzY-WZXL.js +1 -0
  94. package/dist/index-D2HnlO3y.js +1 -0
  95. package/dist/index-DAWHN3cH.mjs +85 -0
  96. package/dist/index-DFdF7K7v.mjs +50 -0
  97. package/dist/index-DIsg7zU7.js +1 -0
  98. package/dist/index-DKN_vhyX.mjs +32 -0
  99. package/dist/index-DLcqcWxM.mjs +29 -0
  100. package/dist/index-DSxf1gN6.mjs +118 -0
  101. package/dist/index-DYxWvftI.js +1 -0
  102. package/dist/index-DaILh3TV.mjs +32 -0
  103. package/dist/index-Dfzl8TxY.mjs +136 -0
  104. package/dist/index-Dko2XdTk.js +1 -0
  105. package/dist/index-DlY82G31.mjs +245 -0
  106. package/dist/index-DnFcfnA9.mjs +13 -0
  107. package/dist/index-IZ2gq03c.mjs +68 -0
  108. package/dist/index-K9FzbxYw.mjs +93 -0
  109. package/dist/index-Le8p9oP4.mjs +60 -0
  110. package/dist/index-MQ0c3ZX_.js +1 -0
  111. package/dist/index-_XxjJPRD.js +1 -0
  112. package/dist/index-_wdrnYim.js +1 -0
  113. package/dist/index-jv3B4mTd.js +1 -0
  114. package/dist/index-kaM0u2Q1.js +1 -0
  115. package/dist/index-p6xVFRb4.mjs +52 -0
  116. package/dist/index-rKs9bXHr.mjs +6 -0
  117. package/dist/index-vuPgkS0V.mjs +70 -0
  118. package/dist/index.cjs.js +1 -0
  119. package/dist/index.d.ts +1288 -0
  120. package/dist/index.es.js +289 -0
  121. package/dist/input.cjs.js +1 -0
  122. package/dist/input.d.ts +9 -0
  123. package/dist/input.es.js +19 -0
  124. package/dist/jsx-runtime-nZSsnGb7.js +6 -0
  125. package/dist/jsx-runtime-tc70JA_2.mjs +264 -0
  126. package/dist/label.cjs.js +1 -0
  127. package/dist/label.d.ts +11 -0
  128. package/dist/label.es.js +22 -0
  129. package/dist/menubar.cjs.js +1 -0
  130. package/dist/menubar.d.ts +79 -0
  131. package/dist/menubar.es.js +473 -0
  132. package/dist/navigation-menu.cjs.js +1 -0
  133. package/dist/navigation-menu.d.ts +47 -0
  134. package/dist/navigation-menu.es.js +673 -0
  135. package/dist/pagination.cjs.js +1 -0
  136. package/dist/pagination.d.ts +68 -0
  137. package/dist/pagination.es.js +68 -0
  138. package/dist/popover.cjs.js +1 -0
  139. package/dist/popover.d.ts +24 -0
  140. package/dist/popover.es.js +242 -0
  141. package/dist/progress.cjs.js +6 -0
  142. package/dist/progress.d.ts +9 -0
  143. package/dist/progress.es.js +99 -0
  144. package/dist/radio-group.cjs.js +1 -0
  145. package/dist/radio-group.d.ts +16 -0
  146. package/dist/radio-group.es.js +253 -0
  147. package/dist/resizable.cjs.js +1 -0
  148. package/dist/resizable.d.ts +22 -0
  149. package/dist/resizable.es.js +1990 -0
  150. package/dist/scroll-area.cjs.js +1 -0
  151. package/dist/scroll-area.d.ts +14 -0
  152. package/dist/scroll-area.es.js +546 -0
  153. package/dist/search.cjs.js +1 -0
  154. package/dist/search.d.ts +15 -0
  155. package/dist/search.es.js +51 -0
  156. package/dist/select.cjs.js +1 -0
  157. package/dist/select.d.ts +54 -0
  158. package/dist/select.es.js +908 -0
  159. package/dist/separator.cjs.js +1 -0
  160. package/dist/separator.d.ts +9 -0
  161. package/dist/separator.es.js +35 -0
  162. package/dist/sheet.cjs.js +1 -0
  163. package/dist/sheet.d.ts +68 -0
  164. package/dist/sheet.es.js +66 -0
  165. package/dist/skeleton.cjs.js +1 -0
  166. package/dist/skeleton.d.ts +9 -0
  167. package/dist/skeleton.es.js +8 -0
  168. package/dist/slider.cjs.js +1 -0
  169. package/dist/slider.d.ts +9 -0
  170. package/dist/slider.es.js +442 -0
  171. package/dist/sonner.cjs.js +1 -0
  172. package/dist/sonner.d.ts +10 -0
  173. package/dist/sonner.es.js +764 -0
  174. package/dist/switch.cjs.js +1 -0
  175. package/dist/switch.d.ts +9 -0
  176. package/dist/switch.es.js +149 -0
  177. package/dist/table.cjs.js +1 -0
  178. package/dist/table.d.ts +43 -0
  179. package/dist/table.es.js +57 -0
  180. package/dist/tabs.cjs.js +1 -0
  181. package/dist/tabs.d.ts +24 -0
  182. package/dist/tabs.es.js +195 -0
  183. package/dist/text.cjs.js +1 -0
  184. package/dist/text.d.ts +17 -0
  185. package/dist/text.es.js +42 -0
  186. package/dist/textarea.cjs.js +1 -0
  187. package/dist/textarea.d.ts +9 -0
  188. package/dist/textarea.es.js +18 -0
  189. package/dist/theme-provider.cjs.js +1 -0
  190. package/dist/theme-provider.d.ts +9 -0
  191. package/dist/theme-provider.es.js +8 -0
  192. package/dist/theme-toggle.cjs.js +1 -0
  193. package/dist/theme-toggle.d.ts +8 -0
  194. package/dist/theme-toggle.es.js +78 -0
  195. package/dist/toast.cjs.js +1 -0
  196. package/dist/toast.d.ts +26 -0
  197. package/dist/toast.es.js +494 -0
  198. package/dist/toaster-CIpfms4W.js +1 -0
  199. package/dist/toaster-jBYXAPRk.mjs +118 -0
  200. package/dist/toaster.cjs.js +1 -0
  201. package/dist/toaster.d.ts +6 -0
  202. package/dist/toaster.es.js +6 -0
  203. package/dist/toggle-group.cjs.js +1 -0
  204. package/dist/toggle-group.d.ts +18 -0
  205. package/dist/toggle-group.es.js +170 -0
  206. package/dist/toggle.cjs.js +1 -0
  207. package/dist/toggle.d.ts +14 -0
  208. package/dist/toggle.es.js +14 -0
  209. package/dist/tooltip.cjs.js +1 -0
  210. package/dist/tooltip.d.ts +25 -0
  211. package/dist/tooltip.es.js +342 -0
  212. package/dist/utils-B6yFEsav.mjs +8 -0
  213. package/dist/utils-IjLH3w2e.js +1 -0
  214. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-nZSsnGb7.js"),a=require("react"),te=require("./index-D2HnlO3y.js"),re=require("./index-BGIK9FQF.js"),ne=require("./index-_XxjJPRD.js"),y=require("./index-BtZvtDmp.js"),M=require("./index-Ce5TOFAK.js"),v=require("./index-C0dlIQIi.js"),ce=require("./index-CefEQe_4.js"),ie=require("./index-Dko2XdTk.js"),se=require("lucide-react"),S=require("./utils-IjLH3w2e.js");function ae(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>o[e]})}}return r.default=o,Object.freeze(r)}const O=ae(a);var d="Accordion",le=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[D,de,ue]=re.createCollection(d),[C]=te.createContextScope(d,[ue,v.createCollapsibleScope]),k=v.createCollapsibleScope(),$=a.forwardRef((o,r)=>{const{type:e,...t}=o,i=t,n=t;return c.jsxRuntimeExports.jsx(D.Provider,{scope:o.__scopeAccordion,children:e==="multiple"?c.jsxRuntimeExports.jsx(fe,{...n,ref:r}):c.jsxRuntimeExports.jsx(me,{...i,ref:r})})});$.displayName=d;var[V,pe]=C(d),[H,xe]=C(d,{collapsible:!1}),me=a.forwardRef((o,r)=>{const{value:e,defaultValue:t,onValueChange:i=()=>{},collapsible:n=!1,...l}=o,[s,u]=M.useControllableState({prop:e,defaultProp:t??"",onChange:i,caller:d});return c.jsxRuntimeExports.jsx(V,{scope:o.__scopeAccordion,value:a.useMemo(()=>s?[s]:[],[s]),onItemOpen:u,onItemClose:a.useCallback(()=>n&&u(""),[n,u]),children:c.jsxRuntimeExports.jsx(H,{scope:o.__scopeAccordion,collapsible:n,children:c.jsxRuntimeExports.jsx(K,{...l,ref:r})})})}),fe=a.forwardRef((o,r)=>{const{value:e,defaultValue:t,onValueChange:i=()=>{},...n}=o,[l,s]=M.useControllableState({prop:e,defaultProp:t??[],onChange:i,caller:d}),u=a.useCallback(f=>s((x=[])=>[...x,f]),[s]),m=a.useCallback(f=>s((x=[])=>x.filter(b=>b!==f)),[s]);return c.jsxRuntimeExports.jsx(V,{scope:o.__scopeAccordion,value:l,onItemOpen:u,onItemClose:m,children:c.jsxRuntimeExports.jsx(H,{scope:o.__scopeAccordion,collapsible:!0,children:c.jsxRuntimeExports.jsx(K,{...n,ref:r})})})}),[ve,R]=C(d),K=a.forwardRef((o,r)=>{const{__scopeAccordion:e,disabled:t,dir:i,orientation:n="vertical",...l}=o,s=a.useRef(null),u=ne.useComposedRefs(s,r),m=de(e),x=ie.useDirection(i)==="ltr",b=y.composeEventHandlers(o.onKeyDown,A=>{if(!le.includes(A.key))return;const ee=A.target,h=m().filter(N=>!N.ref.current?.disabled),j=h.findIndex(N=>N.ref.current===ee),q=h.length;if(j===-1)return;A.preventDefault();let p=j;const E=0,I=q-1,w=()=>{p=j+1,p>I&&(p=E)},_=()=>{p=j-1,p<E&&(p=I)};switch(A.key){case"Home":p=E;break;case"End":p=I;break;case"ArrowRight":n==="horizontal"&&(x?w():_());break;case"ArrowDown":n==="vertical"&&w();break;case"ArrowLeft":n==="horizontal"&&(x?_():w());break;case"ArrowUp":n==="vertical"&&_();break}const oe=p%q;h[oe].ref.current?.focus()});return c.jsxRuntimeExports.jsx(ve,{scope:e,disabled:t,direction:i,orientation:n,children:c.jsxRuntimeExports.jsx(D.Slot,{scope:e,children:c.jsxRuntimeExports.jsx(y.Primitive.div,{...l,"data-orientation":n,ref:u,onKeyDown:t?void 0:b})})})}),g="AccordionItem",[Ae,T]=C(g),z=a.forwardRef((o,r)=>{const{__scopeAccordion:e,value:t,...i}=o,n=R(g,e),l=pe(g,e),s=k(e),u=ce.useId(),m=t&&l.value.includes(t)||!1,f=n.disabled||o.disabled;return c.jsxRuntimeExports.jsx(Ae,{scope:e,open:m,disabled:f,triggerId:u,children:c.jsxRuntimeExports.jsx(v.Root,{"data-orientation":n.orientation,"data-state":F(m),...s,...i,ref:r,disabled:f,open:m,onOpenChange:x=>{x?l.onItemOpen(t):l.onItemClose(t)}})})});z.displayName=g;var L="AccordionHeader",G=a.forwardRef((o,r)=>{const{__scopeAccordion:e,...t}=o,i=R(d,e),n=T(L,e);return c.jsxRuntimeExports.jsx(y.Primitive.h3,{"data-orientation":i.orientation,"data-state":F(n.open),"data-disabled":n.disabled?"":void 0,...t,ref:r})});G.displayName=L;var P="AccordionTrigger",U=a.forwardRef((o,r)=>{const{__scopeAccordion:e,...t}=o,i=R(d,e),n=T(P,e),l=xe(P,e),s=k(e);return c.jsxRuntimeExports.jsx(D.ItemSlot,{scope:e,children:c.jsxRuntimeExports.jsx(v.Trigger,{"aria-disabled":n.open&&!l.collapsible||void 0,"data-orientation":i.orientation,id:n.triggerId,...s,...t,ref:r})})});U.displayName=P;var Y="AccordionContent",B=a.forwardRef((o,r)=>{const{__scopeAccordion:e,...t}=o,i=R(d,e),n=T(Y,e),l=k(e);return c.jsxRuntimeExports.jsx(v.Content,{role:"region","aria-labelledby":n.triggerId,"data-orientation":i.orientation,...l,...t,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...o.style}})});B.displayName=Y;function F(o){return o?"open":"closed"}var je=$,ge=z,Ce=G,J=U,Q=B;const Re=je,W=O.forwardRef(({className:o,...r},e)=>c.jsxRuntimeExports.jsx(ge,{ref:e,className:S.cn("border-b",o),...r}));W.displayName="AccordionItem";const X=O.forwardRef(({className:o,children:r,...e},t)=>c.jsxRuntimeExports.jsx(Ce,{className:"flex",children:c.jsxRuntimeExports.jsxs(J,{ref:t,className:S.cn("flex flex-1 items-center justify-between py-4 text-left text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",o),...e,children:[r,c.jsxRuntimeExports.jsx(se.ChevronDown,{className:"text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200"})]})}));X.displayName=J.displayName;const Z=O.forwardRef(({className:o,children:r,...e},t)=>c.jsxRuntimeExports.jsx(Q,{ref:t,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...e,children:c.jsxRuntimeExports.jsx("div",{className:S.cn("pt-0 pb-4",o),children:r})}));Z.displayName=Q.displayName;exports.Accordion=Re;exports.AccordionContent=Z;exports.AccordionItem=W;exports.AccordionTrigger=X;
@@ -0,0 +1,18 @@
1
+ import { AccordionContentBaseProps } from '../../ui-core/src';
2
+ import { AccordionItemBaseProps } from '../../ui-core/src';
3
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
+ import { AccordionBaseProps as AccordionProps } from '../../ui-core/src';
5
+ import { AccordionTriggerBaseProps } from '../../ui-core/src';
6
+ import * as React_2 from 'react';
7
+
8
+ export declare const Accordion: React_2.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React_2.RefAttributes<HTMLDivElement>>;
9
+
10
+ export declare const AccordionContent: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & AccordionContentBaseProps & React_2.RefAttributes<HTMLDivElement>>;
11
+
12
+ export declare const AccordionItem: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & AccordionItemBaseProps & React_2.RefAttributes<HTMLDivElement>>;
13
+
14
+ export { AccordionProps }
15
+
16
+ export declare const AccordionTrigger: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & AccordionTriggerBaseProps & React_2.RefAttributes<HTMLButtonElement>>;
17
+
18
+ export { }
@@ -0,0 +1,259 @@
1
+ import { j as n } from "./jsx-runtime-tc70JA_2.mjs";
2
+ import * as y from "react";
3
+ import l from "react";
4
+ import { c as Z } from "./index-IZ2gq03c.mjs";
5
+ import { c as ee } from "./index-DFdF7K7v.mjs";
6
+ import { u as oe } from "./index-DLcqcWxM.mjs";
7
+ import { P as O, c as re } from "./index-K9FzbxYw.mjs";
8
+ import { u as M } from "./index-p6xVFRb4.mjs";
9
+ import { R as te, T as ne, b as ce, c as V } from "./index-DSxf1gN6.mjs";
10
+ import { u as ae } from "./index-DnFcfnA9.mjs";
11
+ import { u as ie } from "./index-CD6_IrA-.mjs";
12
+ import { ChevronDown as se } from "lucide-react";
13
+ import { c as E } from "./utils-B6yFEsav.mjs";
14
+ var d = "Accordion", le = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [S, de, pe] = ee(d), [g] = Z(d, [
15
+ pe,
16
+ V
17
+ ]), k = V(), H = l.forwardRef(
18
+ (o, c) => {
19
+ const { type: e, ...t } = o, a = t, r = t;
20
+ return /* @__PURE__ */ n.jsx(S.Provider, { scope: o.__scopeAccordion, children: e === "multiple" ? /* @__PURE__ */ n.jsx(xe, { ...r, ref: c }) : /* @__PURE__ */ n.jsx(ue, { ...a, ref: c }) });
21
+ }
22
+ );
23
+ H.displayName = d;
24
+ var [K, me] = g(d), [$, fe] = g(
25
+ d,
26
+ { collapsible: !1 }
27
+ ), ue = l.forwardRef(
28
+ (o, c) => {
29
+ const {
30
+ value: e,
31
+ defaultValue: t,
32
+ onValueChange: a = () => {
33
+ },
34
+ collapsible: r = !1,
35
+ ...s
36
+ } = o, [i, p] = M({
37
+ prop: e,
38
+ defaultProp: t ?? "",
39
+ onChange: a,
40
+ caller: d
41
+ });
42
+ return /* @__PURE__ */ n.jsx(
43
+ K,
44
+ {
45
+ scope: o.__scopeAccordion,
46
+ value: l.useMemo(() => i ? [i] : [], [i]),
47
+ onItemOpen: p,
48
+ onItemClose: l.useCallback(() => r && p(""), [r, p]),
49
+ children: /* @__PURE__ */ n.jsx($, { scope: o.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ n.jsx(L, { ...s, ref: c }) })
50
+ }
51
+ );
52
+ }
53
+ ), xe = l.forwardRef((o, c) => {
54
+ const {
55
+ value: e,
56
+ defaultValue: t,
57
+ onValueChange: a = () => {
58
+ },
59
+ ...r
60
+ } = o, [s, i] = M({
61
+ prop: e,
62
+ defaultProp: t ?? [],
63
+ onChange: a,
64
+ caller: d
65
+ }), p = l.useCallback(
66
+ (x) => i((f = []) => [...f, x]),
67
+ [i]
68
+ ), u = l.useCallback(
69
+ (x) => i((f = []) => f.filter((b) => b !== x)),
70
+ [i]
71
+ );
72
+ return /* @__PURE__ */ n.jsx(
73
+ K,
74
+ {
75
+ scope: o.__scopeAccordion,
76
+ value: s,
77
+ onItemOpen: p,
78
+ onItemClose: u,
79
+ children: /* @__PURE__ */ n.jsx($, { scope: o.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ n.jsx(L, { ...r, ref: c }) })
80
+ }
81
+ );
82
+ }), [ve, h] = g(d), L = l.forwardRef(
83
+ (o, c) => {
84
+ const { __scopeAccordion: e, disabled: t, dir: a, orientation: r = "vertical", ...s } = o, i = l.useRef(null), p = oe(i, c), u = de(e), f = ie(a) === "ltr", b = re(o.onKeyDown, (v) => {
85
+ if (!le.includes(v.key)) return;
86
+ const W = v.target, I = u().filter((N) => !N.ref.current?.disabled), A = I.findIndex((N) => N.ref.current === W), T = I.length;
87
+ if (A === -1) return;
88
+ v.preventDefault();
89
+ let m = A;
90
+ const w = 0, R = T - 1, _ = () => {
91
+ m = A + 1, m > R && (m = w);
92
+ }, j = () => {
93
+ m = A - 1, m < w && (m = R);
94
+ };
95
+ switch (v.key) {
96
+ case "Home":
97
+ m = w;
98
+ break;
99
+ case "End":
100
+ m = R;
101
+ break;
102
+ case "ArrowRight":
103
+ r === "horizontal" && (f ? _() : j());
104
+ break;
105
+ case "ArrowDown":
106
+ r === "vertical" && _();
107
+ break;
108
+ case "ArrowLeft":
109
+ r === "horizontal" && (f ? j() : _());
110
+ break;
111
+ case "ArrowUp":
112
+ r === "vertical" && j();
113
+ break;
114
+ }
115
+ const X = m % T;
116
+ I[X].ref.current?.focus();
117
+ });
118
+ return /* @__PURE__ */ n.jsx(
119
+ ve,
120
+ {
121
+ scope: e,
122
+ disabled: t,
123
+ direction: a,
124
+ orientation: r,
125
+ children: /* @__PURE__ */ n.jsx(S.Slot, { scope: e, children: /* @__PURE__ */ n.jsx(
126
+ O.div,
127
+ {
128
+ ...s,
129
+ "data-orientation": r,
130
+ ref: p,
131
+ onKeyDown: t ? void 0 : b
132
+ }
133
+ ) })
134
+ }
135
+ );
136
+ }
137
+ ), C = "AccordionItem", [Ae, D] = g(C), z = l.forwardRef(
138
+ (o, c) => {
139
+ const { __scopeAccordion: e, value: t, ...a } = o, r = h(C, e), s = me(C, e), i = k(e), p = ae(), u = t && s.value.includes(t) || !1, x = r.disabled || o.disabled;
140
+ return /* @__PURE__ */ n.jsx(
141
+ Ae,
142
+ {
143
+ scope: e,
144
+ open: u,
145
+ disabled: x,
146
+ triggerId: p,
147
+ children: /* @__PURE__ */ n.jsx(
148
+ te,
149
+ {
150
+ "data-orientation": r.orientation,
151
+ "data-state": F(u),
152
+ ...i,
153
+ ...a,
154
+ ref: c,
155
+ disabled: x,
156
+ open: u,
157
+ onOpenChange: (f) => {
158
+ f ? s.onItemOpen(t) : s.onItemClose(t);
159
+ }
160
+ }
161
+ )
162
+ }
163
+ );
164
+ }
165
+ );
166
+ z.displayName = C;
167
+ var G = "AccordionHeader", U = l.forwardRef(
168
+ (o, c) => {
169
+ const { __scopeAccordion: e, ...t } = o, a = h(d, e), r = D(G, e);
170
+ return /* @__PURE__ */ n.jsx(
171
+ O.h3,
172
+ {
173
+ "data-orientation": a.orientation,
174
+ "data-state": F(r.open),
175
+ "data-disabled": r.disabled ? "" : void 0,
176
+ ...t,
177
+ ref: c
178
+ }
179
+ );
180
+ }
181
+ );
182
+ U.displayName = G;
183
+ var P = "AccordionTrigger", Y = l.forwardRef(
184
+ (o, c) => {
185
+ const { __scopeAccordion: e, ...t } = o, a = h(d, e), r = D(P, e), s = fe(P, e), i = k(e);
186
+ return /* @__PURE__ */ n.jsx(S.ItemSlot, { scope: e, children: /* @__PURE__ */ n.jsx(
187
+ ne,
188
+ {
189
+ "aria-disabled": r.open && !s.collapsible || void 0,
190
+ "data-orientation": a.orientation,
191
+ id: r.triggerId,
192
+ ...i,
193
+ ...t,
194
+ ref: c
195
+ }
196
+ ) });
197
+ }
198
+ );
199
+ Y.displayName = P;
200
+ var q = "AccordionContent", B = l.forwardRef(
201
+ (o, c) => {
202
+ const { __scopeAccordion: e, ...t } = o, a = h(d, e), r = D(q, e), s = k(e);
203
+ return /* @__PURE__ */ n.jsx(
204
+ ce,
205
+ {
206
+ role: "region",
207
+ "aria-labelledby": r.triggerId,
208
+ "data-orientation": a.orientation,
209
+ ...s,
210
+ ...t,
211
+ ref: c,
212
+ style: {
213
+ "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
214
+ "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
215
+ ...o.style
216
+ }
217
+ }
218
+ );
219
+ }
220
+ );
221
+ B.displayName = q;
222
+ function F(o) {
223
+ return o ? "open" : "closed";
224
+ }
225
+ var Ce = H, ge = z, he = U, J = Y, Q = B;
226
+ const Me = Ce, be = y.forwardRef(({ className: o, ...c }, e) => /* @__PURE__ */ n.jsx(ge, { ref: e, className: E("border-b", o), ...c }));
227
+ be.displayName = "AccordionItem";
228
+ const Ie = y.forwardRef(({ className: o, children: c, ...e }, t) => /* @__PURE__ */ n.jsx(he, { className: "flex", children: /* @__PURE__ */ n.jsxs(
229
+ J,
230
+ {
231
+ ref: t,
232
+ className: E(
233
+ "flex flex-1 items-center justify-between py-4 text-left text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
234
+ o
235
+ ),
236
+ ...e,
237
+ children: [
238
+ c,
239
+ /* @__PURE__ */ n.jsx(se, { className: "text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200" })
240
+ ]
241
+ }
242
+ ) }));
243
+ Ie.displayName = J.displayName;
244
+ const we = y.forwardRef(({ className: o, children: c, ...e }, t) => /* @__PURE__ */ n.jsx(
245
+ Q,
246
+ {
247
+ ref: t,
248
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
249
+ ...e,
250
+ children: /* @__PURE__ */ n.jsx("div", { className: E("pt-0 pb-4", o), children: c })
251
+ }
252
+ ));
253
+ we.displayName = Q.displayName;
254
+ export {
255
+ Me as Accordion,
256
+ we as AccordionContent,
257
+ be as AccordionItem,
258
+ Ie as AccordionTrigger
259
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-nZSsnGb7.js"),B=require("react"),J=require("./index-D2HnlO3y.js"),f=require("./index-_XxjJPRD.js"),l=require("./index-ByiPJW53.js"),A=require("./index-BtZvtDmp.js"),D=require("./button.cjs.js"),c=require("./utils-IjLH3w2e.js");function K(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=K(B);var v="AlertDialog",[Q]=J.createContextScope(v,[l.createDialogScope]),n=l.createDialogScope(),R=e=>{const{__scopeAlertDialog:t,...o}=e,r=n(t);return a.jsxRuntimeExports.jsx(l.Root,{...r,...o,modal:!0})};R.displayName=v;var U="AlertDialogTrigger",j=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,i=n(o);return a.jsxRuntimeExports.jsx(l.Trigger,{...i,...r,ref:t})});j.displayName=U;var X="AlertDialogPortal",y=e=>{const{__scopeAlertDialog:t,...o}=e,r=n(t);return a.jsxRuntimeExports.jsx(l.Portal,{...r,...o})};y.displayName=X;var Z="AlertDialogOverlay",N=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,i=n(o);return a.jsxRuntimeExports.jsx(l.Overlay,{...i,...r,ref:t})});N.displayName=Z;var d="AlertDialogContent",[ee,te]=Q(d),oe=A.createSlottable("AlertDialogContent"),E=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:r,...i}=e,g=n(o),u=s.useRef(null),Y=f.useComposedRefs(t,u),x=s.useRef(null);return a.jsxRuntimeExports.jsx(l.WarningProvider,{contentName:d,titleName:b,docsSlug:"alert-dialog",children:a.jsxRuntimeExports.jsx(ee,{scope:o,cancelRef:x,children:a.jsxRuntimeExports.jsxs(l.Content,{role:"alertdialog",...g,...i,ref:Y,onOpenAutoFocus:A.composeEventHandlers(i.onOpenAutoFocus,p=>{p.preventDefault(),x.current?.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[a.jsxRuntimeExports.jsx(oe,{children:r}),a.jsxRuntimeExports.jsx(re,{contentRef:u})]})})})});E.displayName=d;var b="AlertDialogTitle",_=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,i=n(o);return a.jsxRuntimeExports.jsx(l.Title,{...i,...r,ref:t})});_.displayName=b;var C="AlertDialogDescription",S=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,i=n(o);return a.jsxRuntimeExports.jsx(l.Description,{...i,...r,ref:t})});S.displayName=C;var ae="AlertDialogAction",w=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,i=n(o);return a.jsxRuntimeExports.jsx(l.Close,{...i,...r,ref:t})});w.displayName=ae;var O="AlertDialogCancel",P=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,{cancelRef:i}=te(O,o),g=n(o),u=f.useComposedRefs(t,i);return a.jsxRuntimeExports.jsx(l.Close,{...g,...r,ref:u})});P.displayName=O;var re=({contentRef:e})=>{const t=`\`${d}\` requires a description for the component to be accessible for screen reader users.
2
+
3
+ You can add a description to the \`${d}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
+
5
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${d}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
+
7
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return s.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},se=R,ie=j,le=y,T=N,h=E,$=w,M=P,q=_,I=S;const ne=se,ce=ie,F=le,m=s.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(T,{className:c.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t,ref:o}));m.displayName=T.displayName;const z=s.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsxs(F,{children:[a.jsxRuntimeExports.jsx(m,{}),a.jsxRuntimeExports.jsx(h,{ref:o,className:c.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...t})]}));z.displayName=h.displayName;const H=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});H.displayName="AlertDialogHeader";const L=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});L.displayName="AlertDialogFooter";const k=s.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(q,{ref:o,className:c.cn("text-lg font-semibold",e),...t}));k.displayName=q.displayName;const G=s.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(I,{ref:o,className:c.cn("text-muted-foreground text-sm",e),...t}));G.displayName=I.displayName;const V=s.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx($,{ref:o,className:c.cn(D.buttonVariants(),e),...t}));V.displayName=$.displayName;const W=s.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(M,{ref:o,className:c.cn(D.buttonVariants({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));W.displayName=M.displayName;exports.AlertDialog=ne;exports.AlertDialogAction=V;exports.AlertDialogCancel=W;exports.AlertDialogContent=z;exports.AlertDialogDescription=G;exports.AlertDialogFooter=L;exports.AlertDialogHeader=H;exports.AlertDialogOverlay=m;exports.AlertDialogPortal=F;exports.AlertDialogTitle=k;exports.AlertDialogTrigger=ce;
@@ -0,0 +1,43 @@
1
+ import { AlertDialogActionBaseProps } from '../../ui-core/src';
2
+ import { AlertDialogCancelBaseProps } from '../../ui-core/src';
3
+ import { AlertDialogContentBaseProps } from '../../ui-core/src';
4
+ import { AlertDialogDescriptionBaseProps } from '../../ui-core/src';
5
+ import { AlertDialogFooterBaseProps } from '../../ui-core/src';
6
+ import { AlertDialogHeaderBaseProps } from '../../ui-core/src';
7
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
8
+ import { AlertDialogBaseProps as AlertDialogProps } from '../../ui-core/src';
9
+ import { AlertDialogTitleBaseProps } from '../../ui-core/src';
10
+ import { JSX } from 'react/jsx-runtime';
11
+ import * as React_2 from 'react';
12
+
13
+ export declare const AlertDialog: React_2.FC<AlertDialogPrimitive.AlertDialogProps>;
14
+
15
+ export declare const AlertDialogAction: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & AlertDialogActionBaseProps & React_2.RefAttributes<HTMLButtonElement>>;
16
+
17
+ export declare const AlertDialogCancel: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & AlertDialogCancelBaseProps & React_2.RefAttributes<HTMLButtonElement>>;
18
+
19
+ export declare const AlertDialogContent: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & AlertDialogContentBaseProps & React_2.RefAttributes<HTMLDivElement>>;
20
+
21
+ export declare const AlertDialogDescription: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & AlertDialogDescriptionBaseProps & React_2.RefAttributes<HTMLParagraphElement>>;
22
+
23
+ export declare const AlertDialogFooter: {
24
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement> & AlertDialogFooterBaseProps): JSX.Element;
25
+ displayName: string;
26
+ };
27
+
28
+ export declare const AlertDialogHeader: {
29
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement> & AlertDialogHeaderBaseProps): JSX.Element;
30
+ displayName: string;
31
+ };
32
+
33
+ export declare const AlertDialogOverlay: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
34
+
35
+ export declare const AlertDialogPortal: React_2.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
36
+
37
+ export { AlertDialogProps }
38
+
39
+ export declare const AlertDialogTitle: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React_2.RefAttributes<HTMLHeadingElement>, "ref"> & AlertDialogTitleBaseProps & React_2.RefAttributes<HTMLHeadingElement>>;
40
+
41
+ export declare const AlertDialogTrigger: React_2.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
42
+
43
+ export { }
@@ -0,0 +1,171 @@
1
+ import { j as o } from "./jsx-runtime-tc70JA_2.mjs";
2
+ import * as s from "react";
3
+ import { c as L } from "./index-IZ2gq03c.mjs";
4
+ import { u as f } from "./index-DLcqcWxM.mjs";
5
+ import { O as G, P as H, W, C as k, T as V, D as Y, a as u, c as A, R as q, b as B } from "./index-DlY82G31.mjs";
6
+ import { c as J, b as K } from "./index-K9FzbxYw.mjs";
7
+ import { buttonVariants as D } from "./button.es.js";
8
+ import { c as n } from "./utils-B6yFEsav.mjs";
9
+ var v = "AlertDialog", [Q] = L(v, [
10
+ A
11
+ ]), i = A(), x = (e) => {
12
+ const { __scopeAlertDialog: a, ...t } = e, r = i(a);
13
+ return /* @__PURE__ */ o.jsx(q, { ...r, ...t, modal: !0 });
14
+ };
15
+ x.displayName = v;
16
+ var U = "AlertDialogTrigger", N = s.forwardRef(
17
+ (e, a) => {
18
+ const { __scopeAlertDialog: t, ...r } = e, l = i(t);
19
+ return /* @__PURE__ */ o.jsx(B, { ...l, ...r, ref: a });
20
+ }
21
+ );
22
+ N.displayName = U;
23
+ var X = "AlertDialogPortal", y = (e) => {
24
+ const { __scopeAlertDialog: a, ...t } = e, r = i(a);
25
+ return /* @__PURE__ */ o.jsx(H, { ...r, ...t });
26
+ };
27
+ y.displayName = X;
28
+ var Z = "AlertDialogOverlay", R = s.forwardRef(
29
+ (e, a) => {
30
+ const { __scopeAlertDialog: t, ...r } = e, l = i(t);
31
+ return /* @__PURE__ */ o.jsx(G, { ...l, ...r, ref: a });
32
+ }
33
+ );
34
+ R.displayName = Z;
35
+ var c = "AlertDialogContent", [ee, ae] = Q(c), te = K("AlertDialogContent"), _ = s.forwardRef(
36
+ (e, a) => {
37
+ const { __scopeAlertDialog: t, children: r, ...l } = e, g = i(t), p = s.useRef(null), z = f(a, p), m = s.useRef(null);
38
+ return /* @__PURE__ */ o.jsx(
39
+ W,
40
+ {
41
+ contentName: c,
42
+ titleName: j,
43
+ docsSlug: "alert-dialog",
44
+ children: /* @__PURE__ */ o.jsx(ee, { scope: t, cancelRef: m, children: /* @__PURE__ */ o.jsxs(
45
+ k,
46
+ {
47
+ role: "alertdialog",
48
+ ...g,
49
+ ...l,
50
+ ref: z,
51
+ onOpenAutoFocus: J(l.onOpenAutoFocus, (d) => {
52
+ d.preventDefault(), m.current?.focus({ preventScroll: !0 });
53
+ }),
54
+ onPointerDownOutside: (d) => d.preventDefault(),
55
+ onInteractOutside: (d) => d.preventDefault(),
56
+ children: [
57
+ /* @__PURE__ */ o.jsx(te, { children: r }),
58
+ /* @__PURE__ */ o.jsx(re, { contentRef: p })
59
+ ]
60
+ }
61
+ ) })
62
+ }
63
+ );
64
+ }
65
+ );
66
+ _.displayName = c;
67
+ var j = "AlertDialogTitle", b = s.forwardRef(
68
+ (e, a) => {
69
+ const { __scopeAlertDialog: t, ...r } = e, l = i(t);
70
+ return /* @__PURE__ */ o.jsx(V, { ...l, ...r, ref: a });
71
+ }
72
+ );
73
+ b.displayName = j;
74
+ var C = "AlertDialogDescription", h = s.forwardRef((e, a) => {
75
+ const { __scopeAlertDialog: t, ...r } = e, l = i(t);
76
+ return /* @__PURE__ */ o.jsx(Y, { ...l, ...r, ref: a });
77
+ });
78
+ h.displayName = C;
79
+ var oe = "AlertDialogAction", w = s.forwardRef(
80
+ (e, a) => {
81
+ const { __scopeAlertDialog: t, ...r } = e, l = i(t);
82
+ return /* @__PURE__ */ o.jsx(u, { ...l, ...r, ref: a });
83
+ }
84
+ );
85
+ w.displayName = oe;
86
+ var E = "AlertDialogCancel", P = s.forwardRef(
87
+ (e, a) => {
88
+ const { __scopeAlertDialog: t, ...r } = e, { cancelRef: l } = ae(E, t), g = i(t), p = f(a, l);
89
+ return /* @__PURE__ */ o.jsx(u, { ...g, ...r, ref: p });
90
+ }
91
+ );
92
+ P.displayName = E;
93
+ var re = ({ contentRef: e }) => {
94
+ const a = `\`${c}\` requires a description for the component to be accessible for screen reader users.
95
+
96
+ You can add a description to the \`${c}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
97
+
98
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${c}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
99
+
100
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
101
+ return s.useEffect(() => {
102
+ document.getElementById(
103
+ e.current?.getAttribute("aria-describedby")
104
+ ) || console.warn(a);
105
+ }, [a, e]), null;
106
+ }, se = x, le = N, ie = y, T = R, S = _, O = w, $ = P, M = b, I = h;
107
+ const _e = se, je = le, ne = ie, F = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(
108
+ T,
109
+ {
110
+ className: n(
111
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",
112
+ e
113
+ ),
114
+ ...a,
115
+ ref: t
116
+ }
117
+ ));
118
+ F.displayName = T.displayName;
119
+ const ce = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsxs(ne, { children: [
120
+ /* @__PURE__ */ o.jsx(F, {}),
121
+ /* @__PURE__ */ o.jsx(
122
+ S,
123
+ {
124
+ ref: t,
125
+ className: n(
126
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",
127
+ e
128
+ ),
129
+ ...a
130
+ }
131
+ )
132
+ ] }));
133
+ ce.displayName = S.displayName;
134
+ const de = ({
135
+ className: e,
136
+ ...a
137
+ }) => /* @__PURE__ */ o.jsx("div", { className: n("flex flex-col space-y-2 text-center sm:text-left", e), ...a });
138
+ de.displayName = "AlertDialogHeader";
139
+ const pe = ({
140
+ className: e,
141
+ ...a
142
+ }) => /* @__PURE__ */ o.jsx("div", { className: n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...a });
143
+ pe.displayName = "AlertDialogFooter";
144
+ const ge = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(M, { ref: t, className: n("text-lg font-semibold", e), ...a }));
145
+ ge.displayName = M.displayName;
146
+ const me = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(I, { ref: t, className: n("text-muted-foreground text-sm", e), ...a }));
147
+ me.displayName = I.displayName;
148
+ const fe = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(O, { ref: t, className: n(D(), e), ...a }));
149
+ fe.displayName = O.displayName;
150
+ const ue = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(
151
+ $,
152
+ {
153
+ ref: t,
154
+ className: n(D({ variant: "outline" }), "mt-2 sm:mt-0", e),
155
+ ...a
156
+ }
157
+ ));
158
+ ue.displayName = $.displayName;
159
+ export {
160
+ _e as AlertDialog,
161
+ fe as AlertDialogAction,
162
+ ue as AlertDialogCancel,
163
+ ce as AlertDialogContent,
164
+ me as AlertDialogDescription,
165
+ pe as AlertDialogFooter,
166
+ de as AlertDialogHeader,
167
+ F as AlertDialogOverlay,
168
+ ne as AlertDialogPortal,
169
+ ge as AlertDialogTitle,
170
+ je as AlertDialogTrigger
171
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-nZSsnGb7.js"),u=require("class-variance-authority"),d=require("react"),n=require("./utils-IjLH3w2e.js");function b(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=b(d),g=u.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",warning:"border-amber-500/50 bg-amber-500/10 text-amber-600 dark:text-amber-400 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",info:"border-blue-500/50 bg-blue-500/10 text-blue-600 dark:text-blue-400 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400"}},defaultVariants:{variant:"default"}}),l=i.forwardRef(({className:e,variant:r,...t},a)=>s.jsxRuntimeExports.jsx("div",{ref:a,role:"alert",className:n.cn(g({variant:r}),e),...t}));l.displayName="Alert";const o=i.forwardRef(({className:e,...r},t)=>s.jsxRuntimeExports.jsx("h5",{ref:t,className:n.cn("mb-1 leading-none font-medium tracking-tight",e),...r}));o.displayName="AlertTitle";const c=i.forwardRef(({className:e,...r},t)=>s.jsxRuntimeExports.jsx("div",{ref:t,className:n.cn("text-sm [&_p]:leading-relaxed",e),...r}));c.displayName="AlertDescription";exports.Alert=l;exports.AlertDescription=c;exports.AlertTitle=o;
@@ -0,0 +1,18 @@
1
+ import { AlertDescriptionBaseProps } from '../../ui-core/src';
2
+ import { AlertBaseProps as AlertProps } from '../../ui-core/src';
3
+ import { AlertTitleBaseProps } from '../../ui-core/src';
4
+ import { ClassProp } from 'class-variance-authority/types';
5
+ import * as React_2 from 'react';
6
+ import { VariantProps } from 'class-variance-authority';
7
+
8
+ export declare const Alert: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & AlertProps & VariantProps<(props?: ({
9
+ variant?: "default" | "destructive" | "warning" | "info" | null | undefined;
10
+ } & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLDivElement>>;
11
+
12
+ export declare const AlertDescription: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & AlertDescriptionBaseProps & React_2.RefAttributes<HTMLDivElement>>;
13
+
14
+ export { AlertProps }
15
+
16
+ export declare const AlertTitle: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLHeadingElement> & AlertTitleBaseProps & React_2.RefAttributes<HTMLHeadingElement>>;
17
+
18
+ export { }
@@ -0,0 +1,32 @@
1
+ import { j as a } from "./jsx-runtime-tc70JA_2.mjs";
2
+ import { cva as o } from "class-variance-authority";
3
+ import * as s from "react";
4
+ import { c as l } from "./utils-B6yFEsav.mjs";
5
+ const i = o(
6
+ "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-background text-foreground",
11
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
12
+ warning: "border-amber-500/50 bg-amber-500/10 text-amber-600 dark:text-amber-400 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",
13
+ info: "border-blue-500/50 bg-blue-500/10 text-blue-600 dark:text-blue-400 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400"
14
+ }
15
+ },
16
+ defaultVariants: {
17
+ variant: "default"
18
+ }
19
+ }
20
+ ), n = s.forwardRef(({ className: e, variant: t, ...r }, d) => /* @__PURE__ */ a.jsx("div", { ref: d, role: "alert", className: l(i({ variant: t }), e), ...r }));
21
+ n.displayName = "Alert";
22
+ const m = s.forwardRef(
23
+ ({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx("h5", { ref: r, className: l("mb-1 leading-none font-medium tracking-tight", e), ...t })
24
+ );
25
+ m.displayName = "AlertTitle";
26
+ const v = s.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx("div", { ref: r, className: l("text-sm [&_p]:leading-relaxed", e), ...t }));
27
+ v.displayName = "AlertDescription";
28
+ export {
29
+ n as Alert,
30
+ v as AlertDescription,
31
+ m as AlertTitle
32
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),c=require("./index-B39Lzq0v.js"),i=require("./jsx-runtime-nZSsnGb7.js");function p(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const u=p(n);var l="AspectRatio",a=u.forwardRef((t,o)=>{const{ratio:e=1/1,style:r,...s}=t;return i.jsxRuntimeExports.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/e}%`},"data-radix-aspect-ratio-wrapper":"",children:i.jsxRuntimeExports.jsx(c.Primitive.div,{...s,ref:o,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});a.displayName=l;var d=a;const f=d;exports.AspectRatio=f;
@@ -0,0 +1,10 @@
1
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
2
+ import { AspectRatioBaseProps as AspectRatioProps } from '../../ui-core/src';
3
+ import { ForwardRefExoticComponent } from 'react';
4
+ import { RefAttributes } from 'react';
5
+
6
+ export declare const AspectRatio: ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & RefAttributes<HTMLDivElement>>;
7
+
8
+ export { AspectRatioProps }
9
+
10
+ export { }
@@ -0,0 +1,43 @@
1
+ import * as p from "react";
2
+ import { P as m } from "./index-DaILh3TV.mjs";
3
+ import { j as t } from "./jsx-runtime-tc70JA_2.mjs";
4
+ var d = "AspectRatio", o = p.forwardRef(
5
+ (i, r) => {
6
+ const { ratio: a = 1 / 1, style: e, ...s } = i;
7
+ return /* @__PURE__ */ t.jsx(
8
+ "div",
9
+ {
10
+ style: {
11
+ // ensures inner element is contained
12
+ position: "relative",
13
+ // ensures padding bottom trick maths works
14
+ width: "100%",
15
+ paddingBottom: `${100 / a}%`
16
+ },
17
+ "data-radix-aspect-ratio-wrapper": "",
18
+ children: /* @__PURE__ */ t.jsx(
19
+ m.div,
20
+ {
21
+ ...s,
22
+ ref: r,
23
+ style: {
24
+ ...e,
25
+ // ensures children expand in ratio
26
+ position: "absolute",
27
+ top: 0,
28
+ right: 0,
29
+ bottom: 0,
30
+ left: 0
31
+ }
32
+ }
33
+ )
34
+ }
35
+ );
36
+ }
37
+ );
38
+ o.displayName = d;
39
+ var c = o;
40
+ const R = c;
41
+ export {
42
+ R as AspectRatio
43
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./jsx-runtime-nZSsnGb7.js"),A=require("react"),K=require("./index-_wdrnYim.js"),F=require("./index-CzY-WZXL.js"),O=require("./index-MQ0c3ZX_.js"),R=require("./index-B39Lzq0v.js"),w=require("./utils-IjLH3w2e.js");function W(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=W(A);var g={exports:{}},h={};var b;function z(){if(b)return h;b=1;var e=A;function t(o,d){return o===d&&(o!==0||1/o===1/d)||o!==o&&d!==d}var r=typeof Object.is=="function"?Object.is:t,s=e.useState,u=e.useEffect,n=e.useLayoutEffect,v=e.useDebugValue;function l(o,d){var a=d(),i=s({inst:{value:a,getSnapshot:d}}),c=i[0].inst,m=i[1];return n(function(){c.value=a,c.getSnapshot=d,f(c)&&m({inst:c})},[o,a,d]),u(function(){return f(c)&&m({inst:c}),o(function(){f(c)&&m({inst:c})})},[o]),v(a),a}function f(o){var d=o.getSnapshot;o=o.value;try{var a=d();return!r(o,a)}catch{return!0}}function p(o,d){return d()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:l;return h.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,h}var L={};var I;function Y(){return I||(I=1,process.env.NODE_ENV!=="production"&&(function(){function e(a,i){return a===i&&(a!==0||1/a===1/i)||a!==a&&i!==i}function t(a,i){_||u.startTransition===void 0||(_=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var c=i();if(!o){var m=i();n(c,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),o=!0)}m=v({inst:{value:c,getSnapshot:i}});var E=m[0].inst,x=m[1];return f(function(){E.value=c,E.getSnapshot=i,r(E)&&x({inst:E})},[a,c,i]),l(function(){return r(E)&&x({inst:E}),a(function(){r(E)&&x({inst:E})})},[a]),p(c),c}function r(a){var i=a.getSnapshot;a=a.value;try{var c=i();return!n(a,c)}catch{return!0}}function s(a,i){return i()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u=A,n=typeof Object.is=="function"?Object.is:e,v=u.useState,l=u.useEffect,f=u.useLayoutEffect,p=u.useDebugValue,_=!1,o=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;L.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),L}var N;function J(){return N||(N=1,process.env.NODE_ENV==="production"?g.exports=z():g.exports=Y()),g.exports}var Q=J();function X(){return Q.useSyncExternalStore(Z,()=>!0,()=>!1)}function Z(){return()=>{}}var j="Avatar",[ee]=K.createContextScope(j),[te,C]=ee(j),q=S.forwardRef((e,t)=>{const{__scopeAvatar:r,...s}=e,[u,n]=S.useState("idle");return y.jsxRuntimeExports.jsx(te,{scope:r,imageLoadingStatus:u,onImageLoadingStatusChange:n,children:y.jsxRuntimeExports.jsx(R.Primitive.span,{...s,ref:t})})});q.displayName=j;var D="AvatarImage",k=S.forwardRef((e,t)=>{const{__scopeAvatar:r,src:s,onLoadingStatusChange:u=()=>{},...n}=e,v=C(D,r),l=re(s,n),f=F.useCallbackRef(p=>{u(p),v.onImageLoadingStatusChange(p)});return O.useLayoutEffect2(()=>{l!=="idle"&&f(l)},[l,f]),l==="loaded"?y.jsxRuntimeExports.jsx(R.Primitive.img,{...n,ref:t,src:s}):null});k.displayName=D;var $="AvatarFallback",M=S.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:s,...u}=e,n=C($,r),[v,l]=S.useState(s===void 0);return S.useEffect(()=>{if(s!==void 0){const f=window.setTimeout(()=>l(!0),s);return()=>window.clearTimeout(f)}},[s]),v&&n.imageLoadingStatus!=="loaded"?y.jsxRuntimeExports.jsx(R.Primitive.span,{...u,ref:t}):null});M.displayName=$;function T(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function re(e,{referrerPolicy:t,crossOrigin:r}){const s=X(),u=S.useRef(null),n=s?(u.current||(u.current=new window.Image),u.current):null,[v,l]=S.useState(()=>T(n,e));return O.useLayoutEffect2(()=>{l(T(n,e))},[n,e]),O.useLayoutEffect2(()=>{const f=o=>()=>{l(o)};if(!n)return;const p=f("loaded"),_=f("error");return n.addEventListener("load",p),n.addEventListener("error",_),t&&(n.referrerPolicy=t),typeof r=="string"&&(n.crossOrigin=r),()=>{n.removeEventListener("load",p),n.removeEventListener("error",_)}},[n,r,t]),v}var G=q,V=k,P=M;const H=S.forwardRef(({className:e,...t},r)=>y.jsxRuntimeExports.jsx(G,{ref:r,className:w.cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));H.displayName=G.displayName;const U=S.forwardRef(({className:e,...t},r)=>y.jsxRuntimeExports.jsx(V,{ref:r,className:w.cn("aspect-square h-full w-full",e),...t}));U.displayName=V.displayName;const B=S.forwardRef(({className:e,...t},r)=>y.jsxRuntimeExports.jsx(P,{ref:r,className:w.cn("bg-muted flex h-full w-full items-center justify-center rounded-full",e),...t}));B.displayName=P.displayName;exports.Avatar=H;exports.AvatarFallback=B;exports.AvatarImage=U;