@ngrok/mantle 0.90.4 → 0.91.1

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 (183) hide show
  1. package/dist/accordion.d.ts +3 -5
  2. package/dist/agent.json +7 -7
  3. package/dist/{alert-CTAmHdLa.d.ts → alert-BV0VWU2o.d.ts} +5 -7
  4. package/dist/{alert-xJELJxL4.js → alert-QXHRO9ji.js} +1 -1
  5. package/dist/alert-center.d.ts +2 -4
  6. package/dist/alert-center.js +1 -1
  7. package/dist/alert-dialog.d.ts +5 -7
  8. package/dist/alert-dialog.js +1 -1
  9. package/dist/alert.d.ts +1 -1
  10. package/dist/alert.js +1 -1
  11. package/dist/anchor.d.ts +2 -6
  12. package/dist/app-layout.d.ts +9 -27
  13. package/dist/app-layout.js +1 -1
  14. package/dist/area-chart.d.ts +2 -4
  15. package/dist/area-chart.js +1 -1
  16. package/dist/{as-child-D23mGo4f.d.ts → as-child-DFxX3U2i.d.ts} +0 -2
  17. package/dist/avatar.d.ts +2 -4
  18. package/dist/badge.d.ts +3 -5
  19. package/dist/bar-chart.d.ts +2 -4
  20. package/dist/bar-chart.js +1 -1
  21. package/dist/breadcrumb.d.ts +2 -6
  22. package/dist/breadcrumb.js +1 -1
  23. package/dist/browser-only.d.ts +0 -2
  24. package/dist/{button-BZT5f79d.d.ts → button-BFAvonp1.d.ts} +3 -7
  25. package/dist/{button-mzUR1U0Y.d.ts → button-BOCRKR5v.d.ts} +3 -7
  26. package/dist/button-CZ-q7fYv.js +1 -0
  27. package/dist/button-Cwrv2Mwv.js +1 -0
  28. package/dist/{button-BRjAW1ec.d.ts → button-Dt9LZMT5.d.ts} +5 -7
  29. package/dist/{button-BCoI4bhP.d.ts → button-L4exxu_L.d.ts} +0 -2
  30. package/dist/button.d.ts +4 -4
  31. package/dist/button.js +1 -1
  32. package/dist/calendar.d.ts +1 -3
  33. package/dist/card.d.ts +3 -5
  34. package/dist/centered-layout.d.ts +9 -32
  35. package/dist/chart-D2LtDZtV.js +2 -0
  36. package/dist/{chart-23KQ1ZNO.d.ts → chart-ynMysD16.d.ts} +40 -15
  37. package/dist/checkbox.d.ts +2 -4
  38. package/dist/{choice-BCiyqLgO.d.ts → choice-BLR0_MeB.d.ts} +3 -5
  39. package/dist/choice.d.ts +1 -1
  40. package/dist/{code-block-D5eDP379.d.ts → code-block-Bqw9VyK_.d.ts} +0 -22
  41. package/dist/code-block.d.ts +4 -12
  42. package/dist/code-block.js +6 -6
  43. package/dist/code-block_highlight-utils.d.ts +1 -1
  44. package/dist/code.d.ts +2 -4
  45. package/dist/color.d.ts +1 -1
  46. package/dist/combobox.d.ts +4 -6
  47. package/dist/combobox.js +1 -1
  48. package/dist/command.d.ts +3 -13
  49. package/dist/command.js +1 -1
  50. package/dist/cx.d.ts +0 -6
  51. package/dist/{data-slot-CChfb_cv.d.ts → data-slot-B-LqAcBB.d.ts} +0 -2
  52. package/dist/data-table.d.ts +5 -9
  53. package/dist/data-table.js +1 -1
  54. package/dist/description-list.d.ts +3 -5
  55. package/dist/{dialog-CgwSNHs1.d.ts → dialog-DedsCsnk.d.ts} +3 -5
  56. package/dist/{dialog-CZYD3xL-.d.ts → dialog-Dp0QGWwo.d.ts} +0 -2
  57. package/dist/dialog-eL61O8eg.js +1 -0
  58. package/dist/dialog.d.ts +2 -2
  59. package/dist/dialog.js +1 -1
  60. package/dist/{direction-BjU0bPST.d.ts → direction-CpRzTtZh.d.ts} +0 -2
  61. package/dist/{dropdown-menu-Cef0Cz2B.d.ts → dropdown-menu-ByQQIsQE.d.ts} +2 -4
  62. package/dist/dropdown-menu-C4C1x-7W.js +1 -0
  63. package/dist/dropdown-menu.d.ts +1 -2
  64. package/dist/dropdown-menu.js +1 -1
  65. package/dist/empty.d.ts +3 -5
  66. package/dist/{field-7QeiTFwl.d.ts → field-V_gnkcmN.d.ts} +0 -2
  67. package/dist/field.d.ts +7 -15
  68. package/dist/field.js +1 -1
  69. package/dist/flag.d.ts +1 -5
  70. package/dist/hooks.d.ts +1 -37
  71. package/dist/hover-card.d.ts +1 -3
  72. package/dist/hover-card.js +1 -1
  73. package/dist/{icon-ucVgZeXn.d.ts → icon-ByLVhdYq.d.ts} +2 -4
  74. package/dist/{icon-D1RY5Tcj.d.ts → icon-CgNqu-fl.d.ts} +0 -2
  75. package/dist/{icon-r2NvfTWW.d.ts → icon-DXDyhy2N.d.ts} +2 -4
  76. package/dist/icon.d.ts +3 -3
  77. package/dist/icons-exKDODyp.js +1 -0
  78. package/dist/icons.d.ts +3 -17
  79. package/dist/icons.js +1 -1
  80. package/dist/{in-view-Ch5vJtWo.d.ts → in-view-B3nMAzfE.d.ts} +0 -6
  81. package/dist/{index-DorCusfG.d.ts → index-BZhHLrBi.d.ts} +0 -2
  82. package/dist/{index-DA4ig3gj.d.ts → index-C6s5cGCr.d.ts} +2 -10
  83. package/dist/{input-eEKzP3cE.js → input-CpQ6jlpI.js} +1 -1
  84. package/dist/{input-bbB1tC0h.d.ts → input-Dx5owTCc.d.ts} +2 -6
  85. package/dist/input.d.ts +3 -7
  86. package/dist/input.js +1 -1
  87. package/dist/kbd.d.ts +1 -3
  88. package/dist/{label-C-KbNls8.d.ts → label-Dn5CPJUj.d.ts} +1 -3
  89. package/dist/label.d.ts +1 -1
  90. package/dist/layer-container.d.ts +0 -2
  91. package/dist/line-chart.d.ts +2 -4
  92. package/dist/line-chart.js +1 -1
  93. package/dist/list.d.ts +2 -8
  94. package/dist/live-region.d.ts +2 -4
  95. package/dist/llms.txt +4 -4
  96. package/dist/main.d.ts +1 -3
  97. package/dist/mantle-dark.css +2 -12
  98. package/dist/mantle.css +86 -13
  99. package/dist/media-object.d.ts +2 -4
  100. package/dist/migrations/0011-eliminate-high-contrast.yml +869 -0
  101. package/dist/multi-select.d.ts +4 -6
  102. package/dist/multi-select.js +1 -1
  103. package/dist/otp-input.d.ts +3 -5
  104. package/dist/pagination.d.ts +3 -7
  105. package/dist/pagination.js +1 -1
  106. package/dist/{popover-Dvls7-j4.d.ts → popover-BfB2I9G0.d.ts} +1 -3
  107. package/dist/{popover-oQDUvcZ2.js → popover-q2-rCY1q.js} +1 -1
  108. package/dist/popover.d.ts +1 -1
  109. package/dist/popover.js +1 -1
  110. package/dist/progress.d.ts +1 -7
  111. package/dist/progress.js +1 -1
  112. package/dist/qr-code.d.ts +2 -4
  113. package/dist/radio-group.d.ts +2 -4
  114. package/dist/radio-group.js +1 -1
  115. package/dist/sandbar.d.ts +5 -8
  116. package/dist/sandbar.js +1 -1
  117. package/dist/sandboxed-on-click.d.ts +1 -3
  118. package/dist/scatter-plot.d.ts +2 -4
  119. package/dist/scatter-plot.js +1 -1
  120. package/dist/select-BdF_CnfJ.js +1 -0
  121. package/dist/{select-DlohFa54.d.ts → select-CRp_ndSJ.d.ts} +3 -5
  122. package/dist/select.d.ts +1 -1
  123. package/dist/select.js +1 -1
  124. package/dist/selectable-list.d.ts +3 -5
  125. package/dist/selectable-list.js +1 -1
  126. package/dist/{separator-BWGjCIl7.d.ts → separator-DNovVsrx.d.ts} +3 -5
  127. package/dist/separator.d.ts +1 -1
  128. package/dist/shake-u3qyeThI.js +1 -0
  129. package/dist/sheet-BIyuxMmF.js +1 -0
  130. package/dist/sheet.d.ts +3 -5
  131. package/dist/sheet.js +1 -1
  132. package/dist/sidebar.d.ts +5 -9
  133. package/dist/sidebar.js +1 -1
  134. package/dist/{skeleton-zfqoDAxT.js → skeleton-DBpI-ko5.js} +1 -1
  135. package/dist/skeleton.d.ts +2 -4
  136. package/dist/skeleton.js +1 -1
  137. package/dist/skip-to-main-link.d.ts +1 -3
  138. package/dist/slider.d.ts +1 -3
  139. package/dist/{slot-Q996Hqk9.d.ts → slot-C0OCJjdJ.d.ts} +2 -4
  140. package/dist/slot.d.ts +1 -1
  141. package/dist/split-button.d.ts +5 -7
  142. package/dist/split-button.js +1 -1
  143. package/dist/strata.d.ts +2 -4
  144. package/dist/switch.d.ts +2 -4
  145. package/dist/switch.js +1 -1
  146. package/dist/{table-BhzITa19.d.ts → table-vT6Okwfa.d.ts} +1 -3
  147. package/dist/table.d.ts +1 -1
  148. package/dist/tabs.d.ts +3 -5
  149. package/dist/text-area.d.ts +2 -4
  150. package/dist/text-area.js +1 -1
  151. package/dist/theme-CBGxDNFc.js +1 -0
  152. package/dist/theme-switcher.d.ts +67 -213
  153. package/dist/theme-switcher.js +1 -1
  154. package/dist/{theme-6OxNhf6l.d.ts → theme-w1CrMM-x.d.ts} +3 -5
  155. package/dist/theme.d.ts +78 -177
  156. package/dist/theme.js +1 -1
  157. package/dist/toast.d.ts +4 -6
  158. package/dist/toast.js +1 -1
  159. package/dist/tooltip-BwMlCD6k.js +1 -0
  160. package/dist/{tooltip-CngH7Kl6.d.ts → tooltip-NcLIeBy5.d.ts} +1 -3
  161. package/dist/tooltip.d.ts +1 -1
  162. package/dist/tooltip.js +1 -1
  163. package/dist/truncated-text.d.ts +2 -4
  164. package/dist/truncated-text.js +1 -1
  165. package/dist/types.d.ts +3 -3
  166. package/dist/utils.d.ts +2 -4
  167. package/dist/visually-hidden.d.ts +2 -4
  168. package/dist/well.d.ts +3 -5
  169. package/dist/{with-style-props-Dq5Vntqy.d.ts → with-style-props-CuT30s0W.d.ts} +0 -2
  170. package/package.json +2 -10
  171. package/dist/button-Bkl_QYpp.js +0 -1
  172. package/dist/button-b2HKEIE2.js +0 -1
  173. package/dist/chart-BfJ835dr.js +0 -2
  174. package/dist/dialog-C9QGvVNG.js +0 -1
  175. package/dist/dropdown-menu-DMA8dGxZ.d.ts +0 -1
  176. package/dist/dropdown-menu-j4RbBbGa.js +0 -1
  177. package/dist/icons-CW9lV9E1.js +0 -1
  178. package/dist/mantle-dark-high-contrast.css +0 -354
  179. package/dist/mantle-light-high-contrast.css +0 -353
  180. package/dist/select-Os5GVejP.js +0 -1
  181. package/dist/sheet-CAFS09pT.js +0 -1
  182. package/dist/theme-Dzem-qRB.js +0 -1
  183. package/dist/tooltip-NhYXqStK.js +0 -1
@@ -1,8 +1,7 @@
1
- import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
- import { n as IconProps } from "./icon-ucVgZeXn.js";
1
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
+ import { n as IconProps } from "./icon-ByLVhdYq.js";
4
4
  import { ComponentProps } from "react";
5
- //#region src/components/accordion/accordion.d.ts
6
5
  /**
7
6
  * `"single"` mode props: at most one item open at a time — opening a section
8
7
  * auto-closes the previously open one. This is the **opt-in** behavior; `type`
@@ -394,5 +393,4 @@ declare const Accordion: {
394
393
  */
395
394
  readonly Body: typeof Body;
396
395
  };
397
- //#endregion
398
396
  export { Accordion };
package/dist/agent.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngrok/mantle",
3
- "version": "0.90.4",
3
+ "version": "0.91.1",
4
4
  "origin": "https://mantle.ngrok.com",
5
5
  "endpoints": {
6
6
  "docs": "https://mantle.ngrok.com/",
@@ -359,7 +359,7 @@
359
359
  "jsdoc": "A viewport-filling centered page flow for sign-in, sign-up, onboarding, 404, checkout, and other focused full-page states.",
360
360
  "examples": [
361
361
  "Composition:\n```\nCenteredLayout.Root\n├── CenteredLayout.Notice\n├── CenteredLayout.Header\n├── CenteredLayout.Body\n└── CenteredLayout.Footer\n```",
362
- "```tsx\n<CenteredLayout.Root>\n <SkipToMainLink />\n <CenteredLayout.Body>\n <a href=\"https://ngrok.com\">\n <NgrokWordmarkIcon className=\"h-auto w-24\" />\n </a>\n <Main>\n <SignInCard />\n </Main>\n </CenteredLayout.Body>\n <CenteredLayout.Footer>\n <ThemeSwitcher.Root>\n <ThemeSwitcher.Trigger />\n <ThemeSwitcher.Content />\n </ThemeSwitcher.Root>\n </CenteredLayout.Footer>\n</CenteredLayout.Root>\n```"
362
+ "```tsx\n<CenteredLayout.Root>\n <SkipToMainLink />\n <CenteredLayout.Body>\n <a href=\"https://ngrok.com\">\n <NgrokWordmarkIcon className=\"h-auto w-24\" />\n </a>\n <Main>\n <SignInCard />\n </Main>\n </CenteredLayout.Body>\n <CenteredLayout.Footer>\n <ThemeSwitcher />\n </CenteredLayout.Footer>\n</CenteredLayout.Root>\n```"
363
363
  ]
364
364
  },
365
365
  {
@@ -1238,7 +1238,7 @@
1238
1238
  "importPath": "@ngrok/mantle/theme",
1239
1239
  "docsUrl": "https://mantle.ngrok.com/components/primitives/theme",
1240
1240
  "markdownUrl": "https://mantle.ngrok.com/components/primitives/theme.md",
1241
- "summary": "Theme primitives (ThemeProvider, MantleStyleSheets, and FOUC prevention) for light, dark, and high-contrast modes.",
1241
+ "summary": "Theme primitives (ThemeProvider, MantleStyleSheets, and FOUC prevention) for light and dark modes that follow the OS by default.",
1242
1242
  "jsdoc": "Re-exports for the Theme component — the provider and hooks that carry the applied theme, plus the document tags that stop a wrong-theme flash."
1243
1243
  },
1244
1244
  {
@@ -1250,11 +1250,11 @@
1250
1250
  "importPath": "@ngrok/mantle/theme-switcher",
1251
1251
  "docsUrl": "https://mantle.ngrok.com/components/forms/theme-switcher",
1252
1252
  "markdownUrl": "https://mantle.ngrok.com/components/forms/theme-switcher.md",
1253
- "summary": "The canonical picker for mantle's five themes (a compact dropdown switcher), plus a radio group that embeds theme selection in any dropdown menu.",
1254
- "jsdoc": "The canonical picker for mantle's theme system: a compact `IconButton` trigger (ghost by default) that opens a `DropdownMenu` hosting `ThemeDropdownMenuRadioGroup`, the theme-selection radio group.",
1253
+ "summary": "The canonical light/dark toggle for headers and toolbars, plus the same toggle as one item for account menus.",
1254
+ "jsdoc": "The canonical theme control for headers and toolbars: an `IconButton` (ghost by default) that shows the applied theme and flips between light and dark on each click.",
1255
1255
  "examples": [
1256
- "Composition:\n```\nThemeSwitcher.Root\n├── ThemeSwitcher.Trigger\n└── ThemeSwitcher.Content\n```",
1257
- "```tsx\n<ThemeProvider>\n <header>\n <ThemeSwitcher.Root>\n <ThemeSwitcher.Trigger />\n <ThemeSwitcher.Content />\n </ThemeSwitcher.Root>\n </header>\n</ThemeProvider>\n```"
1256
+ "```tsx\n<ThemeProvider>\n <header>\n <ThemeSwitcher />\n </header>\n</ThemeProvider>\n```",
1257
+ "```tsx\n<ThemeSwitcher appearance=\"outlined\" label=\"Cambiar tema\" />\n```"
1258
1258
  ]
1259
1259
  },
1260
1260
  {
@@ -1,10 +1,9 @@
1
- import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
- import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
4
- import { r as ButtonProps } from "./button-mzUR1U0Y.js";
5
- import { n as IconButtonProps, r as IconButtonAppearance } from "./button-BZT5f79d.js";
1
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
+ import { t as SvgAttributes } from "./icon-CgNqu-fl.js";
4
+ import { r as ButtonProps } from "./button-BOCRKR5v.js";
5
+ import { n as IconButtonProps, r as IconButtonAppearance } from "./button-BFAvonp1.js";
6
6
  import { ComponentProps, ReactNode } from "react";
7
- //#region src/components/alert/alert.d.ts
8
7
  declare const intents: readonly ["danger", "important", "info", "success", "warning"];
9
8
  type AlertIntent = (typeof intents)[number];
10
9
  declare const appearances: readonly ["banner", "default"];
@@ -405,5 +404,4 @@ declare const Alert: {
405
404
  */
406
405
  readonly Title: typeof Title;
407
406
  };
408
- //#endregion
409
407
  export { Alert as t };
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./icon-BudQMD2S.js";import{t as a}from"./slot-DdYN1L1C.js";import{t as o}from"./css-properties-D85fCNV3.js";import{t as s}from"./button-b2HKEIE2.js";import{t as c}from"./button-Bkl_QYpp.js";import{n as l,r as u}from"./alert-DO00UiQe.js";import{c as d}from"react/compiler-runtime";import{CaretDownIcon as f}from"@phosphor-icons/react/CaretDown";import{createContext as p,useContext as m,useEffect as h,useRef as g}from"react";import _ from"tiny-invariant";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{CheckCircleIcon as b}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as x}from"@phosphor-icons/react/Info";import{MegaphoneIcon as S}from"@phosphor-icons/react/Megaphone";import{WarningIcon as C}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as w}from"@phosphor-icons/react/WarningDiamond";import{XIcon as T}from"@phosphor-icons/react/X";import{cva as E}from"class-variance-authority";const D=p(null),O=/* @__PURE__ */ v(T,{});function k(){let e=m(D);return _(e,`useAlertContext hook used outside of Alert parent!`),e}const A=e=>{let t=d(6),{children:n,intent:r,redirectDismissFocus:i}=e,a=i===void 0||i,o;t[0]!==r||t[1]!==a?(o={intent:r,redirectDismissFocus:a},t[0]=r,t[1]=a,t[2]=o):o=t[2];let s=o,c;return t[3]!==n||t[4]!==s?(c=/* @__PURE__ */ v(D.Provider,{value:s,children:n}),t[3]=n,t[4]=s,t[5]=c):c=t[5],c},j=E(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{intent:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a:not([data-slot~=button])]:text-danger-700 [&_a:not([data-slot~=button])]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a:not([data-slot~=button])]:text-important-700 [&_a:not([data-slot~=button])]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a:not([data-slot~=button])]:text-info-700 [&_a:not([data-slot~=button])]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a:not([data-slot~=button])]:text-success-700 [&_a:not([data-slot~=button])]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a:not([data-slot~=button])]:text-warning-700 [&_a:not([data-slot~=button])]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),M=e=>{let t=d(26),i,a,s,c,l,u,f;t[0]===e?(i=t[1],a=t[2],s=t[3],c=t[4],l=t[5],u=t[6],f=t[7]):({"data-slot":a,appearance:f,className:i,intent:s,ref:l,style:u,...c}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=f);let p=f===void 0?`default`:f,m;t[8]===a?m=t[9]:(m=r(a,`alert`),t[8]=a,t[9]=m);let h;t[10]!==p||t[11]!==i||t[12]!==s?(h=n(j({appearance:p,intent:s}),`has-data-alert-dismiss:pr-10`,`has-data-alert-expand:[&_[data-slot~=alert-dismiss-icon-button]]:right-16`,`md:has-data-alert-expand:[&_[data-slot~=alert-dismiss-icon-button]]:right-24`,`has-data-alert-expand:[&_[data-slot~=alert-content]]:pr-12`,`md:has-data-alert-expand:[&_[data-slot~=alert-content]]:pr-[5.5rem]`,i),t[10]=p,t[11]=i,t[12]=s,t[13]=h):h=t[13];let g;t[14]!==s||t[15]!==u?(g=o({"--alert-control-color":R(s),"--alert-control-hover-color":z(s),"--alert-control-hover-bg":B(s),...u}),t[14]=s,t[15]=u,t[16]=g):g=t[16];let _;t[17]!==c||t[18]!==l||t[19]!==m||t[20]!==h||t[21]!==g?(_=/* @__PURE__ */ v(`div`,{ref:l,"data-slot":m,className:h,style:g,...c}),t[17]=c,t[18]=l,t[19]=m,t[20]=h,t[21]=g,t[22]=_):_=t[22];let y;return t[23]!==s||t[24]!==_?(y=/* @__PURE__ */ v(A,{intent:s,children:_}),t[23]=s,t[24]=_,t[25]=y):y=t[25],y},N={danger:/* @__PURE__ */ v(C,{}),important:/* @__PURE__ */ v(S,{mirrored:!0}),info:/* @__PURE__ */ v(x,{}),success:/* @__PURE__ */ v(b,{}),warning:/* @__PURE__ */ v(w,{})},P=e=>{let t=d(16),a,o,s,c,l;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,className:a,ref:c,svg:l,...s}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=k(),f=N[u.intent],p;t[6]===o?p=t[7]:(p=r(o,`alert-icon`),t[6]=o,t[7]=p);let m;t[8]===a?m=t[9]:(m=n(`size-5`,a),t[8]=a,t[9]=m);let h=l??f,g;return t[10]!==s||t[11]!==c||t[12]!==p||t[13]!==m||t[14]!==h?(g=/* @__PURE__ */ v(i,{ref:c,"data-slot":p,className:m,svg:h,...s}),t[10]=s,t[11]=c,t[12]=p,t[13]=m,t[14]=h,t[15]=g):g=t[15],g},F=e=>{let t=d(14),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({"data-slot":a,className:i,ref:s,...o}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let c;t[5]===a?c=t[6]:(c=r(a,`alert-content`),t[5]=a,t[6]=c);let l;t[7]===i?l=t[8]:(l=n(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,i),t[7]=i,t[8]=l);let u;return t[9]!==o||t[10]!==s||t[11]!==c||t[12]!==l?(u=/* @__PURE__ */ v(`div`,{ref:s,"data-slot":c,className:l,...o}),t[9]=o,t[10]=s,t[11]=c,t[12]=l,t[13]=u):u=t[13],u},I=e=>{let t=d(16),i,o,s,c,l;t[0]===e?(i=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,asChild:l,className:i,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=l!==void 0&&l?a:`h5`,f;t[6]===o?f=t[7]:(f=r(o,`alert-title`),t[6]=o,t[7]=f);let p;t[8]===i?p=t[9]:(p=n(`font-medium`,i),t[8]=i,t[9]=p);let m;return t[10]!==u||t[11]!==s||t[12]!==c||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ v(u,{ref:c,"data-slot":f,className:p,...s}),t[10]=u,t[11]=s,t[12]=c,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},L=e=>{let t=d(16),i,o,s,c,l;t[0]===e?(i=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,asChild:l,className:i,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=l!==void 0&&l?a:`div`,f;t[6]===o?f=t[7]:(f=r(o,`alert-description`),t[6]=o,t[7]=f);let p;t[8]===i?p=t[9]:(p=n(`text-sm`,i),t[8]=i,t[9]=p);let m;return t[10]!==u||t[11]!==s||t[12]!==c||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ v(u,{ref:c,"data-slot":f,className:p,...s}),t[10]=u,t[11]=s,t[12]=c,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},R=e=>`var(--color-${e}-700)`,z=e=>`var(--color-${e}-800)`,B=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`;function V(t){let n=d(8),{buttonRef:r,enabled:i}=t,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[0]=a):a=n[0];let o=g(a),s,c;n[1]!==r||n[2]!==i?(s=()=>{if(i)return()=>{let e=r.current;if(e==null||document.activeElement!==e)return;let t=e.closest(`[data-slot~="alert"]`)??e;o.current=l(t)}},c=[r,i],n[1]=r,n[2]=i,n[3]=s,n[4]=c):(s=n[3],c=n[4]),e(s,c);let f,p;n[5]===i?(f=n[6],p=n[7]):(f=()=>{if(i)return()=>{let e=o.current;if(o.current=[],e.length===0)return;let{activeElement:t}=document;if(t==null||t===document.body){for(let t of e)if(t.isConnected&&u(t)&&(t.focus(),document.activeElement===t))return}}},p=[i],n[5]=i,n[6]=f,n[7]=p),h(f,p)}const H={Root:M,Content:F,ExpandButton:e=>{let t=d(25),i,a,o,c,l;t[0]===e?(i=t[1],a=t[2],o=t[3],c=t[4],l=t[5]):({"data-slot":o,count:a,expanded:c,className:i,...l}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=c,t[5]=l);let u=c?`Collapse additional alerts`:`Show ${a} more ${a===1?`alert`:`alerts`}`,p;t[6]===o?p=t[7]:(p=r(o,`alert-expand-button`),t[6]=o,t[7]=p);let m=c&&`-rotate-180`,h;t[8]===m?h=t[9]:(h=n(`size-4 transition-transform ease-out duration-150`,m),t[8]=m,t[9]=h);let g;t[10]===h?g=t[11]:(g=/* @__PURE__ */ v(f,{weight:`bold`,className:h}),t[10]=h,t[11]=g);let _;t[12]===i?_=t[13]:(_=n(`right-1.5 top-1.5 absolute gap-1 ps-1.5 pe-1`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,i),t[12]=i,t[13]=_);let b;t[14]===a?b=t[15]:(b=/* @__PURE__ */ y(`span`,{className:`min-w-[2ch] text-center tabular-nums`,children:[`+`,a]}),t[14]=a,t[15]=b);let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=/* @__PURE__ */ v(`span`,{className:`hidden md:inline`,children:`more`}),t[16]=x):x=t[16];let S;return t[17]!==c||t[18]!==l||t[19]!==u||t[20]!==p||t[21]!==g||t[22]!==_||t[23]!==b?(S=/* @__PURE__ */ y(s,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"aria-expanded":c,"aria-label":u,"data-slot":p,"data-alert-expand":!0,icon:g,iconPlacement:`end`,className:_,...l,children:[b,x]}),t[17]=c,t[18]=l,t[19]=u,t[20]=p,t[21]=g,t[22]=_,t[23]=b,t[24]=S):S=t[24],S},Description:L,DismissIconButton:e=>{let i=d(26),a,o,s,l,u,f,p,h,_;i[0]===e?(a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],f=i[6],p=i[7],h=i[8],_=i[9]):({"data-slot":o,size:u,type:f,label:p,appearance:h,className:a,icon:_,ref:l,...s}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=l,i[5]=u,i[6]=f,i[7]=p,i[8]=h,i[9]=_);let y=u===void 0?`sm`:u,b=f===void 0?`button`:f,x=p===void 0?`Dismiss Alert`:p,S=h===void 0?`ghost`:h,C=_===void 0?O:_,w=m(D),T=g(null),E=t(T,l),k=w?.redirectDismissFocus??!0,A;i[10]===k?A=i[11]:(A={buttonRef:T,enabled:k},i[10]=k,i[11]=A),V(A);let j;i[12]===o?j=i[13]:(j=r(o,`alert-dismiss-icon-button`),i[12]=o,i[13]=j);let M;i[14]===a?M=i[15]:(M=n(`right-1.5 top-1.5 absolute`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,a),i[14]=a,i[15]=M);let N;return i[16]!==S||i[17]!==E||i[18]!==C||i[19]!==x||i[20]!==s||i[21]!==y||i[22]!==j||i[23]!==M||i[24]!==b?(N=/* @__PURE__ */ v(c,{ref:E,appearance:S,icon:C,intent:`neutral`,label:x,size:y,"data-slot":j,"data-alert-dismiss":!0,className:M,type:b,...s}),i[16]=S,i[17]=E,i[18]=C,i[19]=x,i[20]=s,i[21]=y,i[22]=j,i[23]=M,i[24]=b,i[25]=N):N=i[25],N},Icon:P,Title:I};export{A as n,H as t};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./icon-BudQMD2S.js";import{t as a}from"./slot-DdYN1L1C.js";import{t as o}from"./css-properties-D85fCNV3.js";import{t as s}from"./button-CZ-q7fYv.js";import{t as c}from"./button-Cwrv2Mwv.js";import{n as l,r as u}from"./alert-DO00UiQe.js";import{c as d}from"react/compiler-runtime";import{CaretDownIcon as f}from"@phosphor-icons/react/CaretDown";import{createContext as p,useContext as m,useEffect as h,useRef as g}from"react";import _ from"tiny-invariant";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{CheckCircleIcon as b}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as x}from"@phosphor-icons/react/Info";import{MegaphoneIcon as S}from"@phosphor-icons/react/Megaphone";import{WarningIcon as C}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as w}from"@phosphor-icons/react/WarningDiamond";import{XIcon as T}from"@phosphor-icons/react/X";import{cva as E}from"class-variance-authority";const D=p(null),O=/* @__PURE__ */ v(T,{});function k(){let e=m(D);return _(e,`useAlertContext hook used outside of Alert parent!`),e}const A=e=>{let t=d(6),{children:n,intent:r,redirectDismissFocus:i}=e,a=i===void 0||i,o;t[0]!==r||t[1]!==a?(o={intent:r,redirectDismissFocus:a},t[0]=r,t[1]=a,t[2]=o):o=t[2];let s=o,c;return t[3]!==n||t[4]!==s?(c=/* @__PURE__ */ v(D.Provider,{value:s,children:n}),t[3]=n,t[4]=s,t[5]=c):c=t[5],c},j=E(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{intent:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a:not([data-slot~=button])]:text-danger-700 [&_a:not([data-slot~=button])]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a:not([data-slot~=button])]:text-important-700 [&_a:not([data-slot~=button])]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a:not([data-slot~=button])]:text-info-700 [&_a:not([data-slot~=button])]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a:not([data-slot~=button])]:text-success-700 [&_a:not([data-slot~=button])]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a:not([data-slot~=button])]:text-warning-700 [&_a:not([data-slot~=button])]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),M=e=>{let t=d(26),i,a,s,c,l,u,f;t[0]===e?(i=t[1],a=t[2],s=t[3],c=t[4],l=t[5],u=t[6],f=t[7]):({"data-slot":a,appearance:f,className:i,intent:s,ref:l,style:u,...c}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=f);let p=f===void 0?`default`:f,m;t[8]===a?m=t[9]:(m=r(a,`alert`),t[8]=a,t[9]=m);let h;t[10]!==p||t[11]!==i||t[12]!==s?(h=n(j({appearance:p,intent:s}),`has-data-alert-dismiss:pr-10`,`has-data-alert-expand:[&_[data-slot~=alert-dismiss-icon-button]]:right-16`,`md:has-data-alert-expand:[&_[data-slot~=alert-dismiss-icon-button]]:right-24`,`has-data-alert-expand:[&_[data-slot~=alert-content]]:pr-12`,`md:has-data-alert-expand:[&_[data-slot~=alert-content]]:pr-[5.5rem]`,i),t[10]=p,t[11]=i,t[12]=s,t[13]=h):h=t[13];let g;t[14]!==s||t[15]!==u?(g=o({"--alert-control-color":R(s),"--alert-control-hover-color":z(s),"--alert-control-hover-bg":B(s),...u}),t[14]=s,t[15]=u,t[16]=g):g=t[16];let _;t[17]!==c||t[18]!==l||t[19]!==m||t[20]!==h||t[21]!==g?(_=/* @__PURE__ */ v(`div`,{ref:l,"data-slot":m,className:h,style:g,...c}),t[17]=c,t[18]=l,t[19]=m,t[20]=h,t[21]=g,t[22]=_):_=t[22];let y;return t[23]!==s||t[24]!==_?(y=/* @__PURE__ */ v(A,{intent:s,children:_}),t[23]=s,t[24]=_,t[25]=y):y=t[25],y},N={danger:/* @__PURE__ */ v(C,{}),important:/* @__PURE__ */ v(S,{mirrored:!0}),info:/* @__PURE__ */ v(x,{}),success:/* @__PURE__ */ v(b,{}),warning:/* @__PURE__ */ v(w,{})},P=e=>{let t=d(16),a,o,s,c,l;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,className:a,ref:c,svg:l,...s}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=k(),f=N[u.intent],p;t[6]===o?p=t[7]:(p=r(o,`alert-icon`),t[6]=o,t[7]=p);let m;t[8]===a?m=t[9]:(m=n(`size-5`,a),t[8]=a,t[9]=m);let h=l??f,g;return t[10]!==s||t[11]!==c||t[12]!==p||t[13]!==m||t[14]!==h?(g=/* @__PURE__ */ v(i,{ref:c,"data-slot":p,className:m,svg:h,...s}),t[10]=s,t[11]=c,t[12]=p,t[13]=m,t[14]=h,t[15]=g):g=t[15],g},F=e=>{let t=d(14),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({"data-slot":a,className:i,ref:s,...o}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let c;t[5]===a?c=t[6]:(c=r(a,`alert-content`),t[5]=a,t[6]=c);let l;t[7]===i?l=t[8]:(l=n(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,i),t[7]=i,t[8]=l);let u;return t[9]!==o||t[10]!==s||t[11]!==c||t[12]!==l?(u=/* @__PURE__ */ v(`div`,{ref:s,"data-slot":c,className:l,...o}),t[9]=o,t[10]=s,t[11]=c,t[12]=l,t[13]=u):u=t[13],u},I=e=>{let t=d(16),i,o,s,c,l;t[0]===e?(i=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,asChild:l,className:i,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=l!==void 0&&l?a:`h5`,f;t[6]===o?f=t[7]:(f=r(o,`alert-title`),t[6]=o,t[7]=f);let p;t[8]===i?p=t[9]:(p=n(`font-medium`,i),t[8]=i,t[9]=p);let m;return t[10]!==u||t[11]!==s||t[12]!==c||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ v(u,{ref:c,"data-slot":f,className:p,...s}),t[10]=u,t[11]=s,t[12]=c,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},L=e=>{let t=d(16),i,o,s,c,l;t[0]===e?(i=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({"data-slot":o,asChild:l,className:i,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u=l!==void 0&&l?a:`div`,f;t[6]===o?f=t[7]:(f=r(o,`alert-description`),t[6]=o,t[7]=f);let p;t[8]===i?p=t[9]:(p=n(`text-sm`,i),t[8]=i,t[9]=p);let m;return t[10]!==u||t[11]!==s||t[12]!==c||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ v(u,{ref:c,"data-slot":f,className:p,...s}),t[10]=u,t[11]=s,t[12]=c,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},R=e=>`var(--color-${e}-700)`,z=e=>`var(--color-${e}-800)`,B=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`;function V(t){let n=d(8),{buttonRef:r,enabled:i}=t,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[0]=a):a=n[0];let o=g(a),s,c;n[1]!==r||n[2]!==i?(s=()=>{if(i)return()=>{let e=r.current;if(e==null||document.activeElement!==e)return;let t=e.closest(`[data-slot~="alert"]`)??e;o.current=l(t)}},c=[r,i],n[1]=r,n[2]=i,n[3]=s,n[4]=c):(s=n[3],c=n[4]),e(s,c);let f,p;n[5]===i?(f=n[6],p=n[7]):(f=()=>{if(i)return()=>{let e=o.current;if(o.current=[],e.length===0)return;let{activeElement:t}=document;if(t==null||t===document.body){for(let t of e)if(t.isConnected&&u(t)&&(t.focus(),document.activeElement===t))return}}},p=[i],n[5]=i,n[6]=f,n[7]=p),h(f,p)}const H={Root:M,Content:F,ExpandButton:e=>{let t=d(25),i,a,o,c,l;t[0]===e?(i=t[1],a=t[2],o=t[3],c=t[4],l=t[5]):({"data-slot":o,count:a,expanded:c,className:i,...l}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=c,t[5]=l);let u=c?`Collapse additional alerts`:`Show ${a} more ${a===1?`alert`:`alerts`}`,p;t[6]===o?p=t[7]:(p=r(o,`alert-expand-button`),t[6]=o,t[7]=p);let m=c&&`-rotate-180`,h;t[8]===m?h=t[9]:(h=n(`size-4 transition-transform duration-200 ease-out-strong motion-reduce:transition-none`,m),t[8]=m,t[9]=h);let g;t[10]===h?g=t[11]:(g=/* @__PURE__ */ v(f,{weight:`bold`,className:h}),t[10]=h,t[11]=g);let _;t[12]===i?_=t[13]:(_=n(`right-1.5 top-1.5 absolute gap-1 ps-1.5 pe-1`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,i),t[12]=i,t[13]=_);let b;t[14]===a?b=t[15]:(b=/* @__PURE__ */ y(`span`,{className:`min-w-[2ch] text-center tabular-nums`,children:[`+`,a]}),t[14]=a,t[15]=b);let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=/* @__PURE__ */ v(`span`,{className:`hidden md:inline`,children:`more`}),t[16]=x):x=t[16];let S;return t[17]!==c||t[18]!==l||t[19]!==u||t[20]!==p||t[21]!==g||t[22]!==_||t[23]!==b?(S=/* @__PURE__ */ y(s,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"aria-expanded":c,"aria-label":u,"data-slot":p,"data-alert-expand":!0,icon:g,iconPlacement:`end`,className:_,...l,children:[b,x]}),t[17]=c,t[18]=l,t[19]=u,t[20]=p,t[21]=g,t[22]=_,t[23]=b,t[24]=S):S=t[24],S},Description:L,DismissIconButton:e=>{let i=d(26),a,o,s,l,u,f,p,h,_;i[0]===e?(a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],f=i[6],p=i[7],h=i[8],_=i[9]):({"data-slot":o,size:u,type:f,label:p,appearance:h,className:a,icon:_,ref:l,...s}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=l,i[5]=u,i[6]=f,i[7]=p,i[8]=h,i[9]=_);let y=u===void 0?`sm`:u,b=f===void 0?`button`:f,x=p===void 0?`Dismiss Alert`:p,S=h===void 0?`ghost`:h,C=_===void 0?O:_,w=m(D),T=g(null),E=t(T,l),k=w?.redirectDismissFocus??!0,A;i[10]===k?A=i[11]:(A={buttonRef:T,enabled:k},i[10]=k,i[11]=A),V(A);let j;i[12]===o?j=i[13]:(j=r(o,`alert-dismiss-icon-button`),i[12]=o,i[13]=j);let M;i[14]===a?M=i[15]:(M=n(`right-1.5 top-1.5 absolute`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,a),i[14]=a,i[15]=M);let N;return i[16]!==S||i[17]!==E||i[18]!==C||i[19]!==x||i[20]!==s||i[21]!==y||i[22]!==j||i[23]!==M||i[24]!==b?(N=/* @__PURE__ */ v(c,{ref:E,appearance:S,icon:C,intent:`neutral`,label:x,size:y,"data-slot":j,"data-alert-dismiss":!0,className:M,type:b,...s}),i[16]=S,i[17]=E,i[18]=C,i[19]=x,i[20]=s,i[21]=y,i[22]=j,i[23]=M,i[24]=b,i[25]=N):N=i[25],N},Icon:P,Title:I};export{A as n,H as t};
@@ -1,7 +1,6 @@
1
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
- import { t as Alert } from "./alert-CTAmHdLa.js";
1
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
+ import { t as Alert } from "./alert-BV0VWU2o.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
- //#region src/components/alert-center/alert-center.d.ts
5
4
  /**
6
5
  * The tone an alert's color communicates — identical to `Alert`'s intent axis,
7
6
  * so an item's `intent` flows straight through to the `Alert` chrome that
@@ -665,5 +664,4 @@ declare const AlertCenter: {
665
664
  */
666
665
  readonly DismissIconButton: typeof DismissIconButton;
667
666
  };
668
- //#endregion
669
667
  export { AlertCenter, type AlertCenterIntent, type AlertCenterItemProps, type AlertCenterRootProps };
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{n as i,t as a}from"./alert-xJELJxL4.js";import{c as o}from"react/compiler-runtime";import{createContext as s,useContext as c,useEffect as l,useId as u,useReducer as d,useRef as f,useState as p,useSyncExternalStore as m}from"react";import h from"tiny-invariant";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{createPortal as v}from"react-dom";const y={danger:5,warning:4,important:3,info:2,success:1};function b(e,t){if(t.parentElement===e)return!1;if(typeof e.moveBefore==`function`&&t.isConnected&&e.isConnected)try{return e.moveBefore(t,null),!0}catch{}return e.appendChild(t),!0}function x(e){return e.replace(/\s+/g,` `).trim()}function S(e){let t=e.querySelector(`[data-slot~="alert-title"]`);if(t==null)return``;let n=t.cloneNode(!0);if(!(n instanceof Element))return x(t.textContent??``);for(let e of n.querySelectorAll(`button`))e.remove();let r=x(n.textContent??``);for(let e of n.querySelectorAll(`a`))e.remove();let i=x(n.textContent??``);return i===``?r:i}function C(e){return e.toSorted((e,t)=>y[t.intent]-y[e.intent]||w(e.order,t.order)||e.sequence-t.sequence)}function w(e,t){return e===t?0:e==null?1:t==null||e<t?-1:1}function T(e,t){if(t===0)return``;if(e===``)return`${t} alert${t===1?``:`s`}`;let n=t-1;return n===0?e:`${e}, and ${n} more alert${n===1?``:`s`}`}const E=[];var D=class{#e=/* @__PURE__ */ new Set;#t=/* @__PURE__ */ new Map;#n=/* @__PURE__ */ new Map;#r=/* @__PURE__ */ new Map;#i=0;#a=E;#o=``;#s=!1;getHost(e){let t=this.#r.get(e);if(t!=null)return t;let n=document.createElement(`div`);return n.style.display=`contents`,n.setAttribute(`data-slot`,`alert-center-item-host`),n.setAttribute(`data-alert-host`,e),this.#r.set(e,n),n}#c=null;captureHostSnapshot(e){if(e!==this.#a[0]?.id)return;let t=this.#r.get(e);t!=null&&t.firstElementChild?.hasChildNodes()===!0&&(this.#c={id:e,content:t.cloneNode(!0)})}getHostSnapshot=e=>this.#c?.id===e?this.#c.content:null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#a;hasAlert=e=>this.#t.has(e);getTopLabel=()=>this.#o;setTopLabel(e){this.#o!==e&&(this.#o=e,this.#p())}#l=null;requestFocusRestore(e){this.#l=e}flushFocusRestore(){let e=this.#l;e!=null&&e.isConnected&&(this.#l=null,document.activeElement!==e&&e.focus({preventScroll:!0}))}#u=null;#d=0;getPlacementVersion=()=>this.#d;notifyPlacementChange(){this.#d++,this.#p()}setBarElement(e){this.#u=e}getBarElement=()=>this.#u;getContentMounted=()=>this.#s;setContentMounted(e){this.#s!==e&&(this.#s=e,this.#p())}register(e){h(!this.#t.has(e.id),`AlertCenter.Item id "${e.id}" is already registered by another mounted item — ids must be unique under one <AlertCenter.Root>. Render one item per id, or give each alert its own id.`);let t=this.#n.get(e.id)??this.#i++;this.#n.set(e.id,t);let n={...e,sequence:t};return this.#t.set(e.id,n),this.#f(),()=>{this.#t.get(e.id)===n&&(this.#t.delete(e.id),this.#f())}}#f(){this.#a=C([...this.#t.values()]),this.#p()}#p(){for(let e of this.#e)e()}};const O=s(null),k=s(null);function A(e){let t=c(O);return h(t,`${e} must be rendered inside <AlertCenter.Root>.`),t}function ee(e){let t=c(k);return h(t,`${e} must be rendered inside <AlertCenter.Root>.`),t}const te=e=>m(e.subscribe,e.getSnapshot,e.getSnapshot),j=s(!1);function M(e){let t=o(5),{store:n}=e,r=te(n),i=m(n.subscribe,n.getTopLabel,n.getTopLabel),a;t[0]!==r.length||t[1]!==i?(a=T(i,r.length),t[0]=r.length,t[1]=i,t[2]=a):a=t[2];let s;return t[3]===a?s=t[4]:(s=/* @__PURE__ */ g(`div`,{"data-slot":`alert-center-announcer`,className:`sr-only`,role:`status`,"aria-live":`polite`,children:a}),t[3]=a,t[4]=s),s}const N=e=>{let t=o(18),{children:n,defaultOpen:r,onOpenChange:i,open:a}=e,[s]=p(U),c=u(),[l,d]=p(r??!1),f=a??l,m;t[0]!==i||t[1]!==a?(m=e=>{a??d(e),i?.(e)},t[0]=i,t[1]=a,t[2]=m):m=t[2];let h=m,v;t[3]!==c||t[4]!==s?(v={store:s,contentId:c},t[3]=c,t[4]=s,t[5]=v):v=t[5];let y=v,b;t[6]!==f||t[7]!==h?(b={isExpanded:f,setExpanded:h},t[6]=f,t[7]=h,t[8]=b):b=t[8];let x=b,S;t[9]!==n||t[10]!==x?(S=/* @__PURE__ */ g(k.Provider,{value:x,children:n}),t[9]=n,t[10]=x,t[11]=S):S=t[11];let C;t[12]===s?C=t[13]:(C=/* @__PURE__ */ g(M,{store:s}),t[12]=s,t[13]=C);let w;return t[14]!==y||t[15]!==S||t[16]!==C?(w=/* @__PURE__ */ _(O.Provider,{value:y,children:[S,C]}),t[14]=y,t[15]=S,t[16]=C,t[17]=w):w=t[17],w},P=t=>{let n=o(22),{children:r,className:a,id:s,intent:l,order:u}=t,{store:d}=A(`AlertCenter.Item`),f=c(j);h(!f,`AlertCenter.Item cannot be rendered inside another item's children.`);let[m,_]=p(null),y,b;n[0]!==s||n[1]!==d?(y=()=>{_(d.getHost(s))},b=[d,s],n[0]=s,n[1]=d,n[2]=y,n[3]=b):(y=n[2],b=n[3]),e(y,b);let x,S;n[4]!==a||n[5]!==s||n[6]!==l||n[7]!==u||n[8]!==d?(x=()=>d.register({id:s,intent:l,className:a,order:u}),S=[d,s,l,a,u],n[4]=a,n[5]=s,n[6]=l,n[7]=u,n[8]=d,n[9]=x,n[10]=S):(x=n[9],S=n[10]),e(x,S);let C;if(n[11]!==s||n[12]!==d?(C=()=>{d.captureHostSnapshot(s)},n[11]=s,n[12]=d,n[13]=C):C=n[13],e(C),m==null)return null;let w;n[14]===r?w=n[15]:(w=/* @__PURE__ */ g(j.Provider,{value:!0,children:/* @__PURE__ */ g(`div`,{className:`contents`,"data-slot":`alert-center-item-label`,children:r})}),n[14]=r,n[15]=w);let T;n[16]!==l||n[17]!==w?(T=/* @__PURE__ */ g(i,{intent:l,redirectDismissFocus:!1,children:w}),n[16]=l,n[17]=w,n[18]=T):T=n[18];let E;return n[19]!==m||n[20]!==T?(E=v(T,m),n[19]=m,n[20]=T,n[21]=E):E=n[21],E},F=n=>{let i=o(14),s,l,u,d;i[0]===n?(s=i[1],l=i[2],u=i[3],d=i[4]):({"data-slot":s,label:l,ref:d,...u}=n,i[0]=n,i[1]=s,i[2]=l,i[3]=u,i[4]=d);let _=c(j);h(_,`AlertCenter.DismissIconButton must be composed inside an <AlertCenter.Item>'s children.`);let{store:v}=A(`AlertCenter.DismissIconButton`);m(v.subscribe,v.getPlacementVersion,v.getPlacementVersion);let y=f(null),b=t(y,d),[x,C]=p(null),w;i[5]===l?w=i[6]:(w=()=>{if(l!=null)return;let e=y.current?.closest(`[data-alert-id]`),t=e==null?``:S(e);C(t===``?null:`Dismiss ${t}`)},i[5]=l,i[6]=w),e(w);let T=l??x??void 0,E;i[7]===s?E=i[8]:(E=r(s,`alert-center-dismiss-icon-button`),i[7]=s,i[8]=E);let D;return i[9]!==b||i[10]!==u||i[11]!==T||i[12]!==E?(D=/* @__PURE__ */ g(a.DismissIconButton,{ref:b,label:T,...u,"data-slot":E}),i[9]=b,i[10]=u,i[11]=T,i[12]=E,i[13]=D):D=i[13],D};function I(e,t){switch(t){case`show`:return`open`;case`hide`:return e===`closed`?`closed`:`closing`;case`exited`:return e===`closing`?`closed`:e}}function L(t){let n=o(10),{present:r}=t,[i,a]=d(I,r?`open`:`closed`),s,c;n[0]===r?(s=n[1],c=n[2]):(s=()=>{a(r?`show`:`hide`)},c=[r],n[0]=r,n[1]=s,n[2]=c),e(s,c);let u,f;n[3]===i?(u=n[4],f=n[5]):(u=()=>{if(i!==`closing`)return;let e=window.setTimeout(()=>a(`exited`),200);return()=>window.clearTimeout(e)},f=[i],n[3]=i,n[4]=u,n[5]=f),l(u,f);let p;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{e.target===e.currentTarget&&e.propertyName===`height`&&a(`exited`)},n[6]=p):p=n[6];let m=p,h=i!==`closed`,g=i===`open`?`open`:`closed`,_;return n[7]!==h||n[8]!==g?(_={isMounted:h,dataState:g,onExitTransitionEnd:m},n[7]=h,n[8]=g,n[9]=_):_=n[9],_}function R(t){let n=o(5),{containerRef:r,isAttached:i}=t,a=f(null),s,c;n[0]!==r||n[1]!==i?(s=()=>{let e=r.current;if(!i||e==null)return;let t=e=>{e.target instanceof Element&&(a.current=e.target)},n=t=>{t.relatedTarget instanceof Node&&!e.contains(t.relatedTarget)&&(a.current=null)};return e.addEventListener(`focusin`,t),e.addEventListener(`focusout`,n),()=>{e.removeEventListener(`focusin`,t),e.removeEventListener(`focusout`,n)}},c=[r,i],n[0]=r,n[1]=i,n[2]=s,n[3]=c):(s=n[2],c=n[3]),e(s,c);let l;return n[4]===Symbol.for(`react.memo_cache_sentinel`)?(l={lastFocusedWithinRef:a},n[4]=l):l=n[4],l}function z(){let e=document.querySelector(`main, [role="main"]`);e!=null&&(e.hasAttribute(`tabindex`)||(e.tabIndex=-1),e.focus({preventScroll:!0}))}function B(t){let n=o(10),{isMounted:r,store:i,topId:a}=t,s=f(null),c;n[0]===r?c=n[1]:(c={containerRef:s,isAttached:r},n[0]=r,n[1]=c);let{lastFocusedWithinRef:l}=R(c),u=f(a),d;n[2]!==l||n[3]!==i||n[4]!==a?(d=()=>{let e=u.current;if(u.current=a,e==null||a===e)return;let t=l.current;if(i.hasAlert(e)){t instanceof HTMLElement&&document.activeElement!==t&&i.requestFocusRestore(t);return}if(t==null||t.isConnected)return;l.current=null;let n=s.current;a==null?z():n!=null&&(n.querySelector(`[data-alert-dismiss], [data-alert-expand]`)??n).focus()},n[2]=l,n[3]=i,n[4]=a,n[5]=d):d=n[5];let p;n[6]!==i||n[7]!==a?(p=[i,a],n[6]=i,n[7]=a,n[8]=p):p=n[8],e(d,p);let m;return n[9]===Symbol.for(`react.memo_cache_sentinel`)?(m={wrapperRef:s},n[9]=m):m=n[9],m}const V=`gap-2 py-2 pr-2 [&_[data-slot~=alert-icon]]:shrink-0`,H={Root:N,Bar:t=>{let i=o(62),s,c,l,u;i[0]===t?(s=i[1],c=i[2],l=i[3],u=i[4]):({className:s,"data-slot":c,ref:u,...l}=t,i[0]=t,i[1]=s,i[2]=c,i[3]=l,i[4]=u);let{store:d,contentId:h}=A(`AlertCenter.Bar`),{isExpanded:v,setExpanded:y}=ee(`AlertCenter.Bar`),x=te(d),C=m(d.subscribe,d.getContentMounted,d.getContentMounted),w=x[0]??null,T=w!=null,E;i[5]===T?E=i[6]:(E={present:T},i[5]=T,i[6]=E);let{isMounted:D,dataState:O,onExitTransitionEnd:k}=L(E),[j,M]=p(w);w!=null&&w!==j&&M(w);let N=w??j,P=f(null),F;i[7]!==N||i[8]!==d||i[9]!==w?(F=()=>{let e=P.current;if(e==null)return;if(w!=null){let t=d.getHost(w.id);t.parentElement!==e&&e.childNodes.length>0&&e.replaceChildren(),b(e,t)&&d.notifyPlacementChange(),d.flushFocusRestore();return}let t=N==null?null:d.getHostSnapshot(N.id);t!=null&&t.parentNode!==e&&e.replaceChildren(t)},i[7]=N,i[8]=d,i[9]=w,i[10]=F):F=i[10],e(F);let I=w?.id,R;i[11]!==D||i[12]!==d||i[13]!==I?(R={isMounted:D,store:d,topId:I},i[11]=D,i[12]=d,i[13]=I,i[14]=R):R=i[14];let{wrapperRef:z}=B(R),H;i[15]!==T||i[16]!==d||i[17]!==z?(H=()=>{let e=z.current;d.setTopLabel(T&&e!=null?S(e):``)},i[15]=T,i[16]=d,i[17]=z,i[18]=H):H=i[18],e(H);let U;i[19]!==T||i[20]!==d||i[21]!==z?(U=()=>{let e=z.current;if(e==null)return;let t=new MutationObserver(()=>{d.setTopLabel(T?S(e):``)});return t.observe(e,{subtree:!0,childList:!0,characterData:!0}),()=>{t.disconnect()}},i[19]=T,i[20]=d,i[21]=z,i[22]=U):U=i[22];let W;i[23]!==D||i[24]!==T||i[25]!==d?(W=[d,T,D],i[23]=D,i[24]=T,i[25]=d,i[26]=W):W=i[26],e(U,W);let G,K;i[27]===d?(G=i[28],K=i[29]):(G=()=>()=>{d.setTopLabel(``)},K=[d],i[27]=d,i[28]=G,i[29]=K),e(G,K);let q;i[30]!==d||i[31]!==z?(q=()=>{d.setBarElement(z.current)},i[30]=d,i[31]=z,i[32]=q):q=i[32],e(q);let J,Y;if(i[33]===d?(J=i[34],Y=i[35]):(J=()=>()=>{d.setBarElement(null)},Y=[d],i[33]=d,i[34]=J,i[35]=Y),e(J,Y),!D||N==null)return null;let ne=T?x.length-1:0,re=!T,ie=N.intent,X;i[36]!==N.className||i[37]!==s?(X=n(V,`not-has-data-[slot=alert-description]:[&_[data-alert-dismiss],&_[data-alert-expand]]:top-1/2 not-has-data-[slot=alert-description]:[&_[data-alert-dismiss],&_[data-alert-expand]]:-translate-y-1/2`,`has-data-alert-expand:[&_[data-alert-dismiss]]:right-16 md:has-data-alert-expand:[&_[data-alert-dismiss]]:right-24`,s,N.className),i[36]=N.className,i[37]=s,i[38]=X):X=i[38];let Z;i[39]===c?Z=i[40]:(Z=r(c,`alert-center-bar`),i[39]=c,i[40]=Z);let ae;i[41]===Symbol.for(`react.memo_cache_sentinel`)?(ae=/* @__PURE__ */ g(`div`,{ref:P,className:`contents`,"data-slot":`alert-center-bar-mount`}),i[41]=ae):ae=i[41];let Q;i[42]!==h||i[43]!==C||i[44]!==v||i[45]!==ne||i[46]!==y?(Q=ne>0&&C&&/* @__PURE__ */ g(a.ExpandButton,{count:ne,expanded:v,"aria-controls":h,onClick:()=>y(!v)}),i[42]=h,i[43]=C,i[44]=v,i[45]=ne,i[46]=y,i[47]=Q):Q=i[47];let $;i[48]!==N.id||i[49]!==N.intent||i[50]!==l||i[51]!==u||i[52]!==X||i[53]!==Z||i[54]!==Q?($=/* @__PURE__ */ _(a.Root,{ref:u,appearance:`banner`,intent:ie,className:X,...l,"data-slot":Z,"data-placement":`bar`,"data-alert-id":N.id,children:[ae,Q]}),i[48]=N.id,i[49]=N.intent,i[50]=l,i[51]=u,i[52]=X,i[53]=Z,i[54]=Q,i[55]=$):$=i[55];let oe;return i[56]!==O||i[57]!==k||i[58]!==re||i[59]!==$||i[60]!==z?(oe=/* @__PURE__ */ g(`div`,{ref:z,"data-slot":`alert-center-bar-wrapper`,tabIndex:-1,inert:re,className:`shrink-0 overflow-hidden transition-[height,opacity] duration-200 ease-out [interpolate-size:allow-keywords] starting:h-0 starting:opacity-0 data-state-closed:h-0 data-state-closed:opacity-0 data-state-closed:duration-150 motion-reduce:transition-none`,"data-state":O,onTransitionEnd:k,children:$}),i[56]=O,i[57]=k,i[58]=re,i[59]=$,i[60]=z,i[61]=oe):oe=i[61],oe},Content:i=>{let a=o(38),s,c,l,u,d,p;a[0]===i?(s=a[1],c=a[2],l=a[3],u=a[4],d=a[5],p=a[6]):({"aria-label":p,"aria-labelledby":s,className:c,"data-slot":l,ref:d,...u}=i,a[0]=i,a[1]=s,a[2]=c,a[3]=l,a[4]=u,a[5]=d,a[6]=p);let m=p===void 0?`More alerts`:p,{store:h,contentId:_}=A(`AlertCenter.Content`),{isExpanded:v,setExpanded:y}=ee(`AlertCenter.Content`),x=te(h).slice(1),S=x.length>0,C,w;a[7]===h?(C=a[8],w=a[9]):(C=()=>(h.setContentMounted(!0),()=>{h.setContentMounted(!1)}),w=[h],a[7]=h,a[8]=C,a[9]=w),e(C,w);let T=f(S),E,D;a[10]!==S||a[11]!==v||a[12]!==y?(E=()=>{let e=T.current&&!S;T.current=S,e&&v&&y(!1)},D=[S,v,y],a[10]=S,a[11]=v,a[12]=y,a[13]=E,a[14]=D):(E=a[13],D=a[14]),e(E,D);let O=f(null),k=t(O,d),j;a[15]===S?j=a[16]:(j={containerRef:O,isAttached:S},a[15]=S,a[16]=j);let{lastFocusedWithinRef:M}=R(j),N=x.map(W).join(` `),P;a[17]===h?P=a[18]:(P=()=>{let e=O.current;if(e==null)return;let t=!1;for(let n of e.querySelectorAll(`[data-alert-mount]`)){let e=n.getAttribute(`data-alert-mount`);e!=null&&b(n,h.getHost(e))&&(t=!0)}t&&h.notifyPlacementChange(),h.flushFocusRestore()},a[17]=h,a[18]=P),e(P,[h,N]);let F;if(a[19]!==M||a[20]!==h?(F=()=>{let e=M.current;if(e==null)return;if(e.isConnected){let t=O.current;e instanceof HTMLElement&&document.activeElement!==e&&(t==null||!t.contains(e))&&(M.current=null,e.focus({preventScroll:!0}));return}M.current=null;let t=O.current?.querySelector(`[data-alert-dismiss]`);if(t!=null){t.focus();return}let n=h.getBarElement()?.querySelector(`[data-alert-dismiss], [data-alert-expand]`);n==null?z():n.focus()},a[19]=M,a[20]=h,a[21]=F):F=a[21],e(F,[h,N]),x.length===0)return null;let I;a[22]===l?I=a[23]:(I=r(l,`alert-center-content`),a[22]=l,a[23]=I);let L=v?`open`:`closed`,B;a[24]===c?B=a[25]:(B=n(`h-0 overflow-hidden invisible [content-visibility:hidden] transition-[height,visibility,content-visibility] transition-discrete duration-200 ease-out [interpolate-size:allow-keywords] data-state-open:h-auto data-state-open:visible data-state-open:[content-visibility:visible] motion-reduce:transition-none`,c),a[24]=c,a[25]=B);let V=s==null?m:void 0,H=x.map(G),U;a[26]!==s||a[27]!==V||a[28]!==H?(U=/* @__PURE__ */ g(`ul`,{"aria-label":V,"aria-labelledby":s,className:`flex w-full flex-col`,children:H}),a[26]=s,a[27]=V,a[28]=H,a[29]=U):U=a[29];let K;return a[30]!==k||a[31]!==_||a[32]!==u||a[33]!==L||a[34]!==B||a[35]!==U||a[36]!==I?(K=/* @__PURE__ */ g(`div`,{...u,ref:k,"data-slot":I,id:_,"data-state":L,className:B,children:U}),a[30]=k,a[31]=_,a[32]=u,a[33]=L,a[34]=B,a[35]=U,a[36]=I,a[37]=K):K=a[37],K},Item:P,DismissIconButton:F};function U(){return new D}function W(e){return e.id}function G(e){return/* @__PURE__ */ g(`li`,{children:/* @__PURE__ */ g(a.Root,{appearance:`banner`,intent:e.intent,className:n(V,e.className),"data-slot":`alert-center-item`,"data-placement":`list`,"data-alert-id":e.id,children:/* @__PURE__ */ g(`div`,{className:`contents`,"data-alert-mount":e.id})})},e.id)}export{H as AlertCenter};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{n as i,t as a}from"./alert-QXHRO9ji.js";import{c as o}from"react/compiler-runtime";import{createContext as s,useContext as c,useEffect as l,useId as u,useReducer as d,useRef as f,useState as p,useSyncExternalStore as m}from"react";import h from"tiny-invariant";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{createPortal as v}from"react-dom";const y={danger:5,warning:4,important:3,info:2,success:1};function b(e,t){if(t.parentElement===e)return!1;if(typeof e.moveBefore==`function`&&t.isConnected&&e.isConnected)try{return e.moveBefore(t,null),!0}catch{}return e.appendChild(t),!0}function x(e){return e.replace(/\s+/g,` `).trim()}function S(e){let t=e.querySelector(`[data-slot~="alert-title"]`);if(t==null)return``;let n=t.cloneNode(!0);if(!(n instanceof Element))return x(t.textContent??``);for(let e of n.querySelectorAll(`button`))e.remove();let r=x(n.textContent??``);for(let e of n.querySelectorAll(`a`))e.remove();let i=x(n.textContent??``);return i===``?r:i}function C(e){return e.toSorted((e,t)=>y[t.intent]-y[e.intent]||w(e.order,t.order)||e.sequence-t.sequence)}function w(e,t){return e===t?0:e==null?1:t==null||e<t?-1:1}function T(e,t){if(t===0)return``;if(e===``)return`${t} alert${t===1?``:`s`}`;let n=t-1;return n===0?e:`${e}, and ${n} more alert${n===1?``:`s`}`}const E=[];var D=class{#e=/* @__PURE__ */ new Set;#t=/* @__PURE__ */ new Map;#n=/* @__PURE__ */ new Map;#r=/* @__PURE__ */ new Map;#i=0;#a=E;#o=``;#s=!1;getHost(e){let t=this.#r.get(e);if(t!=null)return t;let n=document.createElement(`div`);return n.style.display=`contents`,n.setAttribute(`data-slot`,`alert-center-item-host`),n.setAttribute(`data-alert-host`,e),this.#r.set(e,n),n}#c=null;captureHostSnapshot(e){if(e!==this.#a[0]?.id)return;let t=this.#r.get(e);t!=null&&t.firstElementChild?.hasChildNodes()===!0&&(this.#c={id:e,content:t.cloneNode(!0)})}getHostSnapshot=e=>this.#c?.id===e?this.#c.content:null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#a;hasAlert=e=>this.#t.has(e);getTopLabel=()=>this.#o;setTopLabel(e){this.#o!==e&&(this.#o=e,this.#p())}#l=null;requestFocusRestore(e){this.#l=e}flushFocusRestore(){let e=this.#l;e!=null&&e.isConnected&&(this.#l=null,document.activeElement!==e&&e.focus({preventScroll:!0}))}#u=null;#d=0;getPlacementVersion=()=>this.#d;notifyPlacementChange(){this.#d++,this.#p()}setBarElement(e){this.#u=e}getBarElement=()=>this.#u;getContentMounted=()=>this.#s;setContentMounted(e){this.#s!==e&&(this.#s=e,this.#p())}register(e){h(!this.#t.has(e.id),`AlertCenter.Item id "${e.id}" is already registered by another mounted item — ids must be unique under one <AlertCenter.Root>. Render one item per id, or give each alert its own id.`);let t=this.#n.get(e.id)??this.#i++;this.#n.set(e.id,t);let n={...e,sequence:t};return this.#t.set(e.id,n),this.#f(),()=>{this.#t.get(e.id)===n&&(this.#t.delete(e.id),this.#f())}}#f(){this.#a=C([...this.#t.values()]),this.#p()}#p(){for(let e of this.#e)e()}};const O=s(null),k=s(null);function A(e){let t=c(O);return h(t,`${e} must be rendered inside <AlertCenter.Root>.`),t}function ee(e){let t=c(k);return h(t,`${e} must be rendered inside <AlertCenter.Root>.`),t}const te=e=>m(e.subscribe,e.getSnapshot,e.getSnapshot),j=s(!1);function M(e){let t=o(5),{store:n}=e,r=te(n),i=m(n.subscribe,n.getTopLabel,n.getTopLabel),a;t[0]!==r.length||t[1]!==i?(a=T(i,r.length),t[0]=r.length,t[1]=i,t[2]=a):a=t[2];let s;return t[3]===a?s=t[4]:(s=/* @__PURE__ */ g(`div`,{"data-slot":`alert-center-announcer`,className:`sr-only`,role:`status`,"aria-live":`polite`,children:a}),t[3]=a,t[4]=s),s}const N=e=>{let t=o(18),{children:n,defaultOpen:r,onOpenChange:i,open:a}=e,[s]=p(U),c=u(),[l,d]=p(r??!1),f=a??l,m;t[0]!==i||t[1]!==a?(m=e=>{a??d(e),i?.(e)},t[0]=i,t[1]=a,t[2]=m):m=t[2];let h=m,v;t[3]!==c||t[4]!==s?(v={store:s,contentId:c},t[3]=c,t[4]=s,t[5]=v):v=t[5];let y=v,b;t[6]!==f||t[7]!==h?(b={isExpanded:f,setExpanded:h},t[6]=f,t[7]=h,t[8]=b):b=t[8];let x=b,S;t[9]!==n||t[10]!==x?(S=/* @__PURE__ */ g(k.Provider,{value:x,children:n}),t[9]=n,t[10]=x,t[11]=S):S=t[11];let C;t[12]===s?C=t[13]:(C=/* @__PURE__ */ g(M,{store:s}),t[12]=s,t[13]=C);let w;return t[14]!==y||t[15]!==S||t[16]!==C?(w=/* @__PURE__ */ _(O.Provider,{value:y,children:[S,C]}),t[14]=y,t[15]=S,t[16]=C,t[17]=w):w=t[17],w},P=t=>{let n=o(22),{children:r,className:a,id:s,intent:l,order:u}=t,{store:d}=A(`AlertCenter.Item`),f=c(j);h(!f,`AlertCenter.Item cannot be rendered inside another item's children.`);let[m,_]=p(null),y,b;n[0]!==s||n[1]!==d?(y=()=>{_(d.getHost(s))},b=[d,s],n[0]=s,n[1]=d,n[2]=y,n[3]=b):(y=n[2],b=n[3]),e(y,b);let x,S;n[4]!==a||n[5]!==s||n[6]!==l||n[7]!==u||n[8]!==d?(x=()=>d.register({id:s,intent:l,className:a,order:u}),S=[d,s,l,a,u],n[4]=a,n[5]=s,n[6]=l,n[7]=u,n[8]=d,n[9]=x,n[10]=S):(x=n[9],S=n[10]),e(x,S);let C;if(n[11]!==s||n[12]!==d?(C=()=>{d.captureHostSnapshot(s)},n[11]=s,n[12]=d,n[13]=C):C=n[13],e(C),m==null)return null;let w;n[14]===r?w=n[15]:(w=/* @__PURE__ */ g(j.Provider,{value:!0,children:/* @__PURE__ */ g(`div`,{className:`contents`,"data-slot":`alert-center-item-label`,children:r})}),n[14]=r,n[15]=w);let T;n[16]!==l||n[17]!==w?(T=/* @__PURE__ */ g(i,{intent:l,redirectDismissFocus:!1,children:w}),n[16]=l,n[17]=w,n[18]=T):T=n[18];let E;return n[19]!==m||n[20]!==T?(E=v(T,m),n[19]=m,n[20]=T,n[21]=E):E=n[21],E},F=n=>{let i=o(14),s,l,u,d;i[0]===n?(s=i[1],l=i[2],u=i[3],d=i[4]):({"data-slot":s,label:l,ref:d,...u}=n,i[0]=n,i[1]=s,i[2]=l,i[3]=u,i[4]=d);let _=c(j);h(_,`AlertCenter.DismissIconButton must be composed inside an <AlertCenter.Item>'s children.`);let{store:v}=A(`AlertCenter.DismissIconButton`);m(v.subscribe,v.getPlacementVersion,v.getPlacementVersion);let y=f(null),b=t(y,d),[x,C]=p(null),w;i[5]===l?w=i[6]:(w=()=>{if(l!=null)return;let e=y.current?.closest(`[data-alert-id]`),t=e==null?``:S(e);C(t===``?null:`Dismiss ${t}`)},i[5]=l,i[6]=w),e(w);let T=l??x??void 0,E;i[7]===s?E=i[8]:(E=r(s,`alert-center-dismiss-icon-button`),i[7]=s,i[8]=E);let D;return i[9]!==b||i[10]!==u||i[11]!==T||i[12]!==E?(D=/* @__PURE__ */ g(a.DismissIconButton,{ref:b,label:T,...u,"data-slot":E}),i[9]=b,i[10]=u,i[11]=T,i[12]=E,i[13]=D):D=i[13],D};function I(e,t){switch(t){case`show`:return`open`;case`hide`:return e===`closed`?`closed`:`closing`;case`exited`:return e===`closing`?`closed`:e}}function L(t){let n=o(10),{present:r}=t,[i,a]=d(I,r?`open`:`closed`),s,c;n[0]===r?(s=n[1],c=n[2]):(s=()=>{a(r?`show`:`hide`)},c=[r],n[0]=r,n[1]=s,n[2]=c),e(s,c);let u,f;n[3]===i?(u=n[4],f=n[5]):(u=()=>{if(i!==`closing`)return;let e=window.setTimeout(()=>a(`exited`),200);return()=>window.clearTimeout(e)},f=[i],n[3]=i,n[4]=u,n[5]=f),l(u,f);let p;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{e.target===e.currentTarget&&e.propertyName===`height`&&a(`exited`)},n[6]=p):p=n[6];let m=p,h=i!==`closed`,g=i===`open`?`open`:`closed`,_;return n[7]!==h||n[8]!==g?(_={isMounted:h,dataState:g,onExitTransitionEnd:m},n[7]=h,n[8]=g,n[9]=_):_=n[9],_}function R(t){let n=o(5),{containerRef:r,isAttached:i}=t,a=f(null),s,c;n[0]!==r||n[1]!==i?(s=()=>{let e=r.current;if(!i||e==null)return;let t=e=>{e.target instanceof Element&&(a.current=e.target)},n=t=>{t.relatedTarget instanceof Node&&!e.contains(t.relatedTarget)&&(a.current=null)};return e.addEventListener(`focusin`,t),e.addEventListener(`focusout`,n),()=>{e.removeEventListener(`focusin`,t),e.removeEventListener(`focusout`,n)}},c=[r,i],n[0]=r,n[1]=i,n[2]=s,n[3]=c):(s=n[2],c=n[3]),e(s,c);let l;return n[4]===Symbol.for(`react.memo_cache_sentinel`)?(l={lastFocusedWithinRef:a},n[4]=l):l=n[4],l}function z(){let e=document.querySelector(`main, [role="main"]`);e!=null&&(e.hasAttribute(`tabindex`)||(e.tabIndex=-1),e.focus({preventScroll:!0}))}function B(t){let n=o(10),{isMounted:r,store:i,topId:a}=t,s=f(null),c;n[0]===r?c=n[1]:(c={containerRef:s,isAttached:r},n[0]=r,n[1]=c);let{lastFocusedWithinRef:l}=R(c),u=f(a),d;n[2]!==l||n[3]!==i||n[4]!==a?(d=()=>{let e=u.current;if(u.current=a,e==null||a===e)return;let t=l.current;if(i.hasAlert(e)){t instanceof HTMLElement&&document.activeElement!==t&&i.requestFocusRestore(t);return}if(t==null||t.isConnected)return;l.current=null;let n=s.current;a==null?z():n!=null&&(n.querySelector(`[data-alert-dismiss], [data-alert-expand]`)??n).focus()},n[2]=l,n[3]=i,n[4]=a,n[5]=d):d=n[5];let p;n[6]!==i||n[7]!==a?(p=[i,a],n[6]=i,n[7]=a,n[8]=p):p=n[8],e(d,p);let m;return n[9]===Symbol.for(`react.memo_cache_sentinel`)?(m={wrapperRef:s},n[9]=m):m=n[9],m}const V=`gap-2 py-2 pr-2 [&_[data-slot~=alert-icon]]:shrink-0`,H={Root:N,Bar:t=>{let i=o(62),s,c,l,u;i[0]===t?(s=i[1],c=i[2],l=i[3],u=i[4]):({className:s,"data-slot":c,ref:u,...l}=t,i[0]=t,i[1]=s,i[2]=c,i[3]=l,i[4]=u);let{store:d,contentId:h}=A(`AlertCenter.Bar`),{isExpanded:v,setExpanded:y}=ee(`AlertCenter.Bar`),x=te(d),C=m(d.subscribe,d.getContentMounted,d.getContentMounted),w=x[0]??null,T=w!=null,E;i[5]===T?E=i[6]:(E={present:T},i[5]=T,i[6]=E);let{isMounted:D,dataState:O,onExitTransitionEnd:k}=L(E),[j,M]=p(w);w!=null&&w!==j&&M(w);let N=w??j,P=f(null),F;i[7]!==N||i[8]!==d||i[9]!==w?(F=()=>{let e=P.current;if(e==null)return;if(w!=null){let t=d.getHost(w.id);t.parentElement!==e&&e.childNodes.length>0&&e.replaceChildren(),b(e,t)&&d.notifyPlacementChange(),d.flushFocusRestore();return}let t=N==null?null:d.getHostSnapshot(N.id);t!=null&&t.parentNode!==e&&e.replaceChildren(t)},i[7]=N,i[8]=d,i[9]=w,i[10]=F):F=i[10],e(F);let I=w?.id,R;i[11]!==D||i[12]!==d||i[13]!==I?(R={isMounted:D,store:d,topId:I},i[11]=D,i[12]=d,i[13]=I,i[14]=R):R=i[14];let{wrapperRef:z}=B(R),H;i[15]!==T||i[16]!==d||i[17]!==z?(H=()=>{let e=z.current;d.setTopLabel(T&&e!=null?S(e):``)},i[15]=T,i[16]=d,i[17]=z,i[18]=H):H=i[18],e(H);let U;i[19]!==T||i[20]!==d||i[21]!==z?(U=()=>{let e=z.current;if(e==null)return;let t=new MutationObserver(()=>{d.setTopLabel(T?S(e):``)});return t.observe(e,{subtree:!0,childList:!0,characterData:!0}),()=>{t.disconnect()}},i[19]=T,i[20]=d,i[21]=z,i[22]=U):U=i[22];let W;i[23]!==D||i[24]!==T||i[25]!==d?(W=[d,T,D],i[23]=D,i[24]=T,i[25]=d,i[26]=W):W=i[26],e(U,W);let G,K;i[27]===d?(G=i[28],K=i[29]):(G=()=>()=>{d.setTopLabel(``)},K=[d],i[27]=d,i[28]=G,i[29]=K),e(G,K);let q;i[30]!==d||i[31]!==z?(q=()=>{d.setBarElement(z.current)},i[30]=d,i[31]=z,i[32]=q):q=i[32],e(q);let J,Y;if(i[33]===d?(J=i[34],Y=i[35]):(J=()=>()=>{d.setBarElement(null)},Y=[d],i[33]=d,i[34]=J,i[35]=Y),e(J,Y),!D||N==null)return null;let ne=T?x.length-1:0,re=!T,ie=N.intent,X;i[36]!==N.className||i[37]!==s?(X=n(V,`not-has-data-[slot=alert-description]:[&_[data-alert-dismiss],&_[data-alert-expand]]:top-1/2 not-has-data-[slot=alert-description]:[&_[data-alert-dismiss],&_[data-alert-expand]]:-translate-y-1/2`,`has-data-alert-expand:[&_[data-alert-dismiss]]:right-16 md:has-data-alert-expand:[&_[data-alert-dismiss]]:right-24`,s,N.className),i[36]=N.className,i[37]=s,i[38]=X):X=i[38];let Z;i[39]===c?Z=i[40]:(Z=r(c,`alert-center-bar`),i[39]=c,i[40]=Z);let ae;i[41]===Symbol.for(`react.memo_cache_sentinel`)?(ae=/* @__PURE__ */ g(`div`,{ref:P,className:`contents`,"data-slot":`alert-center-bar-mount`}),i[41]=ae):ae=i[41];let Q;i[42]!==h||i[43]!==C||i[44]!==v||i[45]!==ne||i[46]!==y?(Q=ne>0&&C&&/* @__PURE__ */ g(a.ExpandButton,{count:ne,expanded:v,"aria-controls":h,onClick:()=>y(!v)}),i[42]=h,i[43]=C,i[44]=v,i[45]=ne,i[46]=y,i[47]=Q):Q=i[47];let $;i[48]!==N.id||i[49]!==N.intent||i[50]!==l||i[51]!==u||i[52]!==X||i[53]!==Z||i[54]!==Q?($=/* @__PURE__ */ _(a.Root,{ref:u,appearance:`banner`,intent:ie,className:X,...l,"data-slot":Z,"data-placement":`bar`,"data-alert-id":N.id,children:[ae,Q]}),i[48]=N.id,i[49]=N.intent,i[50]=l,i[51]=u,i[52]=X,i[53]=Z,i[54]=Q,i[55]=$):$=i[55];let oe;return i[56]!==O||i[57]!==k||i[58]!==re||i[59]!==$||i[60]!==z?(oe=/* @__PURE__ */ g(`div`,{ref:z,"data-slot":`alert-center-bar-wrapper`,tabIndex:-1,inert:re,className:`shrink-0 overflow-hidden transition-[height,opacity] duration-200 ease-out [interpolate-size:allow-keywords] starting:h-0 starting:opacity-0 data-state-closed:h-0 data-state-closed:opacity-0 data-state-closed:duration-150 motion-reduce:transition-none`,"data-state":O,onTransitionEnd:k,children:$}),i[56]=O,i[57]=k,i[58]=re,i[59]=$,i[60]=z,i[61]=oe):oe=i[61],oe},Content:i=>{let a=o(38),s,c,l,u,d,p;a[0]===i?(s=a[1],c=a[2],l=a[3],u=a[4],d=a[5],p=a[6]):({"aria-label":p,"aria-labelledby":s,className:c,"data-slot":l,ref:d,...u}=i,a[0]=i,a[1]=s,a[2]=c,a[3]=l,a[4]=u,a[5]=d,a[6]=p);let m=p===void 0?`More alerts`:p,{store:h,contentId:_}=A(`AlertCenter.Content`),{isExpanded:v,setExpanded:y}=ee(`AlertCenter.Content`),x=te(h).slice(1),S=x.length>0,C,w;a[7]===h?(C=a[8],w=a[9]):(C=()=>(h.setContentMounted(!0),()=>{h.setContentMounted(!1)}),w=[h],a[7]=h,a[8]=C,a[9]=w),e(C,w);let T=f(S),E,D;a[10]!==S||a[11]!==v||a[12]!==y?(E=()=>{let e=T.current&&!S;T.current=S,e&&v&&y(!1)},D=[S,v,y],a[10]=S,a[11]=v,a[12]=y,a[13]=E,a[14]=D):(E=a[13],D=a[14]),e(E,D);let O=f(null),k=t(O,d),j;a[15]===S?j=a[16]:(j={containerRef:O,isAttached:S},a[15]=S,a[16]=j);let{lastFocusedWithinRef:M}=R(j),N=x.map(W).join(` `),P;a[17]===h?P=a[18]:(P=()=>{let e=O.current;if(e==null)return;let t=!1;for(let n of e.querySelectorAll(`[data-alert-mount]`)){let e=n.getAttribute(`data-alert-mount`);e!=null&&b(n,h.getHost(e))&&(t=!0)}t&&h.notifyPlacementChange(),h.flushFocusRestore()},a[17]=h,a[18]=P),e(P,[h,N]);let F;if(a[19]!==M||a[20]!==h?(F=()=>{let e=M.current;if(e==null)return;if(e.isConnected){let t=O.current;e instanceof HTMLElement&&document.activeElement!==e&&(t==null||!t.contains(e))&&(M.current=null,e.focus({preventScroll:!0}));return}M.current=null;let t=O.current?.querySelector(`[data-alert-dismiss]`);if(t!=null){t.focus();return}let n=h.getBarElement()?.querySelector(`[data-alert-dismiss], [data-alert-expand]`);n==null?z():n.focus()},a[19]=M,a[20]=h,a[21]=F):F=a[21],e(F,[h,N]),x.length===0)return null;let I;a[22]===l?I=a[23]:(I=r(l,`alert-center-content`),a[22]=l,a[23]=I);let L=v?`open`:`closed`,B;a[24]===c?B=a[25]:(B=n(`h-0 overflow-hidden invisible [content-visibility:hidden] transition-[height,visibility,content-visibility] transition-discrete duration-200 ease-out [interpolate-size:allow-keywords] data-state-open:h-auto data-state-open:visible data-state-open:[content-visibility:visible] motion-reduce:transition-none`,c),a[24]=c,a[25]=B);let V=s==null?m:void 0,H=x.map(G),U;a[26]!==s||a[27]!==V||a[28]!==H?(U=/* @__PURE__ */ g(`ul`,{"aria-label":V,"aria-labelledby":s,className:`flex w-full flex-col`,children:H}),a[26]=s,a[27]=V,a[28]=H,a[29]=U):U=a[29];let K;return a[30]!==k||a[31]!==_||a[32]!==u||a[33]!==L||a[34]!==B||a[35]!==U||a[36]!==I?(K=/* @__PURE__ */ g(`div`,{...u,ref:k,"data-slot":I,id:_,"data-state":L,className:B,children:U}),a[30]=k,a[31]=_,a[32]=u,a[33]=L,a[34]=B,a[35]=U,a[36]=I,a[37]=K):K=a[37],K},Item:P,DismissIconButton:F};function U(){return new D}function W(e){return e.id}function G(e){return/* @__PURE__ */ g(`li`,{children:/* @__PURE__ */ g(a.Root,{appearance:`banner`,intent:e.intent,className:n(V,e.className),"data-slot":`alert-center-item`,"data-placement":`list`,"data-alert-id":e.id,children:/* @__PURE__ */ g(`div`,{className:`contents`,"data-alert-mount":e.id})})},e.id)}export{H as AlertCenter};
@@ -1,10 +1,9 @@
1
- import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
- import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
4
- import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps } from "./button-mzUR1U0Y.js";
5
- import { c as Trigger$1, n as Content$1, o as Root$1, r as Description$1, s as Title$1, t as Close$1 } from "./dialog-CZYD3xL-.js";
1
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
+ import { t as SvgAttributes } from "./icon-CgNqu-fl.js";
4
+ import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps } from "./button-BOCRKR5v.js";
5
+ import { c as Trigger$1, n as Content$1, o as Root$1, r as Description$1, s as Title$1, t as Close$1 } from "./dialog-Dp0QGWwo.js";
6
6
  import { ComponentProps, ReactNode } from "react";
7
- //#region src/components/alert-dialog/alert-dialog.d.ts
8
7
  declare const intents: readonly ["info", "danger"];
9
8
  type AlertDialogIntent = (typeof intents)[number];
10
9
  type AlertDialogProps = ComponentProps<typeof Root$1> & {
@@ -1097,5 +1096,4 @@ declare const AlertDialog: {
1097
1096
  */
1098
1097
  readonly Trigger: typeof Trigger;
1099
1098
  };
1100
- //#endregion
1101
1099
  export { AlertDialog };
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-BudQMD2S.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./button-b2HKEIE2.js";import{t as a}from"./layer-container-DLf-6eBz.js";import{a as o,c as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./primitive-AGoxSJBI.js";import{c as m}from"react/compiler-runtime";import{createContext as h,useContext as g}from"react";import _ from"tiny-invariant";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{InfoIcon as b}from"@phosphor-icons/react/Info";import{WarningIcon as x}from"@phosphor-icons/react/Warning";const S=h(null);function C(){let e=g(S);return _(e,`AlertDialog child component used outside of AlertDialog parent!`),e}function w(e){let t=m(10),n,r;t[0]===e?(n=t[1],r=t[2]):({intent:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i={intent:n},t[3]=n,t[4]=i);let a=i,o;t[5]===r?o=t[6]:(o=/* @__PURE__ */ v(u,{...r}),t[5]=r,t[6]=o);let s;return t[7]!==a||t[8]!==o?(s=/* @__PURE__ */ v(S.Provider,{value:a,children:o}),t[7]=a,t[8]=o,t[9]=s):s=t[9],s}const T=e=>{let n=m(10),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({"data-slot":r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(r,`alert-dialog-trigger`),n[4]=r,n[5]=o);let c;return n[6]!==i||n[7]!==a||n[8]!==o?(c=/* @__PURE__ */ v(s,{ref:a,"data-slot":o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=c):c=n[9],c},E=o,D=n=>{let r=m(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let l;r[5]===a?l=r[6]:(l=t(a,`alert-dialog-overlay`),r[5]=a,r[6]=l);let u;r[7]===i?u=r[8]:(u=e(`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 bg-overlay fixed inset-0 z-60 backdrop-blur-xs`,i),r[7]=i,r[8]=u);let d;return r[9]!==o||r[10]!==s||r[11]!==l||r[12]!==u?(d=/* @__PURE__ */ v(c,{"data-slot":l,className:u,...o,ref:s}),r[9]=o,r[10]=s,r[11]=l,r[12]=u,r[13]=d):d=r[13],d},O=n=>{let r=m(21),i,o,s,c,u,d;r[0]===n?(i=r[1],o=r[2],s=r[3],c=r[4],u=r[5],d=r[6]):({"data-slot":o,className:i,onInteractOutside:s,preferredWidth:d,ref:u,...c}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s,r[4]=c,r[5]=u,r[6]=d);let f=d===void 0?`max-w-md`:d,p;r[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=/* @__PURE__ */ v(D,{}),r[7]=p):p=r[7];let h;r[8]===o?h=r[9]:(h=t(o,`alert-dialog-content`),r[8]=o,r[9]=h);let g;r[10]===s?g=r[11]:(g=e=>{s?.(e),e.preventDefault()},r[10]=s,r[11]=g);let _;r[12]!==i||r[13]!==f?(_=e(`flex w-full flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start`,`outline-hidden focus-within:outline-hidden`,`p-6`,`border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200`,`data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,f,i),r[12]=i,r[13]=f,r[14]=_):_=r[14];let b;return r[15]!==c||r[16]!==u||r[17]!==h||r[18]!==g||r[19]!==_?(b=/* @__PURE__ */ y(E,{children:[p,/* @__PURE__ */ v(a,{"data-slot":`alert-dialog-positioner`,className:`fixed inset-4 z-60 flex items-center justify-center`,children:/* @__PURE__ */ v(l,{role:`alertdialog`,"data-slot":h,"data-mantle-modal-content":!0,ref:u,onInteractOutside:g,className:_,...c})})]}),r[15]=c,r[16]=u,r[17]=h,r[18]=g,r[19]=_,r[20]=b):b=r[20],b},k=n=>{let i=m(16),a,o,s,c,l;i[0]===n?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":o,asChild:l,className:a,ref:c,...s}=n,i[0]=n,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=l!==void 0&&l?r:`div`,d;i[6]===o?d=i[7]:(d=t(o,`alert-dialog-body`),i[6]=o,i[7]=d);let f;i[8]===a?f=i[9]:(f=e(`flex-1 space-y-4`,a),i[8]=a,i[9]=f);let p;return i[10]!==u||i[11]!==s||i[12]!==c||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ v(u,{"data-slot":d,className:f,ref:c,...s}),i[10]=u,i[11]=s,i[12]=c,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},A=n=>{let i=m(16),a,o,s,c,l;i[0]===n?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":o,asChild:l,className:a,ref:c,...s}=n,i[0]=n,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=l!==void 0&&l?r:`div`,d;i[6]===o?d=i[7]:(d=t(o,`alert-dialog-header`),i[6]=o,i[7]=d);let f;i[8]===a?f=i[9]:(f=e(`flex flex-col space-y-2 text-center sm:text-start`,a),i[8]=a,i[9]=f);let p;return i[10]!==u||i[11]!==s||i[12]!==c||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ v(u,{"data-slot":d,className:f,ref:c,...s}),i[10]=u,i[11]=s,i[12]=c,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},j=n=>{let i=m(16),a,o,s,c,l;i[0]===n?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":o,asChild:l,className:a,ref:c,...s}=n,i[0]=n,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=l!==void 0&&l?r:`div`,d;i[6]===o?d=i[7]:(d=t(o,`alert-dialog-footer`),i[6]=o,i[7]=d);let f;i[8]===a?f=i[9]:(f=e(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,a),i[8]=a,i[9]=f);let p;return i[10]!==u||i[11]!==s||i[12]!==c||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ v(u,{"data-slot":d,className:f,ref:c,...s}),i[10]=u,i[11]=s,i[12]=c,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},M=n=>{let r=m(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=t(a,`alert-dialog-title`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=e(`text-strong text-center text-lg font-medium sm:text-start`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ v(f,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},N=n=>{let r=m(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=t(a,`alert-dialog-description`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=e(`text-body text-center text-sm font-normal sm:text-start`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ v(d,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},P={danger:`danger`,info:`neutral`},F=e=>{let n=m(14),r,a,o,s,c;n[0]===e?(r=n[1],a=n[2],o=n[3],s=n[4],c=n[5]):({"data-slot":r,appearance:c,intent:a,ref:s,...o}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=o,n[4]=s,n[5]=c);let l=c===void 0?`filled`:c,u=C(),d=P[u.intent],f;n[6]===r?f=n[7]:(f=t(r,`alert-dialog-action`),n[6]=r,n[7]=f);let p=a??d,h;return n[8]!==l||n[9]!==o||n[10]!==s||n[11]!==f||n[12]!==p?(h=/* @__PURE__ */ v(i,{appearance:l,"data-slot":f,intent:p,ref:s,...o}),n[8]=l,n[9]=o,n[10]=s,n[11]=f,n[12]=p,n[13]=h):h=n[13],h},I=n=>{let r=m(18),a,o,s,c,l,u;r[0]===n?(a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6]):({"data-slot":o,appearance:l,className:a,intent:u,ref:c,...s}=n,r[0]=n,r[1]=a,r[2]=o,r[3]=s,r[4]=c,r[5]=l,r[6]=u);let d=l===void 0?`outlined`:l,f=u===void 0?`neutral`:u,h;r[7]===o?h=r[8]:(h=t(o,`alert-dialog-cancel`),r[7]=o,r[8]=h);let g;r[9]===a?g=r[10]:(g=e(`mt-2 sm:mt-0`,a),r[9]=a,r[10]=g);let _;return r[11]!==d||r[12]!==f||r[13]!==s||r[14]!==c||r[15]!==h||r[16]!==g?(_=/* @__PURE__ */ v(p,{asChild:!0,children:/* @__PURE__ */ v(i,{appearance:d,"data-slot":h,className:g,intent:f,ref:c,...s})}),r[11]=d,r[12]=f,r[13]=s,r[14]=c,r[15]=h,r[16]=g,r[17]=_):_=r[17],_},L={danger:/* @__PURE__ */ v(x,{}),info:/* @__PURE__ */ v(b,{})},R={danger:`text-danger-600`,info:`text-accent-600`},z={Root:w,Action:F,Body:k,Cancel:I,Close:e=>{let n=m(10),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({"data-slot":r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(r,`alert-dialog-close`),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=/* @__PURE__ */ v(p,{ref:a,"data-slot":o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},Content:O,Description:N,Footer:j,Header:A,Icon:r=>{let i=m(17),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":o,className:a,ref:c,svg:l,...s}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=C(),d=R[u.intent],f=L[u.intent],p;i[6]===o?p=i[7]:(p=t(o,`alert-dialog-icon`),i[6]=o,i[7]=p);let h;i[8]!==a||i[9]!==d?(h=e(`size-12 sm:size-7`,d,a),i[8]=a,i[9]=d,i[10]=h):h=i[10];let g=l??f,_;return i[11]!==s||i[12]!==c||i[13]!==p||i[14]!==h||i[15]!==g?(_=/* @__PURE__ */ v(n,{ref:c,"data-slot":p,className:h,svg:g,...s}),i[11]=s,i[12]=c,i[13]=p,i[14]=h,i[15]=g,i[16]=_):_=i[16],_},Title:M,Trigger:T};export{z as AlertDialog};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-BudQMD2S.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./button-CZ-q7fYv.js";import{t as a}from"./layer-container-DLf-6eBz.js";import{a as o,c as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./primitive-AGoxSJBI.js";import{c as m}from"react/compiler-runtime";import{createContext as h,useContext as g}from"react";import _ from"tiny-invariant";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{InfoIcon as b}from"@phosphor-icons/react/Info";import{WarningIcon as x}from"@phosphor-icons/react/Warning";const S=h(null);function C(){let e=g(S);return _(e,`AlertDialog child component used outside of AlertDialog parent!`),e}function w(e){let t=m(10),n,r;t[0]===e?(n=t[1],r=t[2]):({intent:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i={intent:n},t[3]=n,t[4]=i);let a=i,o;t[5]===r?o=t[6]:(o=/* @__PURE__ */ v(u,{...r}),t[5]=r,t[6]=o);let s;return t[7]!==a||t[8]!==o?(s=/* @__PURE__ */ v(S.Provider,{value:a,children:o}),t[7]=a,t[8]=o,t[9]=s):s=t[9],s}const T=e=>{let n=m(10),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({"data-slot":r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(r,`alert-dialog-trigger`),n[4]=r,n[5]=o);let c;return n[6]!==i||n[7]!==a||n[8]!==o?(c=/* @__PURE__ */ v(s,{ref:a,"data-slot":o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=c):c=n[9],c},E=o,D=n=>{let r=m(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let l;r[5]===a?l=r[6]:(l=t(a,`alert-dialog-overlay`),r[5]=a,r[6]=l);let u;r[7]===i?u=r[8]:(u=e(`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 duration-200 ease-out-strong data-state-closed:duration-150 bg-overlay fixed inset-0 z-60 backdrop-blur-xs`,i),r[7]=i,r[8]=u);let d;return r[9]!==o||r[10]!==s||r[11]!==l||r[12]!==u?(d=/* @__PURE__ */ v(c,{"data-slot":l,className:u,...o,ref:s}),r[9]=o,r[10]=s,r[11]=l,r[12]=u,r[13]=d):d=r[13],d},O=n=>{let r=m(21),i,o,s,c,u,d;r[0]===n?(i=r[1],o=r[2],s=r[3],c=r[4],u=r[5],d=r[6]):({"data-slot":o,className:i,onInteractOutside:s,preferredWidth:d,ref:u,...c}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s,r[4]=c,r[5]=u,r[6]=d);let f=d===void 0?`max-w-md`:d,p;r[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=/* @__PURE__ */ v(D,{}),r[7]=p):p=r[7];let h;r[8]===o?h=r[9]:(h=t(o,`alert-dialog-content`),r[8]=o,r[9]=h);let g;r[10]===s?g=r[11]:(g=e=>{s?.(e),e.preventDefault()},r[10]=s,r[11]=g);let _;r[12]!==i||r[13]!==f?(_=e(`flex w-full flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start`,`outline-hidden focus-within:outline-hidden`,`p-6`,`border-dialog bg-dialog rounded-xl border shadow-lg duration-200 ease-out-strong data-state-closed:duration-150 motion-reduce:animate-none!`,`data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,f,i),r[12]=i,r[13]=f,r[14]=_):_=r[14];let b;return r[15]!==c||r[16]!==u||r[17]!==h||r[18]!==g||r[19]!==_?(b=/* @__PURE__ */ y(E,{children:[p,/* @__PURE__ */ v(a,{"data-slot":`alert-dialog-positioner`,className:`fixed inset-4 z-60 flex items-center justify-center motion-safe:not-has-[>[data-mantle-modal-content][data-state=open]]:animate-exit-hold`,children:/* @__PURE__ */ v(l,{role:`alertdialog`,"data-slot":h,"data-mantle-modal-content":!0,ref:u,onInteractOutside:g,className:_,...c})})]}),r[15]=c,r[16]=u,r[17]=h,r[18]=g,r[19]=_,r[20]=b):b=r[20],b},k=n=>{let i=m(16),a,o,s,c,l;i[0]===n?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":o,asChild:l,className:a,ref:c,...s}=n,i[0]=n,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=l!==void 0&&l?r:`div`,d;i[6]===o?d=i[7]:(d=t(o,`alert-dialog-body`),i[6]=o,i[7]=d);let f;i[8]===a?f=i[9]:(f=e(`flex-1 space-y-4`,a),i[8]=a,i[9]=f);let p;return i[10]!==u||i[11]!==s||i[12]!==c||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ v(u,{"data-slot":d,className:f,ref:c,...s}),i[10]=u,i[11]=s,i[12]=c,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},A=n=>{let i=m(16),a,o,s,c,l;i[0]===n?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":o,asChild:l,className:a,ref:c,...s}=n,i[0]=n,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=l!==void 0&&l?r:`div`,d;i[6]===o?d=i[7]:(d=t(o,`alert-dialog-header`),i[6]=o,i[7]=d);let f;i[8]===a?f=i[9]:(f=e(`flex flex-col space-y-2 text-center sm:text-start`,a),i[8]=a,i[9]=f);let p;return i[10]!==u||i[11]!==s||i[12]!==c||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ v(u,{"data-slot":d,className:f,ref:c,...s}),i[10]=u,i[11]=s,i[12]=c,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},j=n=>{let i=m(16),a,o,s,c,l;i[0]===n?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":o,asChild:l,className:a,ref:c,...s}=n,i[0]=n,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=l!==void 0&&l?r:`div`,d;i[6]===o?d=i[7]:(d=t(o,`alert-dialog-footer`),i[6]=o,i[7]=d);let f;i[8]===a?f=i[9]:(f=e(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,a),i[8]=a,i[9]=f);let p;return i[10]!==u||i[11]!==s||i[12]!==c||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ v(u,{"data-slot":d,className:f,ref:c,...s}),i[10]=u,i[11]=s,i[12]=c,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},M=n=>{let r=m(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=t(a,`alert-dialog-title`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=e(`text-strong text-center text-lg font-medium sm:text-start`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ v(f,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},N=n=>{let r=m(14),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=t(a,`alert-dialog-description`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=e(`text-body text-center text-sm font-normal sm:text-start`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ v(d,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},P={danger:`danger`,info:`neutral`},F=e=>{let n=m(14),r,a,o,s,c;n[0]===e?(r=n[1],a=n[2],o=n[3],s=n[4],c=n[5]):({"data-slot":r,appearance:c,intent:a,ref:s,...o}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=o,n[4]=s,n[5]=c);let l=c===void 0?`filled`:c,u=C(),d=P[u.intent],f;n[6]===r?f=n[7]:(f=t(r,`alert-dialog-action`),n[6]=r,n[7]=f);let p=a??d,h;return n[8]!==l||n[9]!==o||n[10]!==s||n[11]!==f||n[12]!==p?(h=/* @__PURE__ */ v(i,{appearance:l,"data-slot":f,intent:p,ref:s,...o}),n[8]=l,n[9]=o,n[10]=s,n[11]=f,n[12]=p,n[13]=h):h=n[13],h},I=n=>{let r=m(18),a,o,s,c,l,u;r[0]===n?(a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6]):({"data-slot":o,appearance:l,className:a,intent:u,ref:c,...s}=n,r[0]=n,r[1]=a,r[2]=o,r[3]=s,r[4]=c,r[5]=l,r[6]=u);let d=l===void 0?`outlined`:l,f=u===void 0?`neutral`:u,h;r[7]===o?h=r[8]:(h=t(o,`alert-dialog-cancel`),r[7]=o,r[8]=h);let g;r[9]===a?g=r[10]:(g=e(`mt-2 sm:mt-0`,a),r[9]=a,r[10]=g);let _;return r[11]!==d||r[12]!==f||r[13]!==s||r[14]!==c||r[15]!==h||r[16]!==g?(_=/* @__PURE__ */ v(p,{asChild:!0,children:/* @__PURE__ */ v(i,{appearance:d,"data-slot":h,className:g,intent:f,ref:c,...s})}),r[11]=d,r[12]=f,r[13]=s,r[14]=c,r[15]=h,r[16]=g,r[17]=_):_=r[17],_},L={danger:/* @__PURE__ */ v(x,{}),info:/* @__PURE__ */ v(b,{})},R={danger:`text-danger-600`,info:`text-accent-600`},z={Root:w,Action:F,Body:k,Cancel:I,Close:e=>{let n=m(10),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({"data-slot":r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(r,`alert-dialog-close`),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=/* @__PURE__ */ v(p,{ref:a,"data-slot":o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},Content:O,Description:N,Footer:j,Header:A,Icon:r=>{let i=m(17),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":o,className:a,ref:c,svg:l,...s}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=C(),d=R[u.intent],f=L[u.intent],p;i[6]===o?p=i[7]:(p=t(o,`alert-dialog-icon`),i[6]=o,i[7]=p);let h;i[8]!==a||i[9]!==d?(h=e(`size-12 sm:size-7`,d,a),i[8]=a,i[9]=d,i[10]=h):h=i[10];let g=l??f,_;return i[11]!==s||i[12]!==c||i[13]!==p||i[14]!==h||i[15]!==g?(_=/* @__PURE__ */ v(n,{ref:c,"data-slot":p,className:h,svg:g,...s}),i[11]=s,i[12]=c,i[13]=p,i[14]=h,i[15]=g,i[16]=_):_=i[16],_},Title:M,Trigger:T};export{z as AlertDialog};
package/dist/alert.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Alert } from "./alert-CTAmHdLa.js";
1
+ import { t as Alert } from "./alert-BV0VWU2o.js";
2
2
  export { Alert };
package/dist/alert.js CHANGED
@@ -1 +1 @@
1
- export{t as Alert}from"./alert-xJELJxL4.js";
1
+ export{t as Alert}from"./alert-QXHRO9ji.js";
package/dist/anchor.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
1
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
- //#region src/components/anchor/types.d.ts
5
4
  /**
6
5
  * The rel attribute defines the relationship between a linked resource and the current document. Valid on <link>, <a>, <area>, and <form>, the supported values depend on the element on which the attribute is found.
7
6
  *
@@ -10,8 +9,6 @@ import { ComponentProps, ReactNode } from "react";
10
9
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
11
10
  */
12
11
  type Rel = "alternate" | "author" | "bookmark" | "canonical" | "dns-prefetch" | "external" | "help" | "icon" | "license" | "manifest" | "me" | "modulepreload" | "next" | "nofollow" | "noopener" | "noreferrer" | "opener" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "search" | "stylesheet" | "tag" | "terms-of-service";
13
- //#endregion
14
- //#region src/components/anchor/anchor.d.ts
15
12
  /**
16
13
  * The class names for the `Anchor` component which define the styles for the component.
17
14
  */
@@ -110,5 +107,4 @@ declare const Anchor: ({ "data-slot": dataSlot, asChild, children, className, re
110
107
  * If the value is an array, it drops the empty values, de-duplicates, sorts, and joins with a space.
111
108
  */
112
109
  declare function resolveRel(rel: Rel | (string & {}) | undefined | null | (Rel | (string & {}) | undefined | null)[]): string | undefined;
113
- //#endregion
114
110
  export { Anchor, type AnchorProps, type Rel, anchorClassNames, resolveRel };
@@ -1,8 +1,7 @@
1
- import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
- import { n as IconButtonProps } from "./button-BZT5f79d.js";
1
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
+ import { n as IconButtonProps } from "./button-BFAvonp1.js";
4
4
  import { ComponentProps, ReactNode } from "react";
5
- //#region src/components/app-layout/app-layout.d.ts
6
5
  /**
7
6
  * The outer frame of an application shell. Renders a `<div>` with
8
7
  * `relative isolate flex h-full w-full flex-col overflow-clip`, so
@@ -111,20 +110,13 @@ declare const Notice: ({ asChild, children, className, "data-slot": dataSlot, ..
111
110
  * `AppLayout.Notice`, laid out as a row of columns. Place a `Sidebar.Nav` (or
112
111
  * any other rail, on either side) beside an `AppLayout.Content` card, and an
113
112
  * `AppLayout.SidePanel` after the card. A flex row
114
- * (`relative mx-auto flex min-h-0 w-full min-w-0 flex-1`) whose `min-h-0` is
113
+ * (`relative flex min-h-0 min-w-0 flex-1`) whose `min-h-0` is
115
114
  * what lets `AppLayout.Body` scroll instead of the page.
116
115
  *
117
116
  * It owns no gutter, deliberately: the card insets itself with its own margin,
118
117
  * so a rail stays flush against the window edge and a collapsed icon rail keeps
119
118
  * its flush geometry.
120
119
  *
121
- * On a wide screen the row caps at `--app-layout-max-width` and centers in the
122
- * frame, so the rail, the card, and the side panel stay one group instead of a
123
- * card that stretches across an ultrawide monitor. `AppLayout.Root` still paints
124
- * `bg-base` edge to edge, and `AppLayout.Notice` still spans the full window.
125
- * Merge `className="ml-0"` to pin the group to the start edge instead, and set
126
- * the variable to `none` to let the row fill any width.
127
- *
128
120
  * It is `relative`, so a floating `AppLayout.SidePanel` resolves against the row
129
121
  * and covers the card, never the notice above it. It is also the container
130
122
  * named `app-layout-workspace`: the panel floats when the row is narrower than
@@ -133,12 +125,6 @@ declare const Notice: ({ asChild, children, className, "data-slot": dataSlot, ..
133
125
  * expanded `Sidebar.Nav`, and `--container-side-panel-lane-icon-rail` with a
134
126
  * collapsed rail or none.
135
127
  *
136
- * **CSS variables (public API):**
137
- *
138
- * | CSS Variable | Default | Description |
139
- * | --- | --- | --- |
140
- * | `--app-layout-max-width` | `128rem` | The widest the row gets (2048px): a 13rem rail, a `max-w-7xl` page with its padding, and an open side panel at its 27rem cap, each at full size with nothing stretched. Set it on `AppLayout.Root` or on this part. `none` removes the cap. |
141
- *
142
128
  * @see https://mantle.ngrok.com/layouts/app-layout#applayoutworkspace
143
129
  *
144
130
  * @example
@@ -754,9 +740,9 @@ type AppLayoutSidePanelProps = Omit<ComponentProps<"aside">, "id"> & WithDataSlo
754
740
  * strip of page when the row is narrower), with a larger shadow and `z-20` so
755
741
  * it paints above a page's own sticky rows. Closed, it slides off the end edge
756
742
  * instead of collapsing and goes `invisible` the instant the slide ends, so a
757
- * row that `--app-layout-max-width` caps inside the frame has no panel strip
758
- * beside it. One breakpoint lower it covers the card from gutter to gutter,
759
- * because a strip of page beside a 24rem panel is no page at all on a phone.
743
+ * row narrower than the frame has no panel strip beside it. One breakpoint
744
+ * lower it covers the card from gutter to gutter, because a strip of page
745
+ * beside a 24rem panel is no page at all on a phone.
760
746
  * With `"sm"` there is no lower breakpoint, so the panel covers the card as
761
747
  * soon as it floats. Two cards side by side in 900px are two unusable cards.
762
748
  *
@@ -791,7 +777,7 @@ type AppLayoutSidePanelProps = Omit<ComponentProps<"aside">, "id"> & WithDataSlo
791
777
  *
792
778
  * | CSS Variable | Default | Description |
793
779
  * | --- | --- | --- |
794
- * | `--app-layout-side-panel-width` | `clamp(21rem, 24cqw, 27rem)` | The panel's width beside the card: a quarter of the `AppLayout.Workspace` row, never narrower than 336px and never wider than 432px. It reads the row, not the viewport, so a row that `--app-layout-max-width` caps on a wide screen holds the panel at its floor and the page keeps the rest. Set it on `AppLayout.Root` or on this part. |
780
+ * | `--app-layout-side-panel-width` | `clamp(21rem, 24cqw, 27rem)` | The panel's width beside the card: a quarter of the `AppLayout.Workspace` row, never narrower than 336px and never wider than 432px. It reads the row, not the viewport, so a row narrower than the viewport holds the panel at its floor and the page keeps the rest. Set it on `AppLayout.Root` or on this part. |
795
781
  * | `--app-layout-card-gutter` | `0.5rem` | Read, not owned: `AppLayout.Content` owns this token. The panel keeps it on its top, end, and bottom edges, and the floating panel insets itself by it. Set it on `AppLayout.Root` or another common ancestor of the card and the panel, not on `AppLayout.Content`: custom properties inherit downward only, so a value on the card never reaches the panel. |
796
782
  * | `--container-side-panel-lane` | `56.5rem` | A theme token the row's container query reads: the narrowest `AppLayout.Workspace` row that holds an expanded `Sidebar.Nav` (13rem), the card at the panel's floor (21rem), the panel (21rem), and the three gutters. Below it the panel floats while a direct child of the row is an expanded rail. Set it in `@theme`, not on an element. |
797
783
  * | `--container-side-panel-lane-icon-rail` | `46.75rem` | The same row with the icon rail (3.25rem) in place of the expanded one, or with no rail. Below it the panel floats whatever the rail is. Set it in `@theme`, not on an element. |
@@ -1327,8 +1313,7 @@ declare const AppLayout: {
1327
1313
  readonly Notice: typeof Notice;
1328
1314
  /**
1329
1315
  * The row below the notice where the user works: a `Sidebar.Nav` beside an
1330
- * `AppLayout.Content` card, and an `AppLayout.SidePanel` after it. Caps at
1331
- * `--app-layout-max-width` and centers on a wide screen.
1316
+ * `AppLayout.Content` card, and an `AppLayout.SidePanel` after it.
1332
1317
  *
1333
1318
  * @see https://mantle.ngrok.com/layouts/app-layout#applayoutworkspace
1334
1319
  *
@@ -1889,8 +1874,6 @@ declare const AppLayout: {
1889
1874
  */
1890
1875
  readonly SidePanelFooter: typeof SidePanelFooter;
1891
1876
  };
1892
- //#endregion
1893
- //#region src/components/app-layout/side-panel-state-cookie.d.ts
1894
1877
  /**
1895
1878
  * The cookie name {@link extractSidePanelStateCookie} reads and
1896
1879
  * {@link serializeSidePanelStateCookie} writes.
@@ -2012,5 +1995,4 @@ type SerializeSidePanelStateCookieOptions = {
2012
1995
  * @returns A cookie string such as `mantle-side-panel-state=closed; Max-Age=31536000; Path=/; SameSite=Lax`.
2013
1996
  */
2014
1997
  declare function serializeSidePanelStateCookie(open: boolean, options?: SerializeSidePanelStateCookieOptions): string;
2015
- //#endregion
2016
1998
  export { AppLayout, type AppLayoutSidePanelMobileBreakpoint, type AppLayoutSidePanelProps, type AppLayoutSidePanelRootProps, type AppLayoutSidePanelState, type AppLayoutSidePanelTriggerProps, SIDE_PANEL_STATE_COOKIE_NAME, type SerializeSidePanelStateCookieOptions, extractSidePanelStateCookie, serializeSidePanelStateCookie, useSidePanel };
@@ -1 +1 @@
1
- import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./button-Bkl_QYpp.js";import{r as a}from"./alert-DO00UiQe.js";import{u as o}from"./primitive-AGoxSJBI.js";import{n as s,r as c,t as l}from"./use-swipe-to-dismiss-Cj-AayFd.js";import{t as u}from"./use-is-hydrated-after-paint-r9Cl2mGp.js";import{t as d}from"./use-matches-media-query-m860lols.js";import{t as f}from"./main-CC1L9IsH.js";import{t as p}from"./tooltip-NhYXqStK.js";import{n as m}from"./cookie-ca4g5CKp.js";import{c as h}from"react/compiler-runtime";import{createContext as g,useContext as _,useEffect as v,useId as y,useLayoutEffect as b,useRef as x,useState as S}from"react";import C from"tiny-invariant";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{SidebarSimpleIcon as E}from"@phosphor-icons/react/SidebarSimple";const D=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`group/app-layout bg-base relative isolate flex h-full w-full flex-col`,`overflow-clip`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},O=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-notice`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex w-full shrink-0 flex-col`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},k=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-workspace`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex min-h-0 flex-1`,`min-w-0`,`relative`,`@container/app-layout-workspace`,`mx-auto w-full max-w-(--app-layout-max-width,128rem)`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},A=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-content`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`bg-card border-card-muted relative flex min-w-0 flex-1 flex-col rounded-xl border shadow-sm`,`m-(--app-layout-card-gutter,0.5rem)`,`overflow-clip`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},j=`h-14 group-has-data-[slot~=sidebar-header]/app-layout:h-[calc(var(--sidebar-header-height,4.5rem)-2*var(--app-layout-card-gutter,0.5rem)-2px)]`,M=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-header`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`border-card-muted flex shrink-0 items-center gap-2 border-b px-4`,j,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},ee=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-header-start`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex shrink-0 items-center gap-2`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},N=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-header-content`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex min-w-0 flex-1 items-center gap-2`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},P=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-header-actions`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`ml-auto flex shrink-0 items-center gap-2`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},F=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:f,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-body`),i[6]=c,i[7]=d);let p;i[8]===s?p=i[9]:(p=t(`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto overscroll-none`,s),i[8]=s,i[9]=p);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==p?(m=/* @__PURE__ */ w(u,{"data-slot":d,className:p,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=p,i[15]=m):m=i[15],m},te={sm:`sm:@min-side-panel-lane/app-layout-workspace:data-state-closed:basis-0 sm:[[data-slot~=app-layout-workspace]:not(:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed])))_&]:@min-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:basis-0 max-sm:absolute max-sm:inset-y-(--app-layout-card-gutter,0.5rem) max-sm:left-(--app-layout-card-gutter,0.5rem) max-sm:right-(--app-layout-card-gutter,0.5rem) max-sm:z-20 max-sm:my-0 max-sm:rounded-xl max-sm:shadow-lg max-sm:[--_side-panel-content-width:100%] max-sm:[--_side-panel-content-inset:0px] max-sm:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-sm:data-state-closed:invisible`,md:`md:@min-side-panel-lane/app-layout-workspace:data-state-closed:basis-0 md:[[data-slot~=app-layout-workspace]:not(:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed])))_&]:@min-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:basis-0 max-md:absolute max-md:inset-y-(--app-layout-card-gutter,0.5rem) max-md:right-(--app-layout-card-gutter,0.5rem) max-md:z-20 max-md:my-0 max-md:w-[min(24rem,calc(100cqw-5rem))] max-md:rounded-xl max-md:shadow-lg max-md:[--_side-panel-content-width:100%] max-md:[--_side-panel-content-inset:0px] max-md:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-md:data-state-closed:invisible max-sm:left-(--app-layout-card-gutter,0.5rem) max-sm:w-auto`,lg:`lg:@min-side-panel-lane/app-layout-workspace:data-state-closed:basis-0 lg:[[data-slot~=app-layout-workspace]:not(:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed])))_&]:@min-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:basis-0 max-lg:absolute max-lg:inset-y-(--app-layout-card-gutter,0.5rem) max-lg:right-(--app-layout-card-gutter,0.5rem) max-lg:z-20 max-lg:my-0 max-lg:w-[min(24rem,calc(100cqw-5rem))] max-lg:rounded-xl max-lg:shadow-lg max-lg:[--_side-panel-content-width:100%] max-lg:[--_side-panel-content-inset:0px] max-lg:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-lg:data-state-closed:invisible max-md:left-(--app-layout-card-gutter,0.5rem) max-md:w-auto`},ne={sm:`sm:@max-side-panel-lane-icon-rail/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))] sm:[[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))]`,md:`sm:@max-side-panel-lane-icon-rail/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))] sm:[[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))]`,lg:`md:@max-side-panel-lane-icon-rail/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))] md:[[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))]`},re={sm:`(width < 40rem)`,md:`(width < 40rem)`,lg:`(width < 48rem)`};function ie(e){return e!=null&&getComputedStyle(e).position===`absolute`}function ae(e){let t=getComputedStyle(e),n=e=>e.split(`,`).map(e=>Number.parseFloat(e)||0),r=n(t.transitionDuration),i=n(t.transitionDelay),a=t.transitionProperty.split(`,`).map((e,t)=>(r[t%r.length]??0)+(i[t%i.length]??0));return Math.max(0,...a)*1e3}const I=g(null);function L(){let e=_(I);return C(e,`useSidePanel must be used within AppLayout.SidePanelRoot.`),e.state}function oe(e){let t=_(I);return C(t,`AppLayout.${e} must be rendered inside AppLayout.SidePanelRoot.`),t}const R=e=>{let t=h(19),{children:n,defaultOpen:r,onOpenChange:i,open:o}=e,s=r!==void 0&&r,c=y(),l=o!=null,[u,d]=S(s),f=l?o:u,p=x(i),m;t[0]===i?m=t[1]:(m=()=>{p.current=i},t[0]=i,t[1]=m),b(m);let g=x(null),_=x(null),v;t[2]===l?v=t[3]:(v=e=>{l||d(e),p.current?.(e)},t[2]=l,t[3]=v);let C=v,T;t[4]!==f||t[5]!==C?(T=()=>{C(!f)},t[4]=f,t[5]=C,t[6]=T):T=t[6];let E=T,D,O;t[7]!==f||t[8]!==c?(D=()=>{if(f)return;let e=g.current;if(g.current=null,e==null)return;let t=document.getElementById(c),n=document.activeElement,r=t!=null&&t.contains(n),i=n===document.body;if(!r&&!i)return;let o=document.querySelectorAll(`[aria-controls="${c}"]`);for(let e of o)if(!(t!=null&&t.contains(e)||!a(e))&&(e.focus(),document.activeElement===e))return},O=[f,c],t[7]=f,t[8]=c,t[9]=D,t[10]=O):(D=t[9],O=t[10]),b(D,O);let k;t[11]!==f||t[12]!==c||t[13]!==C||t[14]!==E?(k={lastFocusedInsideRef:g,panelRef:_,state:{open:f,panelId:c,setOpen:C,toggle:E}},t[11]=f,t[12]=c,t[13]=C,t[14]=E,t[15]=k):k=t[15];let A=k,j;return t[16]!==n||t[17]!==A?(j=/* @__PURE__ */ w(I.Provider,{value:A,children:n}),t[16]=n,t[17]=A,t[18]=j):j=t[18],j},z=r=>{let i=h(53),a,l,f,p,m,g,_,y,b;i[0]===r?(a=i[1],l=i[2],f=i[3],p=i[4],m=i[5],g=i[6],_=i[7],y=i[8],b=i[9]):({children:a,className:l,"data-slot":f,mobileBreakpoint:b,onBlur:p,onFocus:m,onKeyDown:g,ref:y,..._}=r,i[0]=r,i[1]=a,i[2]=l,i[3]=f,i[4]=p,i[5]=m,i[6]=g,i[7]=_,i[8]=y,i[9]=b);let C=b===void 0?`lg`:b,{lastFocusedInsideRef:T,panelRef:E,state:D}=oe(`SidePanel`),{open:O,panelId:k,setOpen:A}=D,j=u(),M=e(y,E),[ee,N]=S(!O),P,F;i[10]!==O||i[11]!==E?(P=()=>{if(O){N(!1);return}let e=E.current;if(e==null)return;let t=setTimeout(()=>N(!0),ae(e));return()=>clearTimeout(t)},F=[O,E],i[10]=O,i[11]=E,i[12]=P,i[13]=F):(P=i[12],F=i[13]),v(P,F);let I=d(re[C]),L=O&&I,R;i[14]===L?R=i[15]:(R={active:L},i[14]=L,i[15]=R),s(E,R);let z;i[16]===L?z=i[17]:(z={active:L},i[16]=L,i[17]=z),c(E,z);let B=x(!1),V,H;i[18]===E?(V=i[19],H=i[20]):(V=()=>{let e=E.current;if(e==null)return;let t=t=>{t.key===`Escape`&&(B.current=o(e,t.target))};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`keydown`,t,!0)}},H=[E],i[18]=E,i[19]=V,i[20]=H),v(V,H);let U;i[21]===f?U=i[22]:(U=n(f,`app-layout-side-panel`),i[21]=f,i[22]=U);let W=!O&&ee&&`transition-none`,G=te[C],K=ne[C],q;i[23]!==l||i[24]!==W||i[25]!==G||i[26]!==K?(q=t(`relative min-w-0`,`isolate`,`overflow-x-clip`,`[--_side-panel-content-width:var(--app-layout-side-panel-width,clamp(21rem,24cqw,27rem))] [--_side-panel-content-inset:var(--app-layout-card-gutter,0.5rem)] [--_side-panel-box-width:calc(var(--app-layout-side-panel-width,clamp(21rem,24cqw,27rem))+var(--app-layout-card-gutter,0.5rem))]`,`grow-0 shrink-0 basis-(--_side-panel-box-width)`,`my-(--app-layout-card-gutter,0.5rem) mr-0 ml-0`,`transition-[flex-basis,translate,visibility] duration-200 ease-out-strong motion-reduce:transition-none not-data-hydrated:transition-none`,W,`data-state-closed:pointer-events-none`,G,`@max-side-panel-lane-icon-rail/app-layout-workspace:absolute @max-side-panel-lane-icon-rail/app-layout-workspace:inset-y-(--app-layout-card-gutter,0.5rem) @max-side-panel-lane-icon-rail/app-layout-workspace:right-(--app-layout-card-gutter,0.5rem) @max-side-panel-lane-icon-rail/app-layout-workspace:z-20 @max-side-panel-lane-icon-rail/app-layout-workspace:my-0 @max-side-panel-lane-icon-rail/app-layout-workspace:rounded-xl @max-side-panel-lane-icon-rail/app-layout-workspace:shadow-lg @max-side-panel-lane-icon-rail/app-layout-workspace:[--_side-panel-content-width:100%] @max-side-panel-lane-icon-rail/app-layout-workspace:[--_side-panel-content-inset:0px] @max-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] @max-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:invisible`,`[[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:absolute [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:inset-y-(--app-layout-card-gutter,0.5rem) [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:right-(--app-layout-card-gutter,0.5rem) [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:z-20 [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:my-0 [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:rounded-xl [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:shadow-lg [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:[--_side-panel-content-width:100%] [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:[--_side-panel-content-inset:0px] [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:data-state-closed:invisible`,K,l),i[23]=l,i[24]=W,i[25]=G,i[26]=K,i[27]=q):q=i[27];let J;i[28]!==T||i[29]!==m?(J=e=>{m?.(e),T.current=e.target},i[28]=T,i[29]=m,i[30]=J):J=i[30];let Y;i[31]!==T||i[32]!==p?(Y=e=>{p?.(e),e.relatedTarget!=null&&!e.currentTarget.contains(e.relatedTarget)&&(T.current=null)},i[31]=T,i[32]=p,i[33]=Y):Y=i[33];let X;i[34]!==g||i[35]!==A?(X=e=>{g?.(e),!(e.defaultPrevented||e.key!==`Escape`)&&ie(e.currentTarget)&&(B.current?B.current=!1:(e.preventDefault(),A(!1)))},i[34]=g,i[35]=A,i[36]=X):X=i[36];let se=O?`open`:`closed`,ce=j?``:void 0,le=!O,Z;i[37]===Symbol.for(`react.memo_cache_sentinel`)?(Z=t(`bg-card border-card-muted absolute inset-y-0 flex flex-col rounded-xl border shadow-sm`,`right-(--_side-panel-content-inset) w-(--_side-panel-content-width)`,`overflow-clip`),i[37]=Z):Z=i[37];let Q;i[38]===a?Q=i[39]:(Q=/* @__PURE__ */ w(`div`,{className:Z,children:a}),i[38]=a,i[39]=Q);let $;return i[40]!==M||i[41]!==k||i[42]!==_||i[43]!==q||i[44]!==J||i[45]!==Y||i[46]!==X||i[47]!==se||i[48]!==ce||i[49]!==le||i[50]!==Q||i[51]!==U?($=/* @__PURE__ */ w(`aside`,{ref:M,"data-slot":U,className:q,onFocus:J,onBlur:Y,onKeyDown:X,..._,id:k,"data-state":se,"data-hydrated":ce,inert:le,children:Q}),i[40]=M,i[41]=k,i[42]=_,i[43]=q,i[44]=J,i[45]=Y,i[46]=X,i[47]=se,i[48]=ce,i[49]=le,i[50]=Q,i[51]=U,i[52]=$):$=i[52],$},B=/* @__PURE__ */ w(E,{mirrored:!0}),V={Root:D,Notice:O,Workspace:k,Content:A,Header:M,HeaderStart:ee,HeaderContent:N,HeaderActions:P,Body:F,SidePanelRoot:R,SidePanel:z,SidePanelTrigger:e=>{let t=h(31),r,a,o,s,c,l,u,d;t[0]===e?(r=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8]):({appearance:s,"data-slot":r,icon:c,intent:l,label:u,onClick:a,size:d,...o}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d);let f=s===void 0?`ghost`:s,m=c===void 0?B:c,g=l===void 0?`neutral`:l,_=u===void 0?`Toggle side panel`:u,v=d===void 0?`sm`:d,{open:y,panelId:b,toggle:x}=oe(`SidePanelTrigger`).state,S;t[9]===r?S=t[10]:(S=n(r,`app-layout-side-panel-trigger`),t[9]=r,t[10]=S);let C=y?`open`:`closed`,E;t[11]!==a||t[12]!==x?(E=e=>{a?.(e),e.defaultPrevented||x()},t[11]=a,t[12]=x,t[13]=E):E=t[13];let D;t[14]!==f||t[15]!==m||t[16]!==g||t[17]!==_||t[18]!==y||t[19]!==b||t[20]!==o||t[21]!==v||t[22]!==S||t[23]!==C||t[24]!==E?(D=/* @__PURE__ */ w(p.Trigger,{asChild:!0,children:/* @__PURE__ */ w(i,{appearance:f,"aria-controls":b,"aria-expanded":y,"data-slot":S,"data-state":C,icon:m,intent:g,label:_,onClick:E,size:v,...o})}),t[14]=f,t[15]=m,t[16]=g,t[17]=_,t[18]=y,t[19]=b,t[20]=o,t[21]=v,t[22]=S,t[23]=C,t[24]=E,t[25]=D):D=t[25];let O;t[26]===_?O=t[27]:(O=/* @__PURE__ */ w(p.Content,{"data-slot":`app-layout-side-panel-trigger-tooltip`,children:_}),t[26]=_,t[27]=O);let k;return t[28]!==O||t[29]!==D?(k=/* @__PURE__ */ T(p.Root,{children:[D,O]}),t[28]=O,t[29]=D,t[30]=k):k=t[30],k},SidePanelHeader:i=>{let a=h(27),o,s,c,u,d,f;a[0]===i?(o=a[1],s=a[2],c=a[3],u=a[4],d=a[5],f=a[6]):({asChild:o,children:s,className:c,"data-slot":u,ref:f,...d}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=u,a[5]=d,a[6]=f);let p=o?r:`div`,m=_(I),g=x(null),v=e(f,g),y=m?.panelRef,b=m?.state.setOpen,S=m!=null,C;a[7]===y?.current?C=a[8]:(C=()=>ie(y?.current??null)?`translate`:`flex-basis`,a[7]=y?.current,a[8]=C);let T;a[9]===b?T=a[10]:(T=()=>{b?.(!1)},a[9]=b,a[10]=T);let E;a[11]!==y||a[12]!==S||a[13]!==C||a[14]!==T?(E={target:y,active:S,property:C,onDismiss:T},a[11]=y,a[12]=S,a[13]=C,a[14]=T,a[15]=E):E=a[15],l(g,E);let D;a[16]===u?D=a[17]:(D=n(u,`app-layout-side-panel-header`),a[16]=u,a[17]=D);let O;a[18]===c?O=a[19]:(O=t(`border-card-muted flex shrink-0 items-center gap-2 border-b px-4`,`touch-pan-y`,j,c),a[18]=c,a[19]=O);let k;return a[20]!==p||a[21]!==s||a[22]!==v||a[23]!==d||a[24]!==D||a[25]!==O?(k=/* @__PURE__ */ w(p,{ref:v,"data-slot":D,className:O,...d,children:s}),a[20]=p,a[21]=s,a[22]=v,a[23]=d,a[24]=D,a[25]=O,a[26]=k):k=a[26],k},SidePanelBody:e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-side-panel-body`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto overscroll-none`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},SidePanelFooter:e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-side-panel-footer`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex shrink-0 flex-col gap-2 px-3 pb-3`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p}},H=`mantle-side-panel-state`,U={closed:`closed`,open:`open`};function W(e){let t=m(e,H);if(t===U.open)return!0;if(t===U.closed)return!1}function G(e,t={}){let{domain:n,maxAge:r=31536e3,path:i=`/`,sameSite:a=`Lax`,secure:o=!1}=t,s=e?U.open:U.closed,c=[`${H}=${s}`,`Max-Age=${r}`,`Path=${i}`];return n!=null&&c.push(`Domain=${n}`),c.push(`SameSite=${a}`),o&&c.push(`Secure`),c.join(`; `)}export{V as AppLayout,H as SIDE_PANEL_STATE_COOKIE_NAME,W as extractSidePanelStateCookie,G as serializeSidePanelStateCookie,L as useSidePanel};
1
+ import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./button-Cwrv2Mwv.js";import{r as a}from"./alert-DO00UiQe.js";import{u as o}from"./primitive-AGoxSJBI.js";import{n as s,r as c,t as l}from"./use-swipe-to-dismiss-Cj-AayFd.js";import{t as u}from"./use-is-hydrated-after-paint-r9Cl2mGp.js";import{t as d}from"./use-matches-media-query-m860lols.js";import{t as f}from"./main-CC1L9IsH.js";import{t as p}from"./tooltip-BwMlCD6k.js";import{n as m}from"./cookie-ca4g5CKp.js";import{c as h}from"react/compiler-runtime";import{createContext as g,useContext as _,useEffect as v,useId as y,useLayoutEffect as b,useRef as x,useState as S}from"react";import C from"tiny-invariant";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{SidebarSimpleIcon as E}from"@phosphor-icons/react/SidebarSimple";const D=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`group/app-layout bg-base relative isolate flex h-full w-full flex-col`,`overflow-clip`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},O=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-notice`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex w-full shrink-0 flex-col`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},k=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-workspace`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex min-h-0 flex-1`,`min-w-0`,`relative`,`@container/app-layout-workspace`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},A=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-content`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`bg-card border-card-muted relative flex min-w-0 flex-1 flex-col rounded-xl border shadow-sm`,`m-(--app-layout-card-gutter,0.5rem)`,`overflow-clip`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},j=`h-14 group-has-data-[slot~=sidebar-header]/app-layout:h-[calc(var(--sidebar-header-height,4.5rem)-2*var(--app-layout-card-gutter,0.5rem)-2px)]`,M=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-header`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`border-card-muted flex shrink-0 items-center gap-2 border-b px-4`,j,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},ee=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-header-start`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex shrink-0 items-center gap-2`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},N=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-header-content`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex min-w-0 flex-1 items-center gap-2`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},P=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-header-actions`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`ml-auto flex shrink-0 items-center gap-2`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},F=e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:f,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-body`),i[6]=c,i[7]=d);let p;i[8]===s?p=i[9]:(p=t(`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto overscroll-none`,s),i[8]=s,i[9]=p);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==p?(m=/* @__PURE__ */ w(u,{"data-slot":d,className:p,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=p,i[15]=m):m=i[15],m},te={sm:`sm:@min-side-panel-lane/app-layout-workspace:data-state-closed:basis-0 sm:[[data-slot~=app-layout-workspace]:not(:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed])))_&]:@min-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:basis-0 max-sm:absolute max-sm:inset-y-(--app-layout-card-gutter,0.5rem) max-sm:left-(--app-layout-card-gutter,0.5rem) max-sm:right-(--app-layout-card-gutter,0.5rem) max-sm:z-20 max-sm:my-0 max-sm:rounded-xl max-sm:shadow-lg max-sm:[--_side-panel-content-width:100%] max-sm:[--_side-panel-content-inset:0px] max-sm:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-sm:data-state-closed:invisible`,md:`md:@min-side-panel-lane/app-layout-workspace:data-state-closed:basis-0 md:[[data-slot~=app-layout-workspace]:not(:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed])))_&]:@min-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:basis-0 max-md:absolute max-md:inset-y-(--app-layout-card-gutter,0.5rem) max-md:right-(--app-layout-card-gutter,0.5rem) max-md:z-20 max-md:my-0 max-md:w-[min(24rem,calc(100cqw-5rem))] max-md:rounded-xl max-md:shadow-lg max-md:[--_side-panel-content-width:100%] max-md:[--_side-panel-content-inset:0px] max-md:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-md:data-state-closed:invisible max-sm:left-(--app-layout-card-gutter,0.5rem) max-sm:w-auto`,lg:`lg:@min-side-panel-lane/app-layout-workspace:data-state-closed:basis-0 lg:[[data-slot~=app-layout-workspace]:not(:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed])))_&]:@min-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:basis-0 max-lg:absolute max-lg:inset-y-(--app-layout-card-gutter,0.5rem) max-lg:right-(--app-layout-card-gutter,0.5rem) max-lg:z-20 max-lg:my-0 max-lg:w-[min(24rem,calc(100cqw-5rem))] max-lg:rounded-xl max-lg:shadow-lg max-lg:[--_side-panel-content-width:100%] max-lg:[--_side-panel-content-inset:0px] max-lg:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] max-lg:data-state-closed:invisible max-md:left-(--app-layout-card-gutter,0.5rem) max-md:w-auto`},ne={sm:`sm:@max-side-panel-lane-icon-rail/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))] sm:[[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))]`,md:`sm:@max-side-panel-lane-icon-rail/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))] sm:[[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))]`,lg:`md:@max-side-panel-lane-icon-rail/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))] md:[[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:w-[min(24rem,calc(100cqw-5rem))]`},re={sm:`(width < 40rem)`,md:`(width < 40rem)`,lg:`(width < 48rem)`};function ie(e){return e!=null&&getComputedStyle(e).position===`absolute`}function I(e){return e.split(`,`).map(e=>Number.parseFloat(e)||0)}function ae(e){let t=getComputedStyle(e),n=I(t.transitionDuration),r=I(t.transitionDelay),i=t.transitionProperty.split(`,`).map((e,t)=>(n[t%n.length]??0)+(r[t%r.length]??0));return Math.max(0,...i)*1e3}const L=g(null);function R(){let e=_(L);return C(e,`useSidePanel must be used within AppLayout.SidePanelRoot.`),e.state}function oe(e){let t=_(L);return C(t,`AppLayout.${e} must be rendered inside AppLayout.SidePanelRoot.`),t}const z=e=>{let t=h(19),{children:n,defaultOpen:r,onOpenChange:i,open:o}=e,s=r!==void 0&&r,c=y(),l=o!=null,[u,d]=S(s),f=l?o:u,p=x(i),m;t[0]===i?m=t[1]:(m=()=>{p.current=i},t[0]=i,t[1]=m),b(m);let g=x(null),_=x(null),v;t[2]===l?v=t[3]:(v=e=>{l||d(e),p.current?.(e)},t[2]=l,t[3]=v);let C=v,T;t[4]!==f||t[5]!==C?(T=()=>{C(!f)},t[4]=f,t[5]=C,t[6]=T):T=t[6];let E=T,D,O;t[7]!==f||t[8]!==c?(D=()=>{if(f)return;let e=g.current;if(g.current=null,e==null)return;let t=document.getElementById(c),n=document.activeElement,r=t!=null&&t.contains(n),i=n===document.body;if(!r&&!i)return;let o=document.querySelectorAll(`[aria-controls="${c}"]`);for(let e of o)if(!(t!=null&&t.contains(e)||!a(e))&&(e.focus(),document.activeElement===e))return},O=[f,c],t[7]=f,t[8]=c,t[9]=D,t[10]=O):(D=t[9],O=t[10]),b(D,O);let k;t[11]!==f||t[12]!==c||t[13]!==C||t[14]!==E?(k={lastFocusedInsideRef:g,panelRef:_,state:{open:f,panelId:c,setOpen:C,toggle:E}},t[11]=f,t[12]=c,t[13]=C,t[14]=E,t[15]=k):k=t[15];let A=k,j;return t[16]!==n||t[17]!==A?(j=/* @__PURE__ */ w(L.Provider,{value:A,children:n}),t[16]=n,t[17]=A,t[18]=j):j=t[18],j},B=r=>{let i=h(53),a,l,f,p,m,g,_,y,b;i[0]===r?(a=i[1],l=i[2],f=i[3],p=i[4],m=i[5],g=i[6],_=i[7],y=i[8],b=i[9]):({children:a,className:l,"data-slot":f,mobileBreakpoint:b,onBlur:p,onFocus:m,onKeyDown:g,ref:y,..._}=r,i[0]=r,i[1]=a,i[2]=l,i[3]=f,i[4]=p,i[5]=m,i[6]=g,i[7]=_,i[8]=y,i[9]=b);let C=b===void 0?`lg`:b,{lastFocusedInsideRef:T,panelRef:E,state:D}=oe(`SidePanel`),{open:O,panelId:k,setOpen:A}=D,j=u(),M=e(y,E),[ee,N]=S(!O),P,F;i[10]!==O||i[11]!==E?(P=()=>{if(O){N(!1);return}let e=E.current;if(e==null)return;let t=setTimeout(()=>N(!0),ae(e));return()=>clearTimeout(t)},F=[O,E],i[10]=O,i[11]=E,i[12]=P,i[13]=F):(P=i[12],F=i[13]),v(P,F);let I=d(re[C]),L=O&&I,R;i[14]===L?R=i[15]:(R={active:L},i[14]=L,i[15]=R),s(E,R);let z;i[16]===L?z=i[17]:(z={active:L},i[16]=L,i[17]=z),c(E,z);let B=x(!1),V,H;i[18]===E?(V=i[19],H=i[20]):(V=()=>{let e=E.current;if(e==null)return;let t=t=>{t.key===`Escape`&&(B.current=o(e,t.target))};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`keydown`,t,!0)}},H=[E],i[18]=E,i[19]=V,i[20]=H),v(V,H);let U;i[21]===f?U=i[22]:(U=n(f,`app-layout-side-panel`),i[21]=f,i[22]=U);let W=!O&&ee&&`transition-none`,G=te[C],K=ne[C],q;i[23]!==l||i[24]!==W||i[25]!==G||i[26]!==K?(q=t(`relative min-w-0`,`isolate`,`overflow-x-clip`,`[--_side-panel-content-width:var(--app-layout-side-panel-width,clamp(21rem,24cqw,27rem))] [--_side-panel-content-inset:var(--app-layout-card-gutter,0.5rem)] [--_side-panel-box-width:calc(var(--app-layout-side-panel-width,clamp(21rem,24cqw,27rem))+var(--app-layout-card-gutter,0.5rem))]`,`grow-0 shrink-0 basis-(--_side-panel-box-width)`,`my-(--app-layout-card-gutter,0.5rem) mr-0 ml-0`,`transition-[flex-basis,translate,visibility] duration-200 ease-out-strong motion-reduce:transition-none not-data-hydrated:transition-none`,W,`data-state-closed:pointer-events-none`,G,`@max-side-panel-lane-icon-rail/app-layout-workspace:absolute @max-side-panel-lane-icon-rail/app-layout-workspace:inset-y-(--app-layout-card-gutter,0.5rem) @max-side-panel-lane-icon-rail/app-layout-workspace:right-(--app-layout-card-gutter,0.5rem) @max-side-panel-lane-icon-rail/app-layout-workspace:z-20 @max-side-panel-lane-icon-rail/app-layout-workspace:my-0 @max-side-panel-lane-icon-rail/app-layout-workspace:rounded-xl @max-side-panel-lane-icon-rail/app-layout-workspace:shadow-lg @max-side-panel-lane-icon-rail/app-layout-workspace:[--_side-panel-content-width:100%] @max-side-panel-lane-icon-rail/app-layout-workspace:[--_side-panel-content-inset:0px] @max-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] @max-side-panel-lane-icon-rail/app-layout-workspace:data-state-closed:invisible`,`[[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:absolute [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:inset-y-(--app-layout-card-gutter,0.5rem) [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:right-(--app-layout-card-gutter,0.5rem) [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:z-20 [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:my-0 [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:rounded-xl [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:shadow-lg [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:[--_side-panel-content-width:100%] [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:[--_side-panel-content-inset:0px] [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:data-state-closed:translate-x-[calc(100%+var(--app-layout-card-gutter,0.5rem))] [[data-slot~=app-layout-workspace]:has(>[data-slot~=sidebar-nav]:not([data-state~=collapsed]))_&]:@max-side-panel-lane/app-layout-workspace:data-state-closed:invisible`,K,l),i[23]=l,i[24]=W,i[25]=G,i[26]=K,i[27]=q):q=i[27];let J;i[28]!==T||i[29]!==m?(J=e=>{m?.(e),T.current=e.target},i[28]=T,i[29]=m,i[30]=J):J=i[30];let Y;i[31]!==T||i[32]!==p?(Y=e=>{p?.(e),e.relatedTarget!=null&&!e.currentTarget.contains(e.relatedTarget)&&(T.current=null)},i[31]=T,i[32]=p,i[33]=Y):Y=i[33];let X;i[34]!==g||i[35]!==A?(X=e=>{g?.(e),!(e.defaultPrevented||e.key!==`Escape`)&&ie(e.currentTarget)&&(B.current?B.current=!1:(e.preventDefault(),A(!1)))},i[34]=g,i[35]=A,i[36]=X):X=i[36];let se=O?`open`:`closed`,ce=j?``:void 0,le=!O,Z;i[37]===Symbol.for(`react.memo_cache_sentinel`)?(Z=t(`bg-card border-card-muted absolute inset-y-0 flex flex-col rounded-xl border shadow-sm`,`right-(--_side-panel-content-inset) w-(--_side-panel-content-width)`,`overflow-clip`),i[37]=Z):Z=i[37];let Q;i[38]===a?Q=i[39]:(Q=/* @__PURE__ */ w(`div`,{className:Z,children:a}),i[38]=a,i[39]=Q);let $;return i[40]!==M||i[41]!==k||i[42]!==_||i[43]!==q||i[44]!==J||i[45]!==Y||i[46]!==X||i[47]!==se||i[48]!==ce||i[49]!==le||i[50]!==Q||i[51]!==U?($=/* @__PURE__ */ w(`aside`,{ref:M,"data-slot":U,className:q,onFocus:J,onBlur:Y,onKeyDown:X,..._,id:k,"data-state":se,"data-hydrated":ce,inert:le,children:Q}),i[40]=M,i[41]=k,i[42]=_,i[43]=q,i[44]=J,i[45]=Y,i[46]=X,i[47]=se,i[48]=ce,i[49]=le,i[50]=Q,i[51]=U,i[52]=$):$=i[52],$},V=/* @__PURE__ */ w(E,{mirrored:!0}),H={Root:D,Notice:O,Workspace:k,Content:A,Header:M,HeaderStart:ee,HeaderContent:N,HeaderActions:P,Body:F,SidePanelRoot:z,SidePanel:B,SidePanelTrigger:e=>{let t=h(31),r,a,o,s,c,l,u,d;t[0]===e?(r=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8]):({appearance:s,"data-slot":r,icon:c,intent:l,label:u,onClick:a,size:d,...o}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d);let f=s===void 0?`ghost`:s,m=c===void 0?V:c,g=l===void 0?`neutral`:l,_=u===void 0?`Toggle side panel`:u,v=d===void 0?`sm`:d,{open:y,panelId:b,toggle:x}=oe(`SidePanelTrigger`).state,S;t[9]===r?S=t[10]:(S=n(r,`app-layout-side-panel-trigger`),t[9]=r,t[10]=S);let C=y?`open`:`closed`,E;t[11]!==a||t[12]!==x?(E=e=>{a?.(e),e.defaultPrevented||x()},t[11]=a,t[12]=x,t[13]=E):E=t[13];let D;t[14]!==f||t[15]!==m||t[16]!==g||t[17]!==_||t[18]!==y||t[19]!==b||t[20]!==o||t[21]!==v||t[22]!==S||t[23]!==C||t[24]!==E?(D=/* @__PURE__ */ w(p.Trigger,{asChild:!0,children:/* @__PURE__ */ w(i,{appearance:f,"aria-controls":b,"aria-expanded":y,"data-slot":S,"data-state":C,icon:m,intent:g,label:_,onClick:E,size:v,...o})}),t[14]=f,t[15]=m,t[16]=g,t[17]=_,t[18]=y,t[19]=b,t[20]=o,t[21]=v,t[22]=S,t[23]=C,t[24]=E,t[25]=D):D=t[25];let O;t[26]===_?O=t[27]:(O=/* @__PURE__ */ w(p.Content,{"data-slot":`app-layout-side-panel-trigger-tooltip`,children:_}),t[26]=_,t[27]=O);let k;return t[28]!==O||t[29]!==D?(k=/* @__PURE__ */ T(p.Root,{children:[D,O]}),t[28]=O,t[29]=D,t[30]=k):k=t[30],k},SidePanelHeader:i=>{let a=h(27),o,s,c,u,d,f;a[0]===i?(o=a[1],s=a[2],c=a[3],u=a[4],d=a[5],f=a[6]):({asChild:o,children:s,className:c,"data-slot":u,ref:f,...d}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=u,a[5]=d,a[6]=f);let p=o?r:`div`,m=_(L),g=x(null),v=e(f,g),y=m?.panelRef,b=m?.state.setOpen,S=m!=null,C;a[7]===y?.current?C=a[8]:(C=()=>ie(y?.current??null)?`translate`:`flex-basis`,a[7]=y?.current,a[8]=C);let T;a[9]===b?T=a[10]:(T=()=>{b?.(!1)},a[9]=b,a[10]=T);let E;a[11]!==y||a[12]!==S||a[13]!==C||a[14]!==T?(E={target:y,active:S,property:C,onDismiss:T},a[11]=y,a[12]=S,a[13]=C,a[14]=T,a[15]=E):E=a[15],l(g,E);let D;a[16]===u?D=a[17]:(D=n(u,`app-layout-side-panel-header`),a[16]=u,a[17]=D);let O;a[18]===c?O=a[19]:(O=t(`border-card-muted flex shrink-0 items-center gap-2 border-b px-4`,`touch-pan-y`,j,c),a[18]=c,a[19]=O);let k;return a[20]!==p||a[21]!==s||a[22]!==v||a[23]!==d||a[24]!==D||a[25]!==O?(k=/* @__PURE__ */ w(p,{ref:v,"data-slot":D,className:O,...d,children:s}),a[20]=p,a[21]=s,a[22]=v,a[23]=d,a[24]=D,a[25]=O,a[26]=k):k=a[26],k},SidePanelBody:e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-side-panel-body`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto overscroll-none`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},SidePanelFooter:e=>{let i=h(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===c?d=i[7]:(d=n(c,`app-layout-side-panel-footer`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=t(`flex shrink-0 flex-col gap-2 px-3 pb-3`,s),i[8]=s,i[9]=f);let p;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ w(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p}},U=`mantle-side-panel-state`,W={closed:`closed`,open:`open`};function G(e){let t=m(e,U);if(t===W.open)return!0;if(t===W.closed)return!1}function K(e,t={}){let{domain:n,maxAge:r=31536e3,path:i=`/`,sameSite:a=`Lax`,secure:o=!1}=t,s=e?W.open:W.closed,c=[`${U}=${s}`,`Max-Age=${r}`,`Path=${i}`];return n!=null&&c.push(`Domain=${n}`),c.push(`SameSite=${a}`),o&&c.push(`Secure`),c.join(`; `)}export{H as AppLayout,U as SIDE_PANEL_STATE_COOKIE_NAME,G as extractSidePanelStateCookie,K as serializeSidePanelStateCookie,R as useSidePanel};
@@ -1,5 +1,4 @@
1
- import { _ as CurveKind, a as GridPrimitiveProps, c as TooltipPrimitiveProps, g as ContinuousXScale, h as ChartSeriesSlot, i as CopyButtonPrimitiveProps, l as XAxisPrimitiveProps, m as ChartDatumEvent, n as ChartMode, o as LegendPrimitiveProps, p as ChartDatum, r as ChartRootBaseProps, s as ReferenceLinePrimitiveProps, t as ChartAccessibilityProps, u as YAxisPrimitiveProps, v as PointShape, y as SeriesColor } from "./chart-23KQ1ZNO.js";
2
- //#region src/components/area-chart/area-chart.d.ts
1
+ import { _ as CurveKind, a as GridPrimitiveProps, c as TooltipPrimitiveProps, g as ContinuousXScale, h as ChartSeriesSlot, i as CopyButtonPrimitiveProps, l as XAxisPrimitiveProps, m as ChartDatumEvent, n as ChartMode, o as LegendPrimitiveProps, p as ChartDatum, r as ChartRootBaseProps, s as ReferenceLinePrimitiveProps, t as ChartAccessibilityProps, u as YAxisPrimitiveProps, v as PointShape, y as SeriesColor } from "./chart-ynMysD16.js";
3
2
  /**
4
3
  * Props for {@link AreaChart.Root}. Areas fill from a shared zero baseline, so
5
4
  * the y domain minimum is fixed at `0` — a truncated-area axis is
@@ -44,7 +43,7 @@ type AreaChartAreaProps = {
44
43
  * not change the series slot or its paired point shape. When omitted, the
45
44
  * series paints the color from its slot.
46
45
  *
47
- * A static color (raw hex) cannot follow the four themes, so prefer a
46
+ * A static color (raw hex) cannot follow the two themes, so prefer a
48
47
  * `var(--your-token)` declared per theme. A series that carries good/bad
49
48
  * meaning should wear the semantic status colors, never a categorical slot.
50
49
  */
@@ -593,5 +592,4 @@ declare const AreaChart: {
593
592
  */
594
593
  readonly CopyButton: typeof CopyButton;
595
594
  };
596
- //#endregion
597
595
  export { AreaChart, type AreaChartAreaProps, type AreaChartCopyButtonProps, type AreaChartGridProps, type AreaChartLegendProps, type AreaChartReferenceLineProps, type AreaChartRootProps, type AreaChartTooltipProps, type AreaChartXAxisProps, type AreaChartYAxisProps, type ChartDatumEvent, type ChartMode };
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BfJ835dr.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(o,{kind:`area`,componentName:`AreaChart`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n},Area:e=>a(`AreaChart.Area`,`area`,e),Grid:e=>n(`AreaChart.Grid`,e),XAxis:e=>t(`AreaChart.XAxis`,e),YAxis:e=>r(`AreaChart.YAxis`,e),ReferenceLine:t=>e(`AreaChart.ReferenceLine`,t),Tooltip:e=>s(`AreaChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`AreaChart.Legend`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(c,{partName:`AreaChart.CopyButton`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as AreaChart};
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-D2LtDZtV.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(o,{kind:`area`,componentName:`AreaChart`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n},Area:e=>a(`AreaChart.Area`,`area`,e),Grid:e=>n(`AreaChart.Grid`,e),XAxis:e=>t(`AreaChart.XAxis`,e),YAxis:e=>r(`AreaChart.YAxis`,e),ReferenceLine:t=>e(`AreaChart.ReferenceLine`,t),Tooltip:e=>s(`AreaChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`AreaChart.Legend`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(c,{partName:`AreaChart.CopyButton`,slotName:`area-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as AreaChart};
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
- //#region src/types/as-child.d.ts
3
2
  /**
4
3
  * Utility type for adding the optional `asChild` boolean prop to a component.
5
4
  */
@@ -45,5 +44,4 @@ type SelfClosingWithAsChild = {
45
44
  asChild?: false | undefined;
46
45
  children?: undefined;
47
46
  };
48
- //#endregion
49
47
  export { WithAsChild as n, SelfClosingWithAsChild as t };
package/dist/avatar.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
1
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
3
  import { ComponentProps, ReactEventHandler, ReactNode } from "react";
4
- //#region src/components/avatar/avatar.d.ts
5
4
  /**
6
5
  * The shape an `Avatar.Root` renders as. Circles read as people, rounded
7
6
  * squares as the things people belong to — accounts, workspaces, teams,
@@ -315,5 +314,4 @@ declare const Avatar: {
315
314
  */
316
315
  readonly Fallback: typeof Fallback;
317
316
  };
318
- //#endregion
319
317
  export { Avatar, type AvatarAppearance, type AvatarFallbackProps, type AvatarImageProps, type AvatarRootProps };