@misael703/ui 1.30.6 → 1.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/chunk-2KZ4NI3X.js +5 -0
  2. package/dist/{chunk-427NHGTX.js.map → chunk-2KZ4NI3X.js.map} +1 -1
  3. package/dist/{chunk-YLISYQNI.js → chunk-2PNXLTEM.js} +3 -3
  4. package/dist/{chunk-YLISYQNI.js.map → chunk-2PNXLTEM.js.map} +1 -1
  5. package/dist/{chunk-PPU5WKZS.js → chunk-2PYCF6XS.js} +3 -3
  6. package/dist/{chunk-PPU5WKZS.js.map → chunk-2PYCF6XS.js.map} +1 -1
  7. package/dist/{chunk-6HNR25ID.js → chunk-3JRP3DGM.js} +3 -3
  8. package/dist/{chunk-6HNR25ID.js.map → chunk-3JRP3DGM.js.map} +1 -1
  9. package/dist/chunk-55P5FA5Q.js +64 -0
  10. package/dist/chunk-55P5FA5Q.js.map +1 -0
  11. package/dist/{chunk-MVY4UEFB.mjs → chunk-5ZI3IKRP.mjs} +4 -4
  12. package/dist/{chunk-MVY4UEFB.mjs.map → chunk-5ZI3IKRP.mjs.map} +1 -1
  13. package/dist/{chunk-PVSP7Y2F.mjs → chunk-6PTQE6P6.mjs} +5 -5
  14. package/dist/{chunk-PVSP7Y2F.mjs.map → chunk-6PTQE6P6.mjs.map} +1 -1
  15. package/dist/{chunk-OEFOGREP.js → chunk-6QG4W5G6.js} +9 -9
  16. package/dist/{chunk-OEFOGREP.js.map → chunk-6QG4W5G6.js.map} +1 -1
  17. package/dist/chunk-6W7ZGWNA.mjs +19 -0
  18. package/dist/chunk-6W7ZGWNA.mjs.map +1 -0
  19. package/dist/{chunk-3U6C2BFM.mjs → chunk-7LZ4SQRQ.mjs} +6 -66
  20. package/dist/chunk-7LZ4SQRQ.mjs.map +1 -0
  21. package/dist/{chunk-3OT3FROI.js → chunk-CWP6W6BU.js} +3 -3
  22. package/dist/{chunk-3OT3FROI.js.map → chunk-CWP6W6BU.js.map} +1 -1
  23. package/dist/chunk-D2H4VZVL.js +49 -0
  24. package/dist/chunk-D2H4VZVL.js.map +1 -0
  25. package/dist/{chunk-4RHJW6JI.js → chunk-DCNHRBN6.js} +6 -6
  26. package/dist/{chunk-4RHJW6JI.js.map → chunk-DCNHRBN6.js.map} +1 -1
  27. package/dist/{chunk-5OMB6FC5.mjs → chunk-DTWQA7TN.mjs} +4 -4
  28. package/dist/{chunk-5OMB6FC5.mjs.map → chunk-DTWQA7TN.mjs.map} +1 -1
  29. package/dist/{chunk-B4BPE3LC.mjs → chunk-E2W2OSGG.mjs} +3 -3
  30. package/dist/{chunk-B4BPE3LC.mjs.map → chunk-E2W2OSGG.mjs.map} +1 -1
  31. package/dist/{chunk-TD732KXM.js → chunk-EAVUJY3H.js} +8 -8
  32. package/dist/{chunk-TD732KXM.js.map → chunk-EAVUJY3H.js.map} +1 -1
  33. package/dist/{chunk-MSEDQM7C.mjs → chunk-EHJNOVHL.mjs} +3 -3
  34. package/dist/{chunk-MSEDQM7C.mjs.map → chunk-EHJNOVHL.mjs.map} +1 -1
  35. package/dist/{chunk-CDX256RG.mjs → chunk-FR4JV3JA.mjs} +3 -3
  36. package/dist/{chunk-CDX256RG.mjs.map → chunk-FR4JV3JA.mjs.map} +1 -1
  37. package/dist/{chunk-KS7CSKO6.js → chunk-FTBA676Q.js} +9 -9
  38. package/dist/{chunk-KS7CSKO6.js.map → chunk-FTBA676Q.js.map} +1 -1
  39. package/dist/{chunk-A6DHNAM7.js → chunk-HCTY5QYL.js} +3 -3
  40. package/dist/{chunk-A6DHNAM7.js.map → chunk-HCTY5QYL.js.map} +1 -1
  41. package/dist/{chunk-WGEEYXVZ.js → chunk-ITYDWKUE.js} +6 -6
  42. package/dist/{chunk-WGEEYXVZ.js.map → chunk-ITYDWKUE.js.map} +1 -1
  43. package/dist/{chunk-VAAB5DXM.js → chunk-J45LTOIA.js} +10 -10
  44. package/dist/{chunk-VAAB5DXM.js.map → chunk-J45LTOIA.js.map} +1 -1
  45. package/dist/{chunk-JO5WBKF2.mjs → chunk-JWDUUZ7S.mjs} +4 -4
  46. package/dist/{chunk-JO5WBKF2.mjs.map → chunk-JWDUUZ7S.mjs.map} +1 -1
  47. package/dist/{chunk-D4K255ZA.mjs → chunk-KDCMQRYI.mjs} +5 -5
  48. package/dist/{chunk-D4K255ZA.mjs.map → chunk-KDCMQRYI.mjs.map} +1 -1
  49. package/dist/{chunk-6DMU73SO.js → chunk-KNKIJOES.js} +10 -10
  50. package/dist/{chunk-6DMU73SO.js.map → chunk-KNKIJOES.js.map} +1 -1
  51. package/dist/{chunk-Q4HKSXUE.mjs → chunk-KVOPVYZ5.mjs} +2 -2
  52. package/dist/chunk-KVOPVYZ5.mjs.map +1 -0
  53. package/dist/{chunk-M3RO3GSC.js → chunk-KXN6KNGE.js} +9 -9
  54. package/dist/{chunk-M3RO3GSC.js.map → chunk-KXN6KNGE.js.map} +1 -1
  55. package/dist/{chunk-F3O6JAL3.js → chunk-L7IEAJSD.js} +6 -6
  56. package/dist/{chunk-F3O6JAL3.js.map → chunk-L7IEAJSD.js.map} +1 -1
  57. package/dist/{chunk-AZTZAY2S.mjs → chunk-LGGNY6CR.mjs} +3 -3
  58. package/dist/{chunk-AZTZAY2S.mjs.map → chunk-LGGNY6CR.mjs.map} +1 -1
  59. package/dist/{chunk-H7HFKEUI.js → chunk-LOQG2PQC.js} +7 -7
  60. package/dist/{chunk-H7HFKEUI.js.map → chunk-LOQG2PQC.js.map} +1 -1
  61. package/dist/{chunk-Q3DKZR44.js → chunk-MKDSS4XD.js} +14 -74
  62. package/dist/chunk-MKDSS4XD.js.map +1 -0
  63. package/dist/{chunk-DMMZWL7W.js → chunk-MW7HQCFC.js} +3 -3
  64. package/dist/{chunk-DMMZWL7W.js.map → chunk-MW7HQCFC.js.map} +1 -1
  65. package/dist/{chunk-NCXODB4O.mjs → chunk-NOEX3LCS.mjs} +5 -5
  66. package/dist/{chunk-NCXODB4O.mjs.map → chunk-NOEX3LCS.mjs.map} +1 -1
  67. package/dist/chunk-NPXEZCTA.js +41 -0
  68. package/dist/chunk-NPXEZCTA.js.map +1 -0
  69. package/dist/{chunk-EB4TS7VJ.mjs → chunk-NQGUJ4B5.mjs} +4 -4
  70. package/dist/{chunk-EB4TS7VJ.mjs.map → chunk-NQGUJ4B5.mjs.map} +1 -1
  71. package/dist/{chunk-ARGGKLQD.mjs → chunk-NS6CI6RP.mjs} +3 -3
  72. package/dist/{chunk-ARGGKLQD.mjs.map → chunk-NS6CI6RP.mjs.map} +1 -1
  73. package/dist/chunk-NSVOLN37.mjs +179 -0
  74. package/dist/chunk-NSVOLN37.mjs.map +1 -0
  75. package/dist/{chunk-CUWWADL2.mjs → chunk-P2DHZE7T.mjs} +5 -5
  76. package/dist/{chunk-CUWWADL2.mjs.map → chunk-P2DHZE7T.mjs.map} +1 -1
  77. package/dist/{chunk-PQV7HHCJ.mjs → chunk-PBWX4LU2.mjs} +2 -7
  78. package/dist/chunk-PBWX4LU2.mjs.map +1 -0
  79. package/dist/{chunk-Y6EGYS4L.mjs → chunk-PUXXDABJ.mjs} +4 -4
  80. package/dist/{chunk-Y6EGYS4L.mjs.map → chunk-PUXXDABJ.mjs.map} +1 -1
  81. package/dist/{chunk-2T5KZJGY.js → chunk-QC3XHUF4.js} +6 -6
  82. package/dist/{chunk-2T5KZJGY.js.map → chunk-QC3XHUF4.js.map} +1 -1
  83. package/dist/chunk-QQE3XOEM.mjs +4 -0
  84. package/dist/{chunk-BVQRDAR7.mjs.map → chunk-QQE3XOEM.mjs.map} +1 -1
  85. package/dist/chunk-R5DCDEB5.mjs +27 -0
  86. package/dist/chunk-R5DCDEB5.mjs.map +1 -0
  87. package/dist/{chunk-QAOFEIG4.mjs → chunk-RBN52555.mjs} +3 -3
  88. package/dist/{chunk-QAOFEIG4.mjs.map → chunk-RBN52555.mjs.map} +1 -1
  89. package/dist/{chunk-DFQLWCIC.js → chunk-RJJH6UZU.js} +2 -2
  90. package/dist/chunk-RJJH6UZU.js.map +1 -0
  91. package/dist/{chunk-CXYZK3TK.js → chunk-S4BZUUKZ.js} +3 -3
  92. package/dist/{chunk-CXYZK3TK.js.map → chunk-S4BZUUKZ.js.map} +1 -1
  93. package/dist/{chunk-ADF5YEMJ.mjs → chunk-SEYLCARU.mjs} +4 -4
  94. package/dist/{chunk-ADF5YEMJ.mjs.map → chunk-SEYLCARU.mjs.map} +1 -1
  95. package/dist/{chunk-PMTOBCWV.mjs → chunk-TYL5CFWF.mjs} +4 -4
  96. package/dist/{chunk-PMTOBCWV.mjs.map → chunk-TYL5CFWF.mjs.map} +1 -1
  97. package/dist/{chunk-2LMR2PHY.js → chunk-U3F5EBK3.js} +6 -6
  98. package/dist/{chunk-2LMR2PHY.js.map → chunk-U3F5EBK3.js.map} +1 -1
  99. package/dist/{chunk-4VMQLSHV.js → chunk-U6ZXX4WF.js} +2 -7
  100. package/dist/chunk-U6ZXX4WF.js.map +1 -0
  101. package/dist/{chunk-24TLFBBQ.mjs → chunk-ULRTSRBP.mjs} +3 -3
  102. package/dist/{chunk-24TLFBBQ.mjs.map → chunk-ULRTSRBP.mjs.map} +1 -1
  103. package/dist/{chunk-LJG3AH7G.mjs → chunk-V54BL7YF.mjs} +4 -4
  104. package/dist/{chunk-LJG3AH7G.mjs.map → chunk-V54BL7YF.mjs.map} +1 -1
  105. package/dist/{chunk-NDMMQZZZ.js → chunk-VG5JCUPO.js} +13 -13
  106. package/dist/{chunk-NDMMQZZZ.js.map → chunk-VG5JCUPO.js.map} +1 -1
  107. package/dist/{chunk-I3ADS32J.mjs → chunk-VX2D4AGI.mjs} +4 -4
  108. package/dist/{chunk-I3ADS32J.mjs.map → chunk-VX2D4AGI.mjs.map} +1 -1
  109. package/dist/chunk-WQAGBJTY.js +202 -0
  110. package/dist/chunk-WQAGBJTY.js.map +1 -0
  111. package/dist/{chunk-STZ7YDMR.mjs → chunk-X36H75RR.mjs} +3 -3
  112. package/dist/{chunk-STZ7YDMR.mjs.map → chunk-X36H75RR.mjs.map} +1 -1
  113. package/dist/{chunk-TCFO7YBF.js → chunk-X62VJCF3.js} +7 -7
  114. package/dist/{chunk-TCFO7YBF.js.map → chunk-X62VJCF3.js.map} +1 -1
  115. package/dist/chunk-XOV4D6J3.mjs +42 -0
  116. package/dist/chunk-XOV4D6J3.mjs.map +1 -0
  117. package/dist/{chunk-RDX3D3P5.mjs → chunk-YXUYWO2W.mjs} +3 -3
  118. package/dist/{chunk-RDX3D3P5.mjs.map → chunk-YXUYWO2W.mjs.map} +1 -1
  119. package/dist/{chunk-LJSNE6YQ.js → chunk-ZKPFXBE7.js} +4 -4
  120. package/dist/{chunk-LJSNE6YQ.js.map → chunk-ZKPFXBE7.js.map} +1 -1
  121. package/dist/components/AdvancedPickers.js +9 -9
  122. package/dist/components/AdvancedPickers.mjs +5 -5
  123. package/dist/components/AppShell.d.mts +48 -81
  124. package/dist/components/AppShell.d.ts +48 -81
  125. package/dist/components/AppShell.js +11 -5
  126. package/dist/components/AppShell.mjs +9 -3
  127. package/dist/components/Comments.js +8 -8
  128. package/dist/components/Comments.mjs +5 -5
  129. package/dist/components/Commerce.js +22 -16
  130. package/dist/components/Commerce.mjs +11 -5
  131. package/dist/components/ContextMenu.js +3 -3
  132. package/dist/components/ContextMenu.mjs +2 -2
  133. package/dist/components/DataTable.js +10 -10
  134. package/dist/components/DataTable.mjs +4 -4
  135. package/dist/components/Display.js +13 -13
  136. package/dist/components/Display.mjs +2 -2
  137. package/dist/components/Display2.js +6 -6
  138. package/dist/components/Display2.mjs +2 -2
  139. package/dist/components/Display3.js +11 -11
  140. package/dist/components/Display3.mjs +5 -5
  141. package/dist/components/Editing.js +15 -9
  142. package/dist/components/Editing.mjs +10 -4
  143. package/dist/components/Filters.js +9 -9
  144. package/dist/components/Filters.mjs +3 -3
  145. package/dist/components/Gallery.js +5 -5
  146. package/dist/components/Gallery.mjs +3 -3
  147. package/dist/components/HoverCard.js +3 -3
  148. package/dist/components/HoverCard.mjs +2 -2
  149. package/dist/components/Inputs.js +7 -7
  150. package/dist/components/Inputs.mjs +3 -3
  151. package/dist/components/InputsExtra.js +12 -12
  152. package/dist/components/InputsExtra.mjs +3 -3
  153. package/dist/components/Layout.js +21 -21
  154. package/dist/components/Layout.mjs +2 -2
  155. package/dist/components/Menubar.js +3 -3
  156. package/dist/components/Menubar.mjs +2 -2
  157. package/dist/components/NavigationMenu.js +3 -3
  158. package/dist/components/NavigationMenu.mjs +2 -2
  159. package/dist/components/Notifications.js +4 -4
  160. package/dist/components/Notifications.mjs +3 -3
  161. package/dist/components/Overlay.js +10 -4
  162. package/dist/components/Overlay.mjs +8 -2
  163. package/dist/components/Permissions.js +4 -4
  164. package/dist/components/Permissions.mjs +3 -3
  165. package/dist/components/Pickers.js +9 -9
  166. package/dist/components/Pickers.mjs +4 -4
  167. package/dist/components/Popover.js +3 -3
  168. package/dist/components/Popover.mjs +2 -2
  169. package/dist/components/Toast.js +4 -4
  170. package/dist/components/Toast.mjs +2 -2
  171. package/dist/hooks/index.d.mts +3 -0
  172. package/dist/hooks/index.d.ts +3 -0
  173. package/dist/hooks/index.js +16 -1
  174. package/dist/hooks/index.mjs +4 -1
  175. package/dist/hooks/useEscape.d.mts +12 -0
  176. package/dist/hooks/useEscape.d.ts +12 -0
  177. package/dist/hooks/useEscape.js +13 -0
  178. package/dist/hooks/useEscape.js.map +1 -0
  179. package/dist/hooks/useEscape.mjs +4 -0
  180. package/dist/hooks/useEscape.mjs.map +1 -0
  181. package/dist/hooks/useFocusTrap.d.mts +21 -0
  182. package/dist/hooks/useFocusTrap.d.ts +21 -0
  183. package/dist/hooks/useFocusTrap.js +13 -0
  184. package/dist/hooks/useFocusTrap.js.map +1 -0
  185. package/dist/hooks/useFocusTrap.mjs +4 -0
  186. package/dist/hooks/useFocusTrap.mjs.map +1 -0
  187. package/dist/hooks/useScrollLock.d.mts +3 -0
  188. package/dist/hooks/useScrollLock.d.ts +3 -0
  189. package/dist/hooks/useScrollLock.js +13 -0
  190. package/dist/hooks/useScrollLock.js.map +1 -0
  191. package/dist/hooks/useScrollLock.mjs +4 -0
  192. package/dist/hooks/useScrollLock.mjs.map +1 -0
  193. package/dist/index.d.mts +1 -1
  194. package/dist/index.d.ts +1 -1
  195. package/dist/index.js +154 -151
  196. package/dist/index.mjs +34 -31
  197. package/dist/locale/index.d.mts +0 -5
  198. package/dist/locale/index.d.ts +0 -5
  199. package/dist/locale/index.js +6 -6
  200. package/dist/locale/index.mjs +2 -2
  201. package/dist/styles.css +1 -1
  202. package/package.json +1 -1
  203. package/dist/chunk-3U6C2BFM.mjs.map +0 -1
  204. package/dist/chunk-427NHGTX.js +0 -5
  205. package/dist/chunk-4VMQLSHV.js.map +0 -1
  206. package/dist/chunk-BVQRDAR7.mjs +0 -4
  207. package/dist/chunk-DFQLWCIC.js.map +0 -1
  208. package/dist/chunk-ER2Z5JEO.mjs +0 -165
  209. package/dist/chunk-ER2Z5JEO.mjs.map +0 -1
  210. package/dist/chunk-MSP4BOPZ.js +0 -188
  211. package/dist/chunk-MSP4BOPZ.js.map +0 -1
  212. package/dist/chunk-PQV7HHCJ.mjs.map +0 -1
  213. package/dist/chunk-Q3DKZR44.js.map +0 -1
  214. package/dist/chunk-Q4HKSXUE.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toast.tsx"],"names":["CheckCircle","AlertTriangle","AlertCircle","Info","React","useLocale","jsx","jsxs","cx","X","createPortal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAM,YAAA,GAAe;AAAA,EACnB,OAAA,EAASA,4BAAA;AAAA,EACT,OAAA,EAASC,8BAAA;AAAA,EACT,MAAA,EAAQC,4BAAA;AAAA,EACR,IAAA,EAAMC;AACR,CAAA;AAIA,IAAM,OAAA,GAAU,GAAA;AAgBhB,IAAM,YAAA,GAAqBC,+BAAwC,IAAI,CAAA;AAQhE,SAAS,aAAA,CAAc,EAAE,QAAA,EAAS,EAAkC;AAC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React from 'react';\nimport { createPortal } from 'react-dom';\nimport { X, CheckCircle, AlertTriangle, AlertCircle, Info } from './Icons';\nimport { useLocale } from '../locale/LocaleProvider';\nimport { cx } from '../utils/cx';\n\nconst VARIANT_ICON = {\n success: CheckCircle,\n warning: AlertTriangle,\n danger: AlertCircle,\n info: Info,\n} as const;\n\n// Exit animation duration. Must match `--duration-exit` and the\n// `.toast.is-closing` keyframes (`toastSlideOut`) in src/styles/index.css.\nconst EXIT_MS = 150;\n\nexport interface ToastItem {\n id: string;\n title?: React.ReactNode;\n description?: React.ReactNode;\n variant?: 'info' | 'success' | 'warning' | 'danger';\n duration?: number;\n}\n\ninterface ToastContextValue {\n toasts: ToastItem[];\n push: (t: Omit<ToastItem, 'id'>) => string;\n dismiss: (id: string) => void;\n}\n\nconst ToastContext = React.createContext<ToastContextValue | null>(null);\n\ninterface ToastTimerState {\n handle: ReturnType<typeof setTimeout>;\n startedAt: number;\n remaining: number;\n}\n\nexport function ToastProvider({ children }: { children: React.ReactNode }) {\n const [toasts, setToasts] = React.useState<ToastItem[]>([]);\n // Toasts in the closing window: still rendered with `is-closing` class so\n // CSS can play the exit animation, but already removed from new-toast\n // accounting (auto-dismiss timer cancelled, can't be paused/resumed).\n const [closingIds, setClosingIds] = React.useState<Set<string>>(new Set());\n // SSR-safe portal gating. Without this, the first client render emits a\n // `toast-stack` div into document.body via createPortal, while the\n // server-rendered HTML doesn't — Next.js App Router flags it as a\n // hydration mismatch. Starting `mounted=false` keeps the first client\n // render identical to the server; the effect flips it true after\n // hydration and the portal mounts on the next pass.\n const [mounted, setMounted] = React.useState(false);\n React.useEffect(() => setMounted(true), []);\n const timers = React.useRef<Map<string, ToastTimerState>>(new Map());\n const exitTimers = React.useRef<Map<string, ReturnType<typeof setTimeout>>>(new Map());\n const locale = useLocale();\n\n const dismiss = React.useCallback((id: string) => {\n const state = timers.current.get(id);\n if (state) {\n clearTimeout(state.handle);\n timers.current.delete(id);\n }\n // Already in the closing window? skip (idempotent).\n if (exitTimers.current.has(id)) return;\n setClosingIds((prev) => {\n const next = new Set(prev);\n next.add(id);\n return next;\n });\n const handle = setTimeout(() => {\n exitTimers.current.delete(id);\n setToasts((list) => list.filter((toast) => toast.id !== id));\n setClosingIds((prev) => {\n if (!prev.has(id)) return prev;\n const next = new Set(prev);\n next.delete(id);\n return next;\n });\n }, EXIT_MS);\n exitTimers.current.set(id, handle);\n }, []);\n\n const push = React.useCallback(\n (t: Omit<ToastItem, 'id'>) => {\n const id = Math.random().toString(36).slice(2);\n const item: ToastItem = { id, duration: 4000, variant: 'info', ...t };\n setToasts((list) => [...list, item]);\n if (item.duration && item.duration > 0) {\n const handle = setTimeout(() => dismiss(id), item.duration);\n timers.current.set(id, { handle, startedAt: Date.now(), remaining: item.duration });\n }\n return id;\n },\n [dismiss]\n );\n\n // Pause auto-dismiss while pointer is over the toast — users reading a\n // multi-line message shouldn't have it disappear mid-read.\n const pause = React.useCallback((id: string) => {\n const state = timers.current.get(id);\n if (!state) return;\n clearTimeout(state.handle);\n const elapsed = Date.now() - state.startedAt;\n const remaining = Math.max(0, state.remaining - elapsed);\n timers.current.set(id, { ...state, remaining });\n }, []);\n\n const resume = React.useCallback((id: string) => {\n const state = timers.current.get(id);\n if (!state) return;\n const handle = setTimeout(() => dismiss(id), state.remaining);\n timers.current.set(id, { handle, startedAt: Date.now(), remaining: state.remaining });\n }, [dismiss]);\n\n React.useEffect(() => {\n const map = timers.current;\n const exits = exitTimers.current;\n return () => {\n map.forEach((state) => clearTimeout(state.handle));\n map.clear();\n exits.forEach((handle) => clearTimeout(handle));\n exits.clear();\n };\n }, []);\n\n // Portal the stack to body so it isn't clipped by ancestor stacking contexts\n // (overflow:hidden, transform, filter on app shell layouts).\n // aria-atomic intentionally omitted: with `false` (default), screen readers\n // announce only newly added toasts instead of re-reading the entire stack.\n const stack = (\n <div className=\"toast-stack\" aria-live=\"polite\">\n {toasts.map((t) => {\n const variant = t.variant ?? 'info';\n const Icon = VARIANT_ICON[variant];\n return (\n <div\n key={t.id}\n className={cx('toast', `toast--${variant}`, closingIds.has(t.id) && 'is-closing')}\n role=\"status\"\n onMouseEnter={() => pause(t.id)}\n onMouseLeave={() => resume(t.id)}\n onFocus={() => pause(t.id)}\n onBlur={() => resume(t.id)}\n >\n <span className=\"toast__icon\" aria-hidden=\"true\"><Icon size={20} /></span>\n <div className=\"toast__body\">\n {t.title && <div className=\"toast__title\">{t.title}</div>}\n {t.description && <div className=\"toast__desc\">{t.description}</div>}\n </div>\n <button type=\"button\" className=\"toast__close\" aria-label={locale['toast.close']} onClick={() => dismiss(t.id)}><X size={16} /></button>\n </div>\n );\n })}\n </div>\n );\n\n // Memoize the provider value so consumers calling useToast() to access\n // only `push`/`dismiss` (the common case) don't re-render on every state\n // change. Without this, every toast push churned every consumer.\n const ctx = React.useMemo(() => ({ toasts, push, dismiss }), [toasts, push, dismiss]);\n\n return (\n <ToastContext.Provider value={ctx}>\n {children}\n {mounted && typeof document !== 'undefined' && createPortal(stack, document.body)}\n </ToastContext.Provider>\n );\n}\n\nexport function useToast() {\n const ctx = React.useContext(ToastContext);\n if (!ctx) throw new Error('useToast must be used inside <ToastProvider>');\n return ctx;\n}\n"]}
1
+ {"version":3,"sources":["../src/components/Toast.tsx"],"names":["CheckCircle","AlertTriangle","AlertCircle","Info","React","useLocale","jsx","jsxs","cx","X","createPortal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAM,YAAA,GAAe;AAAA,EACnB,OAAA,EAASA,4BAAA;AAAA,EACT,OAAA,EAASC,8BAAA;AAAA,EACT,MAAA,EAAQC,4BAAA;AAAA,EACR,IAAA,EAAMC;AACR,CAAA;AAIA,IAAM,OAAA,GAAU,GAAA;AAgBhB,IAAM,YAAA,GAAqBC,+BAAwC,IAAI,CAAA;AAQhE,SAAS,aAAA,CAAc,EAAE,QAAA,EAAS,EAAkC;AACzE,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAUA,gBAAA,CAAA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AA,EACZ,QAAA,EAAA;AAAA,YAAA,CAAA,CAAE,yBAASD,cAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,cAAA,EAAgB,YAAE,KAAA,EAAM,CAAA;AAAA,YAClD,EAAE,WAAA,oBAAeA,cAAA,CAAC,SAAI,SAAA,EAAU,aAAA,EAAe,YAAE,WAAA,EAAY;AAAA,WAAA,EAChE,CAAA;AAAA,0BACAA,cAAA,CAAC,YAAO,IAAA,EAAK,QAAA,EAAS,WAAU,cAAA,EAAe,YAAA,EAAY,OAAO,aAAa,CAAA,EAAG,SAAS,MAAM,OAAA,CAAQ,EAAE,EAAE,CAAA,EAAG,yCAACG,kBAAA,EAAA,EAAE,IAAA,EAAM,IAAI,CAAA,EAAE;AAAA;AAAA,OAAA;AAAA,MAb1H,CAAA,CAAE;AAAA,KAcT;AAAA,EAEJ,CAAC,CAAA,EACH,CAAA;AAMF,EAAA,MAAM,GAAA,GAAYL,gBAAA,CAAA,OAAA,CAAQ,OAAO,EAAE,MAAA,EAAQ,IAAA,EAAM,OAAA,EAAQ,CAAA,EAAI,CAAC,MAAA,EAAQ,IAAA,EAAM,OAAO,CAAC,CAAA;AAEpF,EAAA,uBACEG,eAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,OAAO,GAAA,EAC3B,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,WAAW,OAAO,QAAA,KAAa,eAAeG,qBAAA,CAAa,KAAA,EAAO,SAAS,IAAI;AAAA,GAAA,EAClF,CAAA;AAEJ;AAEO,SAAS,QAAA,GAAW;AACzB,EAAA,MAAM,GAAA,GAAYN,4BAAW,YAAY,CAAA;AACzC,EAAA,IAAI,CAAC,GAAA,EAAK,MAAM,IAAI,MAAM,8CAA8C,CAAA;AACxE,EAAA,OAAO,GAAA;AACT","file":"chunk-ZKPFXBE7.js","sourcesContent":["'use client';\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport { X, CheckCircle, AlertTriangle, AlertCircle, Info } from './Icons';\nimport { useLocale } from '../locale/LocaleProvider';\nimport { cx } from '../utils/cx';\n\nconst VARIANT_ICON = {\n success: CheckCircle,\n warning: AlertTriangle,\n danger: AlertCircle,\n info: Info,\n} as const;\n\n// Exit animation duration. Must match `--duration-exit` and the\n// `.toast.is-closing` keyframes (`toastSlideOut`) in src/styles/index.css.\nconst EXIT_MS = 150;\n\nexport interface ToastItem {\n id: string;\n title?: React.ReactNode;\n description?: React.ReactNode;\n variant?: 'info' | 'success' | 'warning' | 'danger';\n duration?: number;\n}\n\ninterface ToastContextValue {\n toasts: ToastItem[];\n push: (t: Omit<ToastItem, 'id'>) => string;\n dismiss: (id: string) => void;\n}\n\nconst ToastContext = React.createContext<ToastContextValue | null>(null);\n\ninterface ToastTimerState {\n handle: ReturnType<typeof setTimeout>;\n startedAt: number;\n remaining: number;\n}\n\nexport function ToastProvider({ children }: { children: React.ReactNode }) {\n const [toasts, setToasts] = React.useState<ToastItem[]>([]);\n // Toasts in the closing window: still rendered with `is-closing` class so\n // CSS can play the exit animation, but already removed from new-toast\n // accounting (auto-dismiss timer cancelled, can't be paused/resumed).\n const [closingIds, setClosingIds] = React.useState<Set<string>>(new Set());\n // SSR-safe portal gating. Without this, the first client render emits a\n // `toast-stack` div into document.body via createPortal, while the\n // server-rendered HTML doesn't — Next.js App Router flags it as a\n // hydration mismatch. Starting `mounted=false` keeps the first client\n // render identical to the server; the effect flips it true after\n // hydration and the portal mounts on the next pass.\n const [mounted, setMounted] = React.useState(false);\n React.useEffect(() => setMounted(true), []);\n const timers = React.useRef<Map<string, ToastTimerState>>(new Map());\n const exitTimers = React.useRef<Map<string, ReturnType<typeof setTimeout>>>(new Map());\n const locale = useLocale();\n\n const dismiss = React.useCallback((id: string) => {\n const state = timers.current.get(id);\n if (state) {\n clearTimeout(state.handle);\n timers.current.delete(id);\n }\n // Already in the closing window? skip (idempotent).\n if (exitTimers.current.has(id)) return;\n setClosingIds((prev) => {\n const next = new Set(prev);\n next.add(id);\n return next;\n });\n const handle = setTimeout(() => {\n exitTimers.current.delete(id);\n setToasts((list) => list.filter((toast) => toast.id !== id));\n setClosingIds((prev) => {\n if (!prev.has(id)) return prev;\n const next = new Set(prev);\n next.delete(id);\n return next;\n });\n }, EXIT_MS);\n exitTimers.current.set(id, handle);\n }, []);\n\n const push = React.useCallback(\n (t: Omit<ToastItem, 'id'>) => {\n const id = Math.random().toString(36).slice(2);\n const item: ToastItem = { id, duration: 4000, variant: 'info', ...t };\n setToasts((list) => [...list, item]);\n if (item.duration && item.duration > 0) {\n const handle = setTimeout(() => dismiss(id), item.duration);\n timers.current.set(id, { handle, startedAt: Date.now(), remaining: item.duration });\n }\n return id;\n },\n [dismiss]\n );\n\n // Pause auto-dismiss while pointer is over the toast — users reading a\n // multi-line message shouldn't have it disappear mid-read.\n const pause = React.useCallback((id: string) => {\n const state = timers.current.get(id);\n if (!state) return;\n clearTimeout(state.handle);\n const elapsed = Date.now() - state.startedAt;\n const remaining = Math.max(0, state.remaining - elapsed);\n timers.current.set(id, { ...state, remaining });\n }, []);\n\n const resume = React.useCallback((id: string) => {\n const state = timers.current.get(id);\n if (!state) return;\n const handle = setTimeout(() => dismiss(id), state.remaining);\n timers.current.set(id, { handle, startedAt: Date.now(), remaining: state.remaining });\n }, [dismiss]);\n\n React.useEffect(() => {\n const map = timers.current;\n const exits = exitTimers.current;\n return () => {\n map.forEach((state) => clearTimeout(state.handle));\n map.clear();\n exits.forEach((handle) => clearTimeout(handle));\n exits.clear();\n };\n }, []);\n\n // Portal the stack to body so it isn't clipped by ancestor stacking contexts\n // (overflow:hidden, transform, filter on app shell layouts).\n // aria-atomic intentionally omitted: with `false` (default), screen readers\n // announce only newly added toasts instead of re-reading the entire stack.\n const stack = (\n <div className=\"toast-stack\" aria-live=\"polite\">\n {toasts.map((t) => {\n const variant = t.variant ?? 'info';\n const Icon = VARIANT_ICON[variant];\n return (\n <div\n key={t.id}\n className={cx('toast', `toast--${variant}`, closingIds.has(t.id) && 'is-closing')}\n role=\"status\"\n onMouseEnter={() => pause(t.id)}\n onMouseLeave={() => resume(t.id)}\n onFocus={() => pause(t.id)}\n onBlur={() => resume(t.id)}\n >\n <span className=\"toast__icon\" aria-hidden=\"true\"><Icon size={20} /></span>\n <div className=\"toast__body\">\n {t.title && <div className=\"toast__title\">{t.title}</div>}\n {t.description && <div className=\"toast__desc\">{t.description}</div>}\n </div>\n <button type=\"button\" className=\"toast__close\" aria-label={locale['toast.close']} onClick={() => dismiss(t.id)}><X size={16} /></button>\n </div>\n );\n })}\n </div>\n );\n\n // Memoize the provider value so consumers calling useToast() to access\n // only `push`/`dismiss` (the common case) don't re-render on every state\n // change. Without this, every toast push churned every consumer.\n const ctx = React.useMemo(() => ({ toasts, push, dismiss }), [toasts, push, dismiss]);\n\n return (\n <ToastContext.Provider value={ctx}>\n {children}\n {mounted && typeof document !== 'undefined' && createPortal(stack, document.body)}\n </ToastContext.Provider>\n );\n}\n\nexport function useToast() {\n const ctx = React.useContext(ToastContext);\n if (!ctx) throw new Error('useToast must be used inside <ToastProvider>');\n return ctx;\n}\n"]}
@@ -1,14 +1,14 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkM3RO3GSC_js = require('../chunk-M3RO3GSC.js');
5
- require('../chunk-DFQLWCIC.js');
4
+ var chunkKXN6KNGE_js = require('../chunk-KXN6KNGE.js');
5
+ require('../chunk-RJJH6UZU.js');
6
6
  require('../chunk-MVJITG75.js');
7
- require('../chunk-XMLBKK7X.js');
8
- require('../chunk-CRKYET66.js');
9
7
  require('../chunk-WAGWB35Q.js');
10
8
  require('../chunk-3PXYCXDW.js');
11
- require('../chunk-4VMQLSHV.js');
9
+ require('../chunk-U6ZXX4WF.js');
10
+ require('../chunk-XMLBKK7X.js');
11
+ require('../chunk-CRKYET66.js');
12
12
  require('../chunk-3HA3VO2I.js');
13
13
  require('../chunk-PASF6T4H.js');
14
14
 
@@ -16,19 +16,19 @@ require('../chunk-PASF6T4H.js');
16
16
 
17
17
  Object.defineProperty(exports, "CommandPalette", {
18
18
  enumerable: true,
19
- get: function () { return chunkM3RO3GSC_js.CommandPalette; }
19
+ get: function () { return chunkKXN6KNGE_js.CommandPalette; }
20
20
  });
21
21
  Object.defineProperty(exports, "DateRangePicker", {
22
22
  enumerable: true,
23
- get: function () { return chunkM3RO3GSC_js.DateRangePicker; }
23
+ get: function () { return chunkKXN6KNGE_js.DateRangePicker; }
24
24
  });
25
25
  Object.defineProperty(exports, "MultiCombobox", {
26
26
  enumerable: true,
27
- get: function () { return chunkM3RO3GSC_js.MultiCombobox; }
27
+ get: function () { return chunkKXN6KNGE_js.MultiCombobox; }
28
28
  });
29
29
  Object.defineProperty(exports, "useCommandPalette", {
30
30
  enumerable: true,
31
- get: function () { return chunkM3RO3GSC_js.useCommandPalette; }
31
+ get: function () { return chunkKXN6KNGE_js.useCommandPalette; }
32
32
  });
33
33
  //# sourceMappingURL=AdvancedPickers.js.map
34
34
  //# sourceMappingURL=AdvancedPickers.js.map
@@ -1,12 +1,12 @@
1
1
  'use client';
2
- export { CommandPalette, DateRangePicker, MultiCombobox, useCommandPalette } from '../chunk-NCXODB4O.mjs';
3
- import '../chunk-Q4HKSXUE.mjs';
2
+ export { CommandPalette, DateRangePicker, MultiCombobox, useCommandPalette } from '../chunk-NOEX3LCS.mjs';
3
+ import '../chunk-KVOPVYZ5.mjs';
4
4
  import '../chunk-4QHE5H36.mjs';
5
- import '../chunk-6P2TKRTL.mjs';
6
- import '../chunk-5XT2LX3I.mjs';
7
5
  import '../chunk-FKBQYQQD.mjs';
8
6
  import '../chunk-5GEWIK4T.mjs';
9
- import '../chunk-PQV7HHCJ.mjs';
7
+ import '../chunk-PBWX4LU2.mjs';
8
+ import '../chunk-6P2TKRTL.mjs';
9
+ import '../chunk-5XT2LX3I.mjs';
10
10
  import '../chunk-VHYTJD6Z.mjs';
11
11
  import '../chunk-IEPCH3JB.mjs';
12
12
  //# sourceMappingURL=AdvancedPickers.mjs.map
@@ -17,19 +17,22 @@ interface NavSection {
17
17
  items: NavItem[];
18
18
  }
19
19
  type AppShellTheme = 'default' | 'brand';
20
- type AppShellHeaderLayout = 'side' | 'top';
21
20
  /**
22
21
  * Collapse API handed to header-slot render-props so a consumer-placed control
23
- * (e.g. a hamburger in `left`) can drive the sidebar — crucially in
24
- * **uncontrolled** mode, where the `top` layout otherwise has no toggle
25
- * affordance. This is what lets `persistKey` (uncontrolled) coexist with a
26
- * custom header trigger: the kit owns the state + persistence, the consumer
27
- * owns the trigger's look and placement.
22
+ * (e.g. a hamburger in `header.left`) can drive the sidebar — crucially in
23
+ * **uncontrolled** mode, where there is no built-in toggle affordance. This
24
+ * is what lets `persistKey` (uncontrolled) coexist with a custom header
25
+ * trigger: the kit owns the state + persistence, the consumer owns the
26
+ * trigger's look and placement.
27
+ *
28
+ * `toggle()` is DWIM by viewport: on desktop it flips `collapsed` (the
29
+ * rail/hide state); below 900px it flips an overlay drawer instead — same
30
+ * single click handler regardless of breakpoint.
28
31
  */
29
32
  interface AppShellHeaderApi {
30
33
  /** Current collapsed state. */
31
34
  collapsed: boolean;
32
- /** Flip the collapsed state (persisted if `persistKey` is set). */
35
+ /** Flip the collapsed state on desktop, or the drawer in mobile. */
33
36
  toggle: () => void;
34
37
  /** Set the collapsed state explicitly. */
35
38
  setCollapsed: (collapsed: boolean) => void;
@@ -37,7 +40,7 @@ interface AppShellHeaderApi {
37
40
  /**
38
41
  * A header slot: a static node, or a render-prop receiving {@link AppShellHeaderApi}.
39
42
  * The function form is the only way to toggle an uncontrolled shell from the
40
- * header (no built-in toggle exists in `top`).
43
+ * header (no built-in toggle exists).
41
44
  */
42
45
  type AppShellHeaderSlot = React.ReactNode | ((api: AppShellHeaderApi) => React.ReactNode);
43
46
  interface AppShellHeader {
@@ -49,23 +52,35 @@ interface AppShellHeader {
49
52
  right?: AppShellHeaderSlot;
50
53
  }
51
54
  /**
52
- * Props shared by both layouts. The layout-specific props live in
53
- * `AppShellSideProps` / `AppShellTopProps`; `AppShellProps` is the
54
- * discriminated union of the two, keyed on `headerLayout`.
55
+ * AppShell props.
56
+ *
57
+ * @example
58
+ * <AppShell
59
+ * sections={sections}
60
+ * header={{
61
+ * left: ({ toggle }) => <button onClick={toggle}>Menu</button>,
62
+ * center: <Logo />,
63
+ * right: <Avatar />,
64
+ * }}
65
+ * >
66
+ * {children}
67
+ * </AppShell>
55
68
  */
56
- interface AppShellBaseProps {
69
+ interface AppShellProps {
57
70
  /**
58
71
  * Navigation sections that populate the sidebar. Omit (or pass an empty
59
- * array) in `headerLayout="top"` to render a **top-bar-only** shell — no
60
- * sidebar at all, body collapses to a single column. Use when the app is
61
- * flat-route (no panel nav), e.g. a kiosk/cobros-mesón style layout.
62
- * Required (effectively) in `headerLayout="side"`: that layout is the
63
- * sidebar; omitting sections renders an empty rail.
72
+ * array) to render a **top-bar-only** shell — no sidebar at all, body
73
+ * collapses to a single column. Use when the app is flat-route (no panel
74
+ * nav), e.g. a kiosk/checkout flow.
64
75
  */
65
76
  sections?: NavSection[];
77
+ /** Slot at the bottom of the sidebar (version label, env tag, etc.). */
66
78
  footer?: React.ReactNode;
79
+ /** Initial collapsed state (uncontrolled). */
67
80
  defaultCollapsed?: boolean;
81
+ /** Controlled collapsed state — pair with `onCollapsedChange`. */
68
82
  collapsed?: boolean;
83
+ /** Called when `collapsed` flips (controlled mode handshake). */
69
84
  onCollapsedChange?: (c: boolean) => void;
70
85
  /**
71
86
  * Persist the collapsed state in `localStorage[persistKey]` so it survives
@@ -79,81 +94,33 @@ interface AppShellBaseProps {
79
94
  children: React.ReactNode;
80
95
  className?: string;
81
96
  /**
82
- * Color theme (applies to both layouts):
97
+ * Sidebar color theme:
83
98
  * - `default` (light): claro, mejor para apps data-heavy de uso prolongado.
84
99
  * - `brand`: superficie azul de marca con texto blanco. Mayor brand recall.
85
- * En `side` tiñe el sidebar; en `top` tiñe header + sidebar (un solo knob).
100
+ *
101
+ * The header band's theme is `headerTheme`, defaulting to this value so
102
+ * `theme="brand"` tints both bands by default.
86
103
  */
87
104
  theme?: AppShellTheme;
88
- /** Render-prop for navigation links so the host app can use Next.js Link, etc. */
89
- linkAs?: (item: NavItem, content: React.ReactNode, className: string) => React.ReactNode;
90
- }
91
- /**
92
- * Sidebar layout (default, `headerLayout="side"` or omitted). The brand
93
- * block + collapse rail live in the sidebar; the topbar sits over the
94
- * content with a mobile hamburger. `header` is **not** valid here — that
95
- * slot belongs to the `top` layout.
96
- */
97
- interface AppShellSideProps extends AppShellBaseProps {
98
- headerLayout?: 'side';
99
- /** Brand node in the sidebar header (expanded state). */
100
- brand?: React.ReactNode;
101
- /** Brand node shown when the rail is collapsed. Falls back to `brand`. */
102
- brandCollapsed?: React.ReactNode;
103
- /** Content of the topbar over the page (search, etc.). */
104
- topbar?: React.ReactNode;
105
- /** User slot at the right of the topbar (avatar/menu). */
106
- user?: React.ReactNode;
107
- /** Not valid in the `side` layout — the header slots belong to `top`. */
108
- header?: never;
109
- }
110
- /**
111
- * Top-header layout (`headerLayout="top"`, v1.15.0). Full-width header
112
- * above the body with three slots (`header.{left,center,right}`); the
113
- * centre slot lands at the **true viewport centre** (1fr·auto·1fr grid).
114
- * The sidebar has no brand block and `collapsed` hides it entirely (no
115
- * 72px rail); the header is **invariant** to the collapse. `theme="brand"`
116
- * tints both bands. The `side`-only props are **not** valid here — put your
117
- * chrome in `header`.
118
- */
119
- interface AppShellTopProps extends AppShellBaseProps {
120
- headerLayout: 'top';
121
- /** Slots for the full-width header. Brand usually goes in `center`. */
122
- header?: AppShellHeader;
123
105
  /**
124
- * Theme of the **header band only**, independent of the sidebar (`theme`).
125
- * Defaults to `theme`, so `theme="brand"` still tints both bands (no
126
- * change for existing consumers). Set `theme="default" headerTheme="brand"`
127
- * for a branded top bar over a neutral, legible sidebar — common in
128
- * data-heavy admin apps.
106
+ * Header band theme, independent of the sidebar (`theme`). Defaults to
107
+ * `theme`. Set `theme="default" headerTheme="brand"` for a branded top
108
+ * bar over a neutral, legible sidebar — common in data-heavy admin apps.
129
109
  */
130
110
  headerTheme?: AppShellTheme;
131
111
  /**
132
112
  * Collapse to an icon rail (72px) instead of hiding the sidebar entirely.
133
- * Default `false` → `collapsed` hides the sidebar (the original `top`
134
- * behavior). `true` → `collapsed` keeps a 72px rail showing the nav icons
135
- * (labels hidden, active-item bar kept) — like the `side` layout — and
136
- * renders a built-in expand/collapse toggle at the bottom of the rail.
113
+ * Default `false` → `collapsed` hides the sidebar (slides off-screen).
114
+ * `true` → `collapsed` keeps a 72px rail showing the nav icons (labels
115
+ * hidden, active-item bar kept).
137
116
  */
138
117
  collapsedRail?: boolean;
139
- /** Not valid in `top` — use `header.center` for the brand. */
140
- brand?: never;
141
- /** Not valid in `top` the sidebar collapses entirely. */
142
- brandCollapsed?: never;
143
- /** Not valid in `top` — use the `header` slots. */
144
- topbar?: never;
145
- /** Not valid in `top` — use `header.right`. */
146
- user?: never;
118
+ /** Slots for the full-width header. */
119
+ header?: AppShellHeader;
120
+ /** Render-prop for navigation links so the host app can use Next.js Link, etc. */
121
+ linkAs?: (item: NavItem, content: React.ReactNode, className: string) => React.ReactNode;
147
122
  }
148
- /**
149
- * Discriminated union keyed on `headerLayout`. TypeScript enforces that
150
- * `header` is only accepted with `headerLayout="top"` and that
151
- * `brand`/`brandCollapsed`/`topbar`/`user` are only accepted with the
152
- * (default) `side` layout — passing the wrong prop for the layout is a
153
- * compile error instead of being silently ignored at runtime.
154
- */
155
- type AppShellProps = AppShellSideProps | AppShellTopProps;
156
- declare function AppShell(props: AppShellProps): react_jsx_runtime.JSX.Element;
123
+ declare function AppShell({ sections, footer, defaultCollapsed, collapsed: ctrlCollapsed, onCollapsedChange, persistKey, children, className, theme, headerTheme: ctrlHeaderTheme, collapsedRail, header, linkAs, }: AppShellProps): react_jsx_runtime.JSX.Element;
157
124
  interface PageHeaderProps {
158
125
  title: React.ReactNode;
159
126
  description?: React.ReactNode;
@@ -167,4 +134,4 @@ interface PageHeaderProps {
167
134
  }
168
135
  declare function PageHeader({ title, description, breadcrumbs, actions, meta, className }: PageHeaderProps): react_jsx_runtime.JSX.Element;
169
136
 
170
- export { AppShell, type AppShellBaseProps, type AppShellHeader, type AppShellHeaderApi, type AppShellHeaderLayout, type AppShellHeaderSlot, type AppShellProps, type AppShellSideProps, type AppShellTheme, type AppShellTopProps, type NavItem, type NavSection, PageHeader, type PageHeaderProps };
137
+ export { AppShell, type AppShellHeader, type AppShellHeaderApi, type AppShellHeaderSlot, type AppShellProps, type AppShellTheme, type NavItem, type NavSection, PageHeader, type PageHeaderProps };
@@ -17,19 +17,22 @@ interface NavSection {
17
17
  items: NavItem[];
18
18
  }
19
19
  type AppShellTheme = 'default' | 'brand';
20
- type AppShellHeaderLayout = 'side' | 'top';
21
20
  /**
22
21
  * Collapse API handed to header-slot render-props so a consumer-placed control
23
- * (e.g. a hamburger in `left`) can drive the sidebar — crucially in
24
- * **uncontrolled** mode, where the `top` layout otherwise has no toggle
25
- * affordance. This is what lets `persistKey` (uncontrolled) coexist with a
26
- * custom header trigger: the kit owns the state + persistence, the consumer
27
- * owns the trigger's look and placement.
22
+ * (e.g. a hamburger in `header.left`) can drive the sidebar — crucially in
23
+ * **uncontrolled** mode, where there is no built-in toggle affordance. This
24
+ * is what lets `persistKey` (uncontrolled) coexist with a custom header
25
+ * trigger: the kit owns the state + persistence, the consumer owns the
26
+ * trigger's look and placement.
27
+ *
28
+ * `toggle()` is DWIM by viewport: on desktop it flips `collapsed` (the
29
+ * rail/hide state); below 900px it flips an overlay drawer instead — same
30
+ * single click handler regardless of breakpoint.
28
31
  */
29
32
  interface AppShellHeaderApi {
30
33
  /** Current collapsed state. */
31
34
  collapsed: boolean;
32
- /** Flip the collapsed state (persisted if `persistKey` is set). */
35
+ /** Flip the collapsed state on desktop, or the drawer in mobile. */
33
36
  toggle: () => void;
34
37
  /** Set the collapsed state explicitly. */
35
38
  setCollapsed: (collapsed: boolean) => void;
@@ -37,7 +40,7 @@ interface AppShellHeaderApi {
37
40
  /**
38
41
  * A header slot: a static node, or a render-prop receiving {@link AppShellHeaderApi}.
39
42
  * The function form is the only way to toggle an uncontrolled shell from the
40
- * header (no built-in toggle exists in `top`).
43
+ * header (no built-in toggle exists).
41
44
  */
42
45
  type AppShellHeaderSlot = React.ReactNode | ((api: AppShellHeaderApi) => React.ReactNode);
43
46
  interface AppShellHeader {
@@ -49,23 +52,35 @@ interface AppShellHeader {
49
52
  right?: AppShellHeaderSlot;
50
53
  }
51
54
  /**
52
- * Props shared by both layouts. The layout-specific props live in
53
- * `AppShellSideProps` / `AppShellTopProps`; `AppShellProps` is the
54
- * discriminated union of the two, keyed on `headerLayout`.
55
+ * AppShell props.
56
+ *
57
+ * @example
58
+ * <AppShell
59
+ * sections={sections}
60
+ * header={{
61
+ * left: ({ toggle }) => <button onClick={toggle}>Menu</button>,
62
+ * center: <Logo />,
63
+ * right: <Avatar />,
64
+ * }}
65
+ * >
66
+ * {children}
67
+ * </AppShell>
55
68
  */
56
- interface AppShellBaseProps {
69
+ interface AppShellProps {
57
70
  /**
58
71
  * Navigation sections that populate the sidebar. Omit (or pass an empty
59
- * array) in `headerLayout="top"` to render a **top-bar-only** shell — no
60
- * sidebar at all, body collapses to a single column. Use when the app is
61
- * flat-route (no panel nav), e.g. a kiosk/cobros-mesón style layout.
62
- * Required (effectively) in `headerLayout="side"`: that layout is the
63
- * sidebar; omitting sections renders an empty rail.
72
+ * array) to render a **top-bar-only** shell — no sidebar at all, body
73
+ * collapses to a single column. Use when the app is flat-route (no panel
74
+ * nav), e.g. a kiosk/checkout flow.
64
75
  */
65
76
  sections?: NavSection[];
77
+ /** Slot at the bottom of the sidebar (version label, env tag, etc.). */
66
78
  footer?: React.ReactNode;
79
+ /** Initial collapsed state (uncontrolled). */
67
80
  defaultCollapsed?: boolean;
81
+ /** Controlled collapsed state — pair with `onCollapsedChange`. */
68
82
  collapsed?: boolean;
83
+ /** Called when `collapsed` flips (controlled mode handshake). */
69
84
  onCollapsedChange?: (c: boolean) => void;
70
85
  /**
71
86
  * Persist the collapsed state in `localStorage[persistKey]` so it survives
@@ -79,81 +94,33 @@ interface AppShellBaseProps {
79
94
  children: React.ReactNode;
80
95
  className?: string;
81
96
  /**
82
- * Color theme (applies to both layouts):
97
+ * Sidebar color theme:
83
98
  * - `default` (light): claro, mejor para apps data-heavy de uso prolongado.
84
99
  * - `brand`: superficie azul de marca con texto blanco. Mayor brand recall.
85
- * En `side` tiñe el sidebar; en `top` tiñe header + sidebar (un solo knob).
100
+ *
101
+ * The header band's theme is `headerTheme`, defaulting to this value so
102
+ * `theme="brand"` tints both bands by default.
86
103
  */
87
104
  theme?: AppShellTheme;
88
- /** Render-prop for navigation links so the host app can use Next.js Link, etc. */
89
- linkAs?: (item: NavItem, content: React.ReactNode, className: string) => React.ReactNode;
90
- }
91
- /**
92
- * Sidebar layout (default, `headerLayout="side"` or omitted). The brand
93
- * block + collapse rail live in the sidebar; the topbar sits over the
94
- * content with a mobile hamburger. `header` is **not** valid here — that
95
- * slot belongs to the `top` layout.
96
- */
97
- interface AppShellSideProps extends AppShellBaseProps {
98
- headerLayout?: 'side';
99
- /** Brand node in the sidebar header (expanded state). */
100
- brand?: React.ReactNode;
101
- /** Brand node shown when the rail is collapsed. Falls back to `brand`. */
102
- brandCollapsed?: React.ReactNode;
103
- /** Content of the topbar over the page (search, etc.). */
104
- topbar?: React.ReactNode;
105
- /** User slot at the right of the topbar (avatar/menu). */
106
- user?: React.ReactNode;
107
- /** Not valid in the `side` layout — the header slots belong to `top`. */
108
- header?: never;
109
- }
110
- /**
111
- * Top-header layout (`headerLayout="top"`, v1.15.0). Full-width header
112
- * above the body with three slots (`header.{left,center,right}`); the
113
- * centre slot lands at the **true viewport centre** (1fr·auto·1fr grid).
114
- * The sidebar has no brand block and `collapsed` hides it entirely (no
115
- * 72px rail); the header is **invariant** to the collapse. `theme="brand"`
116
- * tints both bands. The `side`-only props are **not** valid here — put your
117
- * chrome in `header`.
118
- */
119
- interface AppShellTopProps extends AppShellBaseProps {
120
- headerLayout: 'top';
121
- /** Slots for the full-width header. Brand usually goes in `center`. */
122
- header?: AppShellHeader;
123
105
  /**
124
- * Theme of the **header band only**, independent of the sidebar (`theme`).
125
- * Defaults to `theme`, so `theme="brand"` still tints both bands (no
126
- * change for existing consumers). Set `theme="default" headerTheme="brand"`
127
- * for a branded top bar over a neutral, legible sidebar — common in
128
- * data-heavy admin apps.
106
+ * Header band theme, independent of the sidebar (`theme`). Defaults to
107
+ * `theme`. Set `theme="default" headerTheme="brand"` for a branded top
108
+ * bar over a neutral, legible sidebar — common in data-heavy admin apps.
129
109
  */
130
110
  headerTheme?: AppShellTheme;
131
111
  /**
132
112
  * Collapse to an icon rail (72px) instead of hiding the sidebar entirely.
133
- * Default `false` → `collapsed` hides the sidebar (the original `top`
134
- * behavior). `true` → `collapsed` keeps a 72px rail showing the nav icons
135
- * (labels hidden, active-item bar kept) — like the `side` layout — and
136
- * renders a built-in expand/collapse toggle at the bottom of the rail.
113
+ * Default `false` → `collapsed` hides the sidebar (slides off-screen).
114
+ * `true` → `collapsed` keeps a 72px rail showing the nav icons (labels
115
+ * hidden, active-item bar kept).
137
116
  */
138
117
  collapsedRail?: boolean;
139
- /** Not valid in `top` — use `header.center` for the brand. */
140
- brand?: never;
141
- /** Not valid in `top` the sidebar collapses entirely. */
142
- brandCollapsed?: never;
143
- /** Not valid in `top` — use the `header` slots. */
144
- topbar?: never;
145
- /** Not valid in `top` — use `header.right`. */
146
- user?: never;
118
+ /** Slots for the full-width header. */
119
+ header?: AppShellHeader;
120
+ /** Render-prop for navigation links so the host app can use Next.js Link, etc. */
121
+ linkAs?: (item: NavItem, content: React.ReactNode, className: string) => React.ReactNode;
147
122
  }
148
- /**
149
- * Discriminated union keyed on `headerLayout`. TypeScript enforces that
150
- * `header` is only accepted with `headerLayout="top"` and that
151
- * `brand`/`brandCollapsed`/`topbar`/`user` are only accepted with the
152
- * (default) `side` layout — passing the wrong prop for the layout is a
153
- * compile error instead of being silently ignored at runtime.
154
- */
155
- type AppShellProps = AppShellSideProps | AppShellTopProps;
156
- declare function AppShell(props: AppShellProps): react_jsx_runtime.JSX.Element;
123
+ declare function AppShell({ sections, footer, defaultCollapsed, collapsed: ctrlCollapsed, onCollapsedChange, persistKey, children, className, theme, headerTheme: ctrlHeaderTheme, collapsedRail, header, linkAs, }: AppShellProps): react_jsx_runtime.JSX.Element;
157
124
  interface PageHeaderProps {
158
125
  title: React.ReactNode;
159
126
  description?: React.ReactNode;
@@ -167,4 +134,4 @@ interface PageHeaderProps {
167
134
  }
168
135
  declare function PageHeader({ title, description, breadcrumbs, actions, meta, className }: PageHeaderProps): react_jsx_runtime.JSX.Element;
169
136
 
170
- export { AppShell, type AppShellBaseProps, type AppShellHeader, type AppShellHeaderApi, type AppShellHeaderLayout, type AppShellHeaderSlot, type AppShellProps, type AppShellSideProps, type AppShellTheme, type AppShellTopProps, type NavItem, type NavSection, PageHeader, type PageHeaderProps };
137
+ export { AppShell, type AppShellHeader, type AppShellHeaderApi, type AppShellHeaderSlot, type AppShellProps, type AppShellTheme, type NavItem, type NavSection, PageHeader, type PageHeaderProps };
@@ -1,20 +1,26 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkMSP4BOPZ_js = require('../chunk-MSP4BOPZ.js');
5
- require('../chunk-4VMQLSHV.js');
6
- require('../chunk-3HA3VO2I.js');
4
+ var chunkWQAGBJTY_js = require('../chunk-WQAGBJTY.js');
5
+ require('../chunk-2KZ4NI3X.js');
6
+ require('../chunk-FL4ZCWUF.js');
7
+ require('../chunk-NPXEZCTA.js');
8
+ require('../chunk-55P5FA5Q.js');
9
+ require('../chunk-D2H4VZVL.js');
10
+ require('../chunk-U6ZXX4WF.js');
11
+ require('../chunk-XMLBKK7X.js');
12
+ require('../chunk-CRKYET66.js');
7
13
  require('../chunk-PASF6T4H.js');
8
14
 
9
15
 
10
16
 
11
17
  Object.defineProperty(exports, "AppShell", {
12
18
  enumerable: true,
13
- get: function () { return chunkMSP4BOPZ_js.AppShell; }
19
+ get: function () { return chunkWQAGBJTY_js.AppShell; }
14
20
  });
15
21
  Object.defineProperty(exports, "PageHeader", {
16
22
  enumerable: true,
17
- get: function () { return chunkMSP4BOPZ_js.PageHeader; }
23
+ get: function () { return chunkWQAGBJTY_js.PageHeader; }
18
24
  });
19
25
  //# sourceMappingURL=AppShell.js.map
20
26
  //# sourceMappingURL=AppShell.js.map
@@ -1,7 +1,13 @@
1
1
  'use client';
2
- export { AppShell, PageHeader } from '../chunk-ER2Z5JEO.mjs';
3
- import '../chunk-PQV7HHCJ.mjs';
4
- import '../chunk-VHYTJD6Z.mjs';
2
+ export { AppShell, PageHeader } from '../chunk-NSVOLN37.mjs';
3
+ import '../chunk-QQE3XOEM.mjs';
4
+ import '../chunk-U3JH4T3A.mjs';
5
+ import '../chunk-6W7ZGWNA.mjs';
6
+ import '../chunk-XOV4D6J3.mjs';
7
+ import '../chunk-R5DCDEB5.mjs';
8
+ import '../chunk-PBWX4LU2.mjs';
9
+ import '../chunk-6P2TKRTL.mjs';
10
+ import '../chunk-5XT2LX3I.mjs';
5
11
  import '../chunk-IEPCH3JB.mjs';
6
12
  //# sourceMappingURL=AppShell.mjs.map
7
13
  //# sourceMappingURL=AppShell.mjs.map
@@ -1,13 +1,13 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkVAAB5DXM_js = require('../chunk-VAAB5DXM.js');
5
- require('../chunk-3OT3FROI.js');
6
- require('../chunk-DFQLWCIC.js');
4
+ var chunkJ45LTOIA_js = require('../chunk-J45LTOIA.js');
5
+ require('../chunk-CWP6W6BU.js');
6
+ require('../chunk-RJJH6UZU.js');
7
+ require('../chunk-WAGWB35Q.js');
8
+ require('../chunk-U6ZXX4WF.js');
7
9
  require('../chunk-XMLBKK7X.js');
8
10
  require('../chunk-CRKYET66.js');
9
- require('../chunk-WAGWB35Q.js');
10
- require('../chunk-4VMQLSHV.js');
11
11
  require('../chunk-3HA3VO2I.js');
12
12
  require('../chunk-PASF6T4H.js');
13
13
 
@@ -15,15 +15,15 @@ require('../chunk-PASF6T4H.js');
15
15
 
16
16
  Object.defineProperty(exports, "AttachmentList", {
17
17
  enumerable: true,
18
- get: function () { return chunkVAAB5DXM_js.AttachmentList; }
18
+ get: function () { return chunkJ45LTOIA_js.AttachmentList; }
19
19
  });
20
20
  Object.defineProperty(exports, "CommentThread", {
21
21
  enumerable: true,
22
- get: function () { return chunkVAAB5DXM_js.CommentThread; }
22
+ get: function () { return chunkJ45LTOIA_js.CommentThread; }
23
23
  });
24
24
  Object.defineProperty(exports, "_internal", {
25
25
  enumerable: true,
26
- get: function () { return chunkVAAB5DXM_js._internal; }
26
+ get: function () { return chunkJ45LTOIA_js._internal; }
27
27
  });
28
28
  //# sourceMappingURL=Comments.js.map
29
29
  //# sourceMappingURL=Comments.js.map
@@ -1,11 +1,11 @@
1
1
  'use client';
2
- export { AttachmentList, CommentThread, _internal } from '../chunk-PVSP7Y2F.mjs';
3
- import '../chunk-B4BPE3LC.mjs';
4
- import '../chunk-Q4HKSXUE.mjs';
2
+ export { AttachmentList, CommentThread, _internal } from '../chunk-6PTQE6P6.mjs';
3
+ import '../chunk-E2W2OSGG.mjs';
4
+ import '../chunk-KVOPVYZ5.mjs';
5
+ import '../chunk-FKBQYQQD.mjs';
6
+ import '../chunk-PBWX4LU2.mjs';
5
7
  import '../chunk-6P2TKRTL.mjs';
6
8
  import '../chunk-5XT2LX3I.mjs';
7
- import '../chunk-FKBQYQQD.mjs';
8
- import '../chunk-PQV7HHCJ.mjs';
9
9
  import '../chunk-VHYTJD6Z.mjs';
10
10
  import '../chunk-IEPCH3JB.mjs';
11
11
  //# sourceMappingURL=Comments.mjs.map