@womp/kookie-ui 0.35.0 → 0.35.2
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.
- package/components.css +35 -35
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +3 -3
- package/dist/cjs/components/command.d.ts.map +1 -1
- package/dist/cjs/components/command.js +1 -1
- package/dist/cjs/components/command.js.map +3 -3
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/navigator.d.ts +6 -1
- package/dist/cjs/components/navigator.d.ts.map +1 -1
- package/dist/cjs/components/navigator.js +1 -1
- package/dist/cjs/components/navigator.js.map +2 -2
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +3 -3
- package/dist/cjs/hooks/index.js +2 -2
- package/dist/cjs/hooks/index.js.map +3 -3
- package/dist/cjs/hooks/use-body-pointer-events-cleanup.d.ts +6 -0
- package/dist/cjs/hooks/use-body-pointer-events-cleanup.d.ts.map +1 -1
- package/dist/cjs/hooks/use-body-pointer-events-cleanup.js +1 -1
- package/dist/cjs/hooks/use-body-pointer-events-cleanup.js.map +3 -3
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/chunk-3RJVW6RK.js +3 -0
- package/dist/esm/{chunk-7VJF6EXN.js.map → chunk-3RJVW6RK.js.map} +3 -3
- package/dist/esm/chunk-LR4X7SVV.js +3 -0
- package/dist/esm/chunk-LR4X7SVV.js.map +7 -0
- package/dist/esm/{chunk-J7MIXG6M.js → chunk-QV66TN2A.js} +2 -2
- package/dist/esm/chunk-SR42NATX.js +3 -0
- package/dist/esm/chunk-SR42NATX.js.map +7 -0
- package/dist/esm/chunk-UH6CJXHY.js +3 -0
- package/dist/esm/chunk-UH6CJXHY.js.map +7 -0
- package/dist/esm/chunk-XVN43IZL.js +3 -0
- package/dist/esm/chunk-XVN43IZL.js.map +7 -0
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/command.d.ts.map +1 -1
- package/dist/esm/components/command.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/navigator.d.ts +6 -1
- package/dist/esm/components/navigator.d.ts.map +1 -1
- package/dist/esm/components/navigator.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/hooks/use-body-pointer-events-cleanup.d.ts +6 -0
- package/dist/esm/hooks/use-body-pointer-events-cleanup.d.ts.map +1 -1
- package/dist/esm/hooks/use-body-pointer-events-cleanup.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/src/components/_internal/base-card.css +3 -3
- package/src/components/_internal/base-menu.css +1 -1
- package/src/components/_internal/base-sidebar-menu.css +1 -1
- package/src/components/_internal/base-tab-list.css +1 -1
- package/src/components/accordion.css +2 -2
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/avatar.css +2 -2
- package/src/components/card.css +1 -1
- package/src/components/chatbar.css +2 -2
- package/src/components/combobox.css +1 -1
- package/src/components/command.css +1 -1
- package/src/components/command.tsx +16 -3
- package/src/components/dialog.tsx +2 -2
- package/src/components/kbd.css +2 -2
- package/src/components/message-scroller.css +1 -1
- package/src/components/navigator.css +1 -1
- package/src/components/navigator.tsx +14 -1
- package/src/components/scroll-area.css +1 -1
- package/src/components/select.css +6 -6
- package/src/components/sidebar.css +2 -2
- package/src/components/text-area.css +1 -1
- package/src/components/text-field.css +3 -3
- package/src/components/virtual-menu.css +1 -1
- package/src/hooks/use-body-pointer-events-cleanup.ts +12 -0
- package/src/styles/tokens/constants.css +3 -3
- package/styles.css +37 -37
- package/tokens.css +2 -2
- package/dist/esm/chunk-7VJF6EXN.js +0 -3
- package/dist/esm/chunk-CAM66IXC.js +0 -3
- package/dist/esm/chunk-CAM66IXC.js.map +0 -7
- package/dist/esm/chunk-GZPB6MRQ.js +0 -3
- package/dist/esm/chunk-GZPB6MRQ.js.map +0 -7
- package/dist/esm/chunk-I5TPDYJO.js +0 -3
- package/dist/esm/chunk-I5TPDYJO.js.map +0 -7
- package/dist/esm/chunk-NZJRXZYX.js +0 -3
- package/dist/esm/chunk-NZJRXZYX.js.map +0 -7
- /package/dist/esm/{chunk-J7MIXG6M.js.map → chunk-QV66TN2A.js.map} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import*as p from"react";var a=0,i=null,E=t=>{};function g(){let t=new Set,v=(e,o)=>{let m=setTimeout(()=>{t.delete(m),e()},o);t.add(m)},d=()=>document.body.style.pointerEvents==="none",f=()=>{let e=!!document.querySelector('[role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]'),o=!!document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]');return e||o},s=()=>{d()&&!f()&&(E("[KookieUI] Cleaning stuck pointer-events: none from body"),document.body.style.pointerEvents="")},r=e=>{d()&&v(s,e)},u=e=>{let o=e.target;o&&!o.closest('[role="dialog"], [role="alertdialog"], [data-radix-popper-content-wrapper]')&&r(100)},l=e=>{e.key==="Escape"&&r(200)},n=()=>{r(50)};document.addEventListener("click",u,!0),document.addEventListener("keydown",l,!0),document.addEventListener("pointerup",n,!0),document.addEventListener("transitionend",n,!0),document.addEventListener("animationend",n,!0);let c=new MutationObserver(()=>{r(0)});c.observe(document.body,{childList:!0,attributes:!0,attributeFilter:["style"]});let y=setInterval(s,1e3);return r(100),()=>{clearInterval(y),t.forEach(clearTimeout),t.clear(),c.disconnect(),document.removeEventListener("click",u,!0),document.removeEventListener("keydown",l,!0),document.removeEventListener("pointerup",n,!0),document.removeEventListener("transitionend",n,!0),document.removeEventListener("animationend",n,!0)}}function b(){typeof document>"u"||document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||(document.body.style.pointerEvents="")}function L(){p.useEffect(()=>{if(!(typeof document>"u"))return a+=1,a===1&&(i=g()),()=>{a-=1,a===0&&(i?.(),i=null)}},[])}export{b as a,L as b};
|
|
3
|
+
//# sourceMappingURL=chunk-3RJVW6RK.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/hooks/use-body-pointer-events-cleanup.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\n\n// How many overlays currently use the hook. The listeners are shared: the first mount installs\n// them and the last unmount removes them, so closing one overlay never strips the fallback from\n// another that is still mounted.\nlet mountCount = 0;\nlet teardown: (() => void) | null = null;\n\nconst devLog = (message: string) => {\n if (process.env.NODE_ENV !== 'production') {\n console.log(message);\n }\n};\n\nfunction install(): () => void {\n // Deferred cleanups are tracked so teardown can cancel the ones still queued. A timer that\n // outlives the document reaches for `document.body` after it is gone; under jsdom that surfaces\n // as an unhandled ReferenceError attributed to whichever test happened to be running.\n const pending = new Set<ReturnType<typeof setTimeout>>();\n\n const defer = (fn: () => void, delay: number) => {\n const id = setTimeout(() => {\n pending.delete(id);\n fn();\n }, delay);\n pending.add(id);\n };\n\n const isStuck = () => document.body.style.pointerEvents === 'none';\n\n const hasOpenModal = (): boolean => {\n // Open dialogs and alert dialogs\n const hasDialogs = Boolean(\n document.querySelector('[role=\"dialog\"][aria-modal=\"true\"], [role=\"alertdialog\"][aria-modal=\"true\"]'),\n );\n\n // Any Radix overlay that is still mounted. Only overlays count: an open Accordion or\n // Collapsible also carries data-state=\"open\" and must not keep a stuck page blocked.\n const hasRadixOverlays = Boolean(\n document.querySelector(\n '[data-radix-popper-content-wrapper], [role=\"dialog\"][data-state=\"open\"], [role=\"alertdialog\"][data-state=\"open\"]',\n ),\n );\n\n return hasDialogs || hasRadixOverlays;\n };\n\n // Only clears pointer-events when no modal is open. Scroll-lock attributes belong to\n // react-remove-scroll and are never touched here.\n const safeCleanup = () => {\n if (isStuck() && !hasOpenModal()) {\n devLog('[KookieUI] Cleaning stuck pointer-events: none from body');\n document.body.style.pointerEvents = '';\n }\n };\n\n // Every trigger queues a check only while the body is actually blocked.\n const scheduleCleanup = (delay: number) => {\n if (isStuck()) defer(safeCleanup, delay);\n };\n\n const onDocumentClick = (event: Event) => {\n const target = event.target as Element;\n if (target && !target.closest('[role=\"dialog\"], [role=\"alertdialog\"], [data-radix-popper-content-wrapper]')) {\n scheduleCleanup(100);\n }\n };\n\n const onEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n scheduleCleanup(200);\n }\n };\n\n const onInteraction = () => {\n scheduleCleanup(50);\n };\n\n document.addEventListener('click', onDocumentClick, true);\n document.addEventListener('keydown', onEscapeKey, true);\n document.addEventListener('pointerup', onInteraction, true);\n document.addEventListener('transitionend', onInteraction, true);\n document.addEventListener('animationend', onInteraction, true);\n\n // Portals mount and unmount as direct children of body, and the stuck value lives in body's\n // style, so body's own children and style are all that need watching.\n const observer = new MutationObserver(() => {\n scheduleCleanup(0);\n });\n observer.observe(document.body, { childList: true, attributes: true, attributeFilter: ['style'] });\n\n // Fallback periodic cleanup\n const intervalId = setInterval(safeCleanup, 1000);\n\n // Initial cleanup\n scheduleCleanup(100);\n\n // Tear everything down together. The observer is the important one: it fires while React\n // unmounts the tree, so leaving it connected keeps queueing work against a document that is\n // about to go away.\n return () => {\n clearInterval(intervalId);\n\n pending.forEach(clearTimeout);\n pending.clear();\n\n observer.disconnect();\n\n document.removeEventListener('click', onDocumentClick, true);\n document.removeEventListener('keydown', onEscapeKey, true);\n document.removeEventListener('pointerup', onInteraction, true);\n document.removeEventListener('transitionend', onInteraction, true);\n document.removeEventListener('animationend', onInteraction, true);\n };\n}\n\n/**\n * Hook to cleanup stuck pointer-events: none on document.body\n *\n * This addresses an issue where react-remove-scroll (used by Radix UI Dialog)\n * sometimes fails to restore body pointer-events after dialog closes,\n * leaving the page unclickable. It never clears the value while a modal is open.\n */\nexport function useBodyPointerEventsCleanup() {\n React.useEffect(() => {\n if (typeof document === 'undefined') return;\n\n mountCount += 1;\n if (mountCount === 1) {\n teardown = install();\n }\n\n return () => {\n mountCount -= 1;\n if (mountCount === 0) {\n teardown?.();\n teardown = null;\n }\n };\n }, []);\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,UAAYA,MAAW,QAKvB,IAAIC,EAAa,EACbC,EAAgC,KAE9BC,EAAUC,GAAoB,CAIpC,EAEA,SAASC,GAAsB,CAI7B,IAAMC,EAAU,IAAI,IAEdC,EAAQ,CAACC,EAAgBC,IAAkB,CAC/C,IAAMC,EAAK,WAAW,IAAM,CAC1BJ,EAAQ,OAAOI,CAAE,EACjBF,EAAG,CACL,EAAGC,CAAK,EACRH,EAAQ,IAAII,CAAE,CAChB,EAEMC,EAAU,IAAM,SAAS,KAAK,MAAM,gBAAkB,OAEtDC,EAAe,IAAe,CAElC,IAAMC,EAAa,EACjB,SAAS,cAAc,6EAA6E,EAKhGC,EAAmB,EACvB,SAAS,cACP,kHACF,EAGF,OAAOD,GAAcC,CACvB,EAIMC,EAAc,IAAM,CACpBJ,EAAQ,GAAK,CAACC,EAAa,IAC7BT,EAAO,0DAA0D,EACjE,SAAS,KAAK,MAAM,cAAgB,GAExC,EAGMa,EAAmBP,GAAkB,CACrCE,EAAQ,GAAGJ,EAAMQ,EAAaN,CAAK,CACzC,EAEMQ,EAAmBC,GAAiB,CACxC,IAAMC,EAASD,EAAM,OACjBC,GAAU,CAACA,EAAO,QAAQ,4EAA4E,GACxGH,EAAgB,GAAG,CAEvB,EAEMI,EAAeF,GAAyB,CACxCA,EAAM,MAAQ,UAChBF,EAAgB,GAAG,CAEvB,EAEMK,EAAgB,IAAM,CAC1BL,EAAgB,EAAE,CACpB,EAEA,SAAS,iBAAiB,QAASC,EAAiB,EAAI,EACxD,SAAS,iBAAiB,UAAWG,EAAa,EAAI,EACtD,SAAS,iBAAiB,YAAaC,EAAe,EAAI,EAC1D,SAAS,iBAAiB,gBAAiBA,EAAe,EAAI,EAC9D,SAAS,iBAAiB,eAAgBA,EAAe,EAAI,EAI7D,IAAMC,EAAW,IAAI,iBAAiB,IAAM,CAC1CN,EAAgB,CAAC,CACnB,CAAC,EACDM,EAAS,QAAQ,SAAS,KAAM,CAAE,UAAW,GAAM,WAAY,GAAM,gBAAiB,CAAC,OAAO,CAAE,CAAC,EAGjG,IAAMC,EAAa,YAAYR,EAAa,GAAI,EAGhD,OAAAC,EAAgB,GAAG,EAKZ,IAAM,CACX,cAAcO,CAAU,EAExBjB,EAAQ,QAAQ,YAAY,EAC5BA,EAAQ,MAAM,EAEdgB,EAAS,WAAW,EAEpB,SAAS,oBAAoB,QAASL,EAAiB,EAAI,EAC3D,SAAS,oBAAoB,UAAWG,EAAa,EAAI,EACzD,SAAS,oBAAoB,YAAaC,EAAe,EAAI,EAC7D,SAAS,oBAAoB,gBAAiBA,EAAe,EAAI,EACjE,SAAS,oBAAoB,eAAgBA,EAAe,EAAI,CAClE,CACF,
|
|
6
|
-
"names": ["React", "mountCount", "teardown", "devLog", "message", "install", "pending", "defer", "fn", "delay", "id", "isStuck", "hasOpenModal", "hasDialogs", "hasRadixOverlays", "safeCleanup", "scheduleCleanup", "onDocumentClick", "event", "target", "onEscapeKey", "onInteraction", "observer", "intervalId", "useBodyPointerEventsCleanup"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\n\n// How many overlays currently use the hook. The listeners are shared: the first mount installs\n// them and the last unmount removes them, so closing one overlay never strips the fallback from\n// another that is still mounted.\nlet mountCount = 0;\nlet teardown: (() => void) | null = null;\n\nconst devLog = (message: string) => {\n if (process.env.NODE_ENV !== 'production') {\n console.log(message);\n }\n};\n\nfunction install(): () => void {\n // Deferred cleanups are tracked so teardown can cancel the ones still queued. A timer that\n // outlives the document reaches for `document.body` after it is gone; under jsdom that surfaces\n // as an unhandled ReferenceError attributed to whichever test happened to be running.\n const pending = new Set<ReturnType<typeof setTimeout>>();\n\n const defer = (fn: () => void, delay: number) => {\n const id = setTimeout(() => {\n pending.delete(id);\n fn();\n }, delay);\n pending.add(id);\n };\n\n const isStuck = () => document.body.style.pointerEvents === 'none';\n\n const hasOpenModal = (): boolean => {\n // Open dialogs and alert dialogs\n const hasDialogs = Boolean(\n document.querySelector('[role=\"dialog\"][aria-modal=\"true\"], [role=\"alertdialog\"][aria-modal=\"true\"]'),\n );\n\n // Any Radix overlay that is still mounted. Only overlays count: an open Accordion or\n // Collapsible also carries data-state=\"open\" and must not keep a stuck page blocked.\n const hasRadixOverlays = Boolean(\n document.querySelector(\n '[data-radix-popper-content-wrapper], [role=\"dialog\"][data-state=\"open\"], [role=\"alertdialog\"][data-state=\"open\"]',\n ),\n );\n\n return hasDialogs || hasRadixOverlays;\n };\n\n // Only clears pointer-events when no modal is open. Scroll-lock attributes belong to\n // react-remove-scroll and are never touched here.\n const safeCleanup = () => {\n if (isStuck() && !hasOpenModal()) {\n devLog('[KookieUI] Cleaning stuck pointer-events: none from body');\n document.body.style.pointerEvents = '';\n }\n };\n\n // Every trigger queues a check only while the body is actually blocked.\n const scheduleCleanup = (delay: number) => {\n if (isStuck()) defer(safeCleanup, delay);\n };\n\n const onDocumentClick = (event: Event) => {\n const target = event.target as Element;\n if (target && !target.closest('[role=\"dialog\"], [role=\"alertdialog\"], [data-radix-popper-content-wrapper]')) {\n scheduleCleanup(100);\n }\n };\n\n const onEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n scheduleCleanup(200);\n }\n };\n\n const onInteraction = () => {\n scheduleCleanup(50);\n };\n\n document.addEventListener('click', onDocumentClick, true);\n document.addEventListener('keydown', onEscapeKey, true);\n document.addEventListener('pointerup', onInteraction, true);\n document.addEventListener('transitionend', onInteraction, true);\n document.addEventListener('animationend', onInteraction, true);\n\n // Portals mount and unmount as direct children of body, and the stuck value lives in body's\n // style, so body's own children and style are all that need watching.\n const observer = new MutationObserver(() => {\n scheduleCleanup(0);\n });\n observer.observe(document.body, { childList: true, attributes: true, attributeFilter: ['style'] });\n\n // Fallback periodic cleanup\n const intervalId = setInterval(safeCleanup, 1000);\n\n // Initial cleanup\n scheduleCleanup(100);\n\n // Tear everything down together. The observer is the important one: it fires while React\n // unmounts the tree, so leaving it connected keeps queueing work against a document that is\n // about to go away.\n return () => {\n clearInterval(intervalId);\n\n pending.forEach(clearTimeout);\n pending.clear();\n\n observer.disconnect();\n\n document.removeEventListener('click', onDocumentClick, true);\n document.removeEventListener('keydown', onEscapeKey, true);\n document.removeEventListener('pointerup', onInteraction, true);\n document.removeEventListener('transitionend', onInteraction, true);\n document.removeEventListener('animationend', onInteraction, true);\n };\n}\n\n/**\n * Clears a `pointer-events: none` that Radix left on `document.body`, for a dialog that has just\n * closed. Leaves it alone while another modal is still open: that modal needs the page behind it\n * to stay blocked, and it clears the value itself when it closes.\n */\nexport function releaseBodyPointerEvents() {\n if (typeof document === 'undefined') return;\n const stillOpen = document.querySelector('[role=\"dialog\"][data-state=\"open\"], [role=\"alertdialog\"][data-state=\"open\"]');\n if (stillOpen) return;\n document.body.style.pointerEvents = '';\n}\n\n/**\n * Hook to cleanup stuck pointer-events: none on document.body\n *\n * This addresses an issue where react-remove-scroll (used by Radix UI Dialog)\n * sometimes fails to restore body pointer-events after dialog closes,\n * leaving the page unclickable. It never clears the value while a modal is open.\n */\nexport function useBodyPointerEventsCleanup() {\n React.useEffect(() => {\n if (typeof document === 'undefined') return;\n\n mountCount += 1;\n if (mountCount === 1) {\n teardown = install();\n }\n\n return () => {\n mountCount -= 1;\n if (mountCount === 0) {\n teardown?.();\n teardown = null;\n }\n };\n }, []);\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,UAAYA,MAAW,QAKvB,IAAIC,EAAa,EACbC,EAAgC,KAE9BC,EAAUC,GAAoB,CAIpC,EAEA,SAASC,GAAsB,CAI7B,IAAMC,EAAU,IAAI,IAEdC,EAAQ,CAACC,EAAgBC,IAAkB,CAC/C,IAAMC,EAAK,WAAW,IAAM,CAC1BJ,EAAQ,OAAOI,CAAE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,EAAiB,EAAI,EAC3D,SAAS,oBAAoB,UAAWG,EAAa,EAAI,EACzD,SAAS,oBAAoB,YAAaC,EAAe,EAAI,EAC7D,SAAS,oBAAoB,gBAAiBA,EAAe,EAAI,EACjE,SAAS,oBAAoB,eAAgBA,EAAe,EAAI,CAClE,CACF,CAOO,SAASG,GAA2B,CACrC,OAAO,SAAa,KACN,SAAS,cAAc,6EAA6E,IAEtH,SAAS,KAAK,MAAM,cAAgB,GACtC,CASO,SAASC,GAA8B,CACtC,YAAU,IAAM,CACpB,GAAI,SAAO,SAAa,KAExB,OAAAxB,GAAc,EACVA,IAAe,IACjBC,EAAWG,EAAQ,GAGd,IAAM,CACXJ,GAAc,EACVA,IAAe,IACjBC,IAAW,EACXA,EAAW,KAEf,CACF,EAAG,CAAC,CAAC,CACP",
|
|
6
|
+
"names": ["React", "mountCount", "teardown", "devLog", "message", "install", "pending", "defer", "fn", "delay", "id", "isStuck", "hasOpenModal", "hasDialogs", "hasRadixOverlays", "safeCleanup", "scheduleCleanup", "onDocumentClick", "event", "target", "onEscapeKey", "onInteraction", "observer", "intervalId", "releaseBodyPointerEvents", "useBodyPointerEventsCleanup"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{d as R,i as d,j as S}from"./chunk-C6VGCYFQ.js";import{a as G}from"./chunk-65URNXF2.js";import{a as j}from"./chunk-OBSZOD5M.js";import{a as E}from"./chunk-KVVRFWGQ.js";import{a as P}from"./chunk-4KBKS3ZE.js";import{a as y,d as x,e as H}from"./chunk-VWRPVM5K.js";import{d as O,i as M,k as A}from"./chunk-PMXIQ5B4.js";import*as e from"react";import f from"classnames";var D=e.createContext(null),F=e.createContext(0),$=e.createContext(null);function U(){let t=x(),o=e.useContext(P);return t!==null&&o===null}var W=e.Activity;function X({visible:t,children:o}){return W?e.createElement(W,{mode:t?"visible":"hidden"},o):e.createElement("div",{hidden:!t,style:{display:t?"contents":"none"}},o)}function ve({path:t,defaultPath:o,onPathChange:s,screen:i,root:c,children:u,className:b,style:l}){let v=U(),[N,p]=e.useState(o??[]),a=t??N,[g,q]=e.useState({path:a,direction:null}),m=g.direction;if(g.path.length!==a.length||g.path.some((n,r)=>!Object.is(n,a[r]))){let n=g.path;m=a.length<n.length?"pop":a.length>n.length||!Object.is(a[a.length-1],n[n.length-1])?"push":g.direction,q({path:a,direction:m})}e.useEffect(()=>{},[a]);let C=e.useRef([]),k=e.useRef([]),[z,K]=e.useState(0),T=e.useCallback(n=>{t===void 0&&p(n),s?.(n)},[t,s]),_=e.useMemo(()=>({path:a,canGoBack:a.length>0,push:n=>{k.current[a.length+1]=typeof document>"u"?null:document.activeElement,T([...a,n])},pop:()=>{a.length>0&&T(a.slice(0,-1))},popTo:n=>{n<a.length&&T(a.slice(0,Math.max(0,n)))},titles:C,openers:k,setTitle:(n,r)=>{C.current[n]!==r&&(C.current[n]=r,K(Q=>Q+1))},direction:m,inPane:v}),[a,T,z,m,v]),L=e.useRef(a.length);e.useEffect(()=>{let n=L.current;if(L.current=a.length,a.length<n){let r=k.current[n];k.current.length=a.length+1,r&&r.isConnected&&r.focus()}},[a.length]);let B=[c,...a.map(n=>i(n))],J=B.length-1,w=e.createElement("div",{className:f("kui-Navigator",b),style:l},B.map((n,r)=>e.createElement(X,{key:r===0?"root":`${r}:${String(a[r-1])}`,visible:r===J},e.createElement(F.Provider,{value:r},e.createElement("div",{className:"kui-NavigatorLevel"},n)))));return e.createElement(D.Provider,{value:_},e.createElement($.Provider,{value:w},u??(v?e.createElement(Y,null):w)))}function Y(){return e.createElement(e.Fragment,null,e.createElement(M,null,e.createElement(S,null,e.createElement(E,{align:"center"},e.createElement(te,null),e.createElement(d,null)))),e.createElement(A,null,e.createElement(Z,null)))}function Z(){return e.createElement(e.Fragment,null,e.useContext($))}function h(){let t=e.useContext(D);if(!t)throw new Error("Kookie: this part must be inside a <Navigator>.");return t}function pe(){return h()}function I(){return e.createElement("svg",{className:"kui-NavigatorBackGlyph",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},e.createElement("path",{d:"m15 18-6-6 6-6",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"}))}function ee(){return e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},e.createElement("path",{d:"M18 6 6 18M6 6l12 12",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round"}))}function V(t,o){let s=o>0?t.titles.current[o-1]:void 0;return s?`Back to ${s}`:"Back"}function te(t){let o=h();return o.canGoBack?e.createElement(R,{iconOnly:!0,"aria-label":t["aria-label"]??V(o,o.path.length),onClick:o.pop},e.createElement(I,null)):null}function ge(){let t=h();return t.inPane?e.createElement(d,null):e.createElement(d,null,t.titles.current[t.path.length])}function de({title:t,children:o,className:s}){let i=h(),c=e.useContext(F),u=e.useContext(P),b=e.useContext(O),l=e.useRef(null);if(e.useEffect(()=>{i.setTitle(c,t)},[i,c,t]),e.useEffect(()=>{if(c===0||i.direction!=="push")return;let p=l.current?.querySelector(".kui-NavigatorBar .kui-ToolbarTitle, h1")??l.current;p&&(p.tabIndex=-1,p.focus({preventScroll:!0}))},[]),i.inPane&&b)return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement(G,{title:t},o));if(i.inPane)return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement(ne,{title:t}),o);let v=c===i.path.length,N=e.createElement(j,{as:"h2",size:"4",weight:"medium",truncate:!0},t);return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement("div",{className:"kui-NavigatorBar"},e.createElement(S,{"aria-label":"Navigation"},i.canGoBack&&c>0?e.createElement(R,{iconOnly:!0,"aria-label":V(i,c),onClick:i.pop},e.createElement(I,null)):null,e.createElement(d,{className:"kui-NavigatorBarTitle"},u&&v?e.createElement(u.Title,null,N):N),u?e.createElement(u.Close,null,e.createElement(R,{iconOnly:!0,"aria-label":"Close"},e.createElement(ee,null))):null)),e.createElement("div",{className:"kui-NavigatorBody"},o))}function ne({title:t}){let o=x();return H(o,t),e.useEffect(()=>{if(o)return y(o,!0),()=>y(o,!1)},[o]),null}function fe({value:t,className:o,children:s,...i}){let c=h();return e.createElement("button",{type:"button",...i,className:f("kui-reset","kui-NavigatorLink",o),onClick:()=>c.push(t)},e.createElement("span",{className:"kui-NavigatorLinkLabel"},s),e.createElement("svg",{className:"kui-NavigatorLinkGlyph",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},e.createElement("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"})))}export{ve as a,Z as b,pe as c,te as d,ge as e,de as f,fe as g};
|
|
3
|
+
//# sourceMappingURL=chunk-LR4X7SVV.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/navigator.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * Navigator, from v2 (2026-11-03): a stack of screens, any depth. Any screen can open another on\n * top of it, and Back removes the top one. The first screen is the root and never goes.\n *\n * THE PATH IS DATA. The screens above the root are a list of values the app owns, and `screen`\n * turns a value into a screen, so an app can keep the path in its URL, restore it, or open three\n * levels deep from a link.\n *\n * IT HAS NO REGION OF ITS OWN. The host decides how a screen carries its title. In\n * `Shell.Content` a screen is a `Page`, whose large title collapses into the band with Back. In a\n * side pane (Sidebar, Panel, Inspector, Bottom) the band holds Back and the title from the start.\n * Anywhere else (a card, a Dialog, a Sheet, a Popover) each screen draws its own band: Back, the\n * title, and the overlay's close when it has one.\n *\n * SCREENS UNDER THE TOP STAY MOUNTED, hidden, so a list keeps its scroll and a field its draft.\n *\n * Focus: a pushed screen takes focus at its top; on pop, focus returns to the control that opened\n * the screen. Escape never goes back; it belongs to whatever overlay holds this.\n *\n * Differs from v2 in look only: no motion, since v1 has none. v1 has no Row yet, so\n * `NavigatorLink` is its own row.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { NavigatorHostContext } from './_internal/navigator-host.js';\nimport { PaneHeader, Scroll, ShellContentContext } from './_internal/pane-chrome.js';\nimport { setPageCollapsed, useClaimPage, usePageScope } from './_internal/page-scope.js';\nimport { Flex } from './flex.js';\nimport { Heading } from './heading.js';\nimport { Page } from './page.js';\nimport { Toolbar, ToolbarButton, ToolbarTitle } from './toolbar.js';\n\ntype NavigatorApi<T> = {\n /** The values above the root, bottom first. Empty at the root. */\n path: readonly T[];\n /** Open a screen on top. */\n push: (value: T) => void;\n /** Close the top screen. Does nothing at the root. */\n pop: () => void;\n /** Close every screen above `depth`, where 0 is the root. */\n popTo: (depth: number) => void;\n /** Whether there is a screen to go back to. */\n canGoBack: boolean;\n};\n\ntype NavigatorState = NavigatorApi<unknown> & {\n /** Each level's title, so Back can name the screen it returns to and a pane's band can show it. */\n titles: React.MutableRefObject<(string | undefined)[]>;\n setTitle: (depth: number, title: string) => void;\n /** The control that opened each level, so focus can go back to it. */\n openers: React.MutableRefObject<(HTMLElement | null)[]>;\n direction: 'push' | 'pop' | null;\n inPane: boolean;\n};\n\nconst NavigatorContext = React.createContext<NavigatorState | null>(null);\nconst LevelContext = React.createContext<number>(0);\nconst OutletContext = React.createContext<React.ReactNode>(null);\n\n/**\n * True in a Shell pane, `Shell.Content` included, and not in an overlay opened from one: there\n * the pane's band carries Back and the title. Overlays cut the pane's page scope at the portal.\n */\nfunction useInPane() {\n const scope = usePageScope();\n const host = React.useContext(NavigatorHostContext);\n return scope !== null && host === null;\n}\n\n// Activity keeps a hidden screen's state and cleans up its effects (React 19.2). On an older\n// React, the screen is kept in a hidden element instead, with its effects still running.\nconst Activity = (React as { Activity?: React.ComponentType<{ mode: 'visible' | 'hidden'; children: React.ReactNode }> }).Activity;\n\nfunction Level({ visible, children }: { visible: boolean; children: React.ReactNode }) {\n if (Activity) return <Activity mode={visible ? 'visible' : 'hidden'}>{children}</Activity>;\n return (\n <div hidden={!visible} style={{ display: visible ? 'contents' : 'none' }}>\n {children}\n </div>\n );\n}\n\ninterface NavigatorProps<T> {\n /**\n * The screens above the root, as values. Use it with `onPathChange` to control the path. Each\n * value is a string or a number: a screen is told apart by its value, and every object reads the\n * same, so an object here would hand one screen's state to the next. Keep an id in the path and\n * look the record up in `screen`.\n */\n path?: readonly T[];\n /** The path to start with when the navigator controls its own path. */\n defaultPath?: readonly T[];\n /** Called with the new path whenever a screen opens or closes. */\n onPathChange?: (path: T[]) => void;\n /** Turns a value from the path into its screen, usually a `NavigatorScreen`. */\n screen: (value: T) => React.ReactNode;\n /** The root screen, usually a `NavigatorScreen`. It is always at the bottom and never closes. */\n root: React.ReactNode;\n /**\n * The frame around the screens, when you need your own: a `Shell.PaneHeader` with actions, and\n * a `Shell.Scroll` holding `NavigatorOutlet`. Leave it out and the navigator draws the frame: in\n * a Shell pane, the pane's band with Back and the title, and its scroller; anywhere else, the\n * screens on their own.\n */\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * A stack of screens: any screen can open another on top, and Back returns to the one below.\n * `root` is the first screen, `screen` turns each value in the path into its screen, and\n * `children`, when given, is the frame the screens go into through `NavigatorOutlet`.\n */\nfunction Navigator<T>({ path: pathProp, defaultPath, onPathChange, screen, root, children, className, style }: NavigatorProps<T>) {\n const inPane = useInPane();\n const [own, setOwn] = React.useState<readonly T[]>(defaultPath ?? []);\n const path = pathProp ?? own;\n // The direction comes from the path itself, so a path the app sets moves focus the same way as\n // one changed by push and pop. Equal length with a new top value is a new screen arriving.\n const [seen, setSeen] = React.useState<{ path: readonly T[]; direction: 'push' | 'pop' | null }>({ path, direction: null });\n let direction = seen.direction;\n // Compared by content, not identity: a controlled `path` may be a new array every render.\n if (seen.path.length !== path.length || seen.path.some((value, i) => !Object.is(value, path[i]))) {\n const before = seen.path;\n direction = path.length < before.length ? 'pop' : path.length > before.length || !Object.is(path[path.length - 1], before[before.length - 1]) ? 'push' : seen.direction;\n setSeen({ path, direction });\n }\n // A screen's key is its depth and its value as text, and every object is the same text.\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (path.some((value) => value !== null && typeof value === 'object')) {\n console.error('Navigator: a value in `path` is an object. Path values must be strings or numbers; keep an id in the path and look the record up in `screen`.');\n }\n }, [path]);\n\n const titles = React.useRef<(string | undefined)[]>([]);\n const openers = React.useRef<(HTMLElement | null)[]>([]);\n const [version, setVersion] = React.useState(0);\n\n const change = React.useCallback(\n (next: T[]) => {\n if (pathProp === undefined) setOwn(next);\n onPathChange?.(next);\n },\n [pathProp, onPathChange],\n );\n\n const api = React.useMemo<NavigatorState>(\n () => ({\n path,\n canGoBack: path.length > 0,\n push: (value) => {\n openers.current[path.length + 1] = typeof document === 'undefined' ? null : (document.activeElement as HTMLElement | null);\n change([...path, value as T]);\n },\n pop: () => {\n if (path.length > 0) change(path.slice(0, -1));\n },\n popTo: (depth) => {\n if (depth < path.length) change(path.slice(0, Math.max(0, depth)));\n },\n titles,\n openers,\n setTitle: (depth, title) => {\n if (titles.current[depth] === title) return;\n titles.current[depth] = title;\n setVersion((v) => v + 1);\n },\n direction,\n inPane,\n }),\n // `version` is read through `titles`; it is here so a new title reaches the band and Back.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [path, change, version, direction, inPane],\n );\n\n // On pop, focus goes back to the control that opened the screen that just closed.\n const previousDepth = React.useRef(path.length);\n React.useEffect(() => {\n const before = previousDepth.current;\n previousDepth.current = path.length;\n if (path.length < before) {\n const opener = openers.current[before];\n openers.current.length = path.length + 1;\n if (opener && opener.isConnected) opener.focus();\n }\n }, [path.length]);\n\n const levels = [root, ...path.map((value) => screen(value))];\n const top = levels.length - 1;\n const outlet = (\n <div className={classNames('kui-Navigator', className)} style={style}>\n {levels.map((level, depth) => (\n // Keyed by depth AND value, so a path that replaces the screen at a depth mounts a new\n // screen instead of handing it the old one's state.\n <Level key={depth === 0 ? 'root' : `${depth}:${String(path[depth - 1])}`} visible={depth === top}>\n <LevelContext.Provider value={depth}>\n <div className=\"kui-NavigatorLevel\">{level}</div>\n </LevelContext.Provider>\n </Level>\n ))}\n </div>\n );\n\n return (\n <NavigatorContext.Provider value={api}>\n <OutletContext.Provider value={outlet}>{children ?? (inPane ? <PaneFrame /> : outlet)}</OutletContext.Provider>\n </NavigatorContext.Provider>\n );\n}\n\n/**\n * The pane's frame: Back and the top screen's title as one cluster at the start of the pane's\n * band, and the screens in the pane's scroller. Pass children to the Navigator instead when the\n * band needs actions of its own, and put `NavigatorBack` and `NavigatorTitle` in it, together in\n * a `Flex`.\n */\nfunction PaneFrame() {\n return (\n <>\n <PaneHeader>\n <Toolbar>\n {/* One cluster: as two loose toolbar children, the band splits them to its two ends. */}\n <Flex align=\"center\">\n <NavigatorBack />\n <ToolbarTitle />\n </Flex>\n </Toolbar>\n </PaneHeader>\n <Scroll>\n <NavigatorOutlet />\n </Scroll>\n </>\n );\n}\n\n/** Where the screens go, inside a frame passed as the navigator's children. */\nfunction NavigatorOutlet() {\n return <>{React.useContext(OutletContext)}</>;\n}\n\nfunction useNavigatorState(): NavigatorState {\n const state = React.useContext(NavigatorContext);\n if (!state) throw new Error('Kookie: this part must be inside a <Navigator>.');\n return state;\n}\n\n/** The navigator around this component: its path, and `push`, `pop` and `popTo`. */\nfunction useNavigator<T = unknown>(): NavigatorApi<T> {\n return useNavigatorState() as NavigatorApi<T>;\n}\n\nfunction BackGlyph() {\n return (\n <svg className=\"kui-NavigatorBackGlyph\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path d=\"m15 18-6-6 6-6\" stroke=\"currentColor\" strokeWidth={1.75} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n );\n}\n\nfunction CloseGlyph() {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" stroke=\"currentColor\" strokeWidth={1.75} strokeLinecap=\"round\" />\n </svg>\n );\n}\n\nfunction backLabel(state: NavigatorState, depth: number) {\n const previous = depth > 0 ? state.titles.current[depth - 1] : undefined;\n return previous ? `Back to ${previous}` : 'Back';\n}\n\ninterface NavigatorBackProps {\n /** The accessible name. The default is \"Back to\" and the previous screen's title. */\n 'aria-label'?: string;\n}\n\n/**\n * Back, for a toolbar: a chevron that closes the top screen. It is absent at the root rather than\n * disabled, because there is nowhere to go back to. It names the screen it returns to, so a screen\n * reader hears \"Back to Settings\".\n */\nfunction NavigatorBack(props: NavigatorBackProps) {\n const state = useNavigatorState();\n if (!state.canGoBack) return null;\n return (\n <ToolbarButton iconOnly aria-label={props['aria-label'] ?? backLabel(state, state.path.length)} onClick={state.pop}>\n <BackGlyph />\n </ToolbarButton>\n );\n}\n\n/**\n * The top screen's title, for a toolbar in a frame of your own. In a pane it is the band's\n * mirroring `Toolbar.Title`, which shows once the page's large title has scrolled away.\n */\nfunction NavigatorTitle() {\n const state = useNavigatorState();\n if (state.inPane) return <ToolbarTitle />;\n return <ToolbarTitle>{state.titles.current[state.path.length]}</ToolbarTitle>;\n}\n\ninterface NavigatorScreenProps {\n /** The screen's title. In a pane it shows in the pane's band; elsewhere in the screen's own. */\n title: string;\n /** The screen's content, under its title. */\n children?: React.ReactNode;\n className?: string;\n}\n\n/**\n * One screen in a navigator. In a Shell pane the pane's band carries Back and its title, so the\n * screen is only its content. Anywhere else it draws its own band: Back, the title, and the\n * overlay's close when it sits in one. In a Dialog, Sheet or Popover the title names the panel.\n */\nfunction NavigatorScreen({ title, children, className }: NavigatorScreenProps) {\n const state = useNavigatorState();\n const depth = React.useContext(LevelContext);\n const Host = React.useContext(NavigatorHostContext);\n const inWorkArea = React.useContext(ShellContentContext);\n const node = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n state.setTitle(depth, title);\n }, [state, depth, title]);\n\n // A pushed screen takes focus at its top, so a keyboard and a screen reader start there. In a\n // pane the title is in the band, outside the screen, so the screen itself takes it.\n React.useEffect(() => {\n if (depth === 0 || state.direction !== 'push') return;\n const target = node.current?.querySelector<HTMLElement>('.kui-NavigatorBar .kui-ToolbarTitle, h1') ?? node.current;\n if (target) {\n target.tabIndex = -1;\n target.focus({ preventScroll: true });\n }\n // Only on arrival: a later re-render must not pull focus back to the title.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (state.inPane && inWorkArea) {\n return (\n <div ref={node} className={classNames('kui-NavigatorScreen', className)}>\n <Page title={title}>{children}</Page>\n </div>\n );\n }\n if (state.inPane) {\n // A side pane keeps its title in its band: a page's large title would dwarf a narrow\n // inspector's rows. The screen claims the pane's title, collapsed from the start.\n return (\n <div ref={node} className={classNames('kui-NavigatorScreen', className)}>\n <SidePaneTitle title={title} />\n {children}\n </div>\n );\n }\n\n // Only the top screen names the panel. Screens underneath stay mounted, and if each wrapped its\n // title in the overlay's title part they would share its id, and the panel would keep the root's name.\n const isTop = depth === state.path.length;\n const heading = (\n <Heading as=\"h2\" size=\"4\" weight=\"medium\" truncate>\n {title}\n </Heading>\n );\n return (\n <div ref={node} className={classNames('kui-NavigatorScreen', className)}>\n {/* One row: Back, the title, and the overlay's close. The band sits one step closer to the\n panel's edge than the content does. */}\n <div className=\"kui-NavigatorBar\">\n <Toolbar aria-label=\"Navigation\">\n {state.canGoBack && depth > 0 ? (\n <ToolbarButton iconOnly aria-label={backLabel(state, depth)} onClick={state.pop}>\n <BackGlyph />\n </ToolbarButton>\n ) : null}\n <ToolbarTitle className=\"kui-NavigatorBarTitle\">{Host && isTop ? <Host.Title>{heading}</Host.Title> : heading}</ToolbarTitle>\n {Host ? (\n <Host.Close>\n <ToolbarButton iconOnly aria-label=\"Close\">\n <CloseGlyph />\n </ToolbarButton>\n </Host.Close>\n ) : null}\n </Toolbar>\n </div>\n <div className=\"kui-NavigatorBody\">{children}</div>\n </div>\n );\n}\n\nfunction SidePaneTitle({ title }: { title: string }) {\n const store = usePageScope();\n useClaimPage(store, title);\n React.useEffect(() => {\n if (!store) return;\n setPageCollapsed(store, true);\n return () => setPageCollapsed(store, false);\n }, [store]);\n return null;\n}\n\ninterface NavigatorLinkProps<T> extends Omit<React.ComponentPropsWithoutRef<'button'>, 'value' | 'onClick'> {\n /** The value pushed onto the path when the row is pressed. */\n value: T;\n}\n\n/** A row that opens the next screen, with the chevron that says so. */\nfunction NavigatorLink<T>({ value, className, children, ...props }: NavigatorLinkProps<T>) {\n const state = useNavigatorState();\n return (\n <button type=\"button\" {...props} className={classNames('kui-reset', 'kui-NavigatorLink', className)} onClick={() => state.push(value)}>\n <span className=\"kui-NavigatorLinkLabel\">{children}</span>\n <svg className=\"kui-NavigatorLinkGlyph\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path d=\"m9 18 6-6-6-6\" stroke=\"currentColor\" strokeWidth={1.75} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n );\n}\n\nexport { Navigator, NavigatorOutlet, NavigatorBack, NavigatorTitle, NavigatorScreen, NavigatorLink, useNavigator };\nexport type { NavigatorProps, NavigatorBackProps, NavigatorScreenProps, NavigatorLinkProps, NavigatorApi };\n"],
|
|
5
|
+
"mappings": ";kUAyBA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAiCvB,IAAMC,EAAyB,gBAAqC,IAAI,EAClEC,EAAqB,gBAAsB,CAAC,EAC5CC,EAAsB,gBAA+B,IAAI,EAM/D,SAASC,GAAY,CACnB,IAAMC,EAAQC,EAAa,EACrBC,EAAa,aAAWC,CAAoB,EAClD,OAAOH,IAAU,MAAQE,IAAS,IACpC,CAIA,IAAME,EAAoH,WAE1H,SAASC,EAAM,CAAE,QAAAC,EAAS,SAAAC,CAAS,EAAoD,CACrF,OAAIH,EAAiB,gBAACA,EAAA,CAAS,KAAME,EAAU,UAAY,UAAWC,CAAS,EAE7E,gB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C,QAAK,UAAU,0BAA0BhB,CAAS,EACnD,gBAAC,OAAI,UAAU,yBAAyB,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA6B,cAAW,IACpH,gBAAC,QAAK,EAAE,gBAAgB,OAAO,eAAe,YAAa,KAAM,cAAc,QAAQ,eAAe,QAAQ,CAChH,CACF,CAEJ",
|
|
6
|
+
"names": ["React", "classNames", "NavigatorContext", "LevelContext", "OutletContext", "useInPane", "scope", "usePageScope", "host", "NavigatorHostContext", "Activity", "Level", "visible", "children", "Navigator", "pathProp", "defaultPath", "onPathChange", "screen", "root", "className", "style", "inPane", "own", "setOwn", "path", "seen", "setSeen", "direction", "value", "i", "before", "titles", "openers", "version", "setVersion", "change", "next", "api", "depth", "title", "v", "previousDepth", "opener", "levels", "top", "outlet", "classNames", "level", "PaneFrame", "PaneHeader", "Toolbar", "Flex", "NavigatorBack", "ToolbarTitle", "Scroll", "NavigatorOutlet", "useNavigatorState", "state", "useNavigator", "BackGlyph", "CloseGlyph", "backLabel", "previous", "props", "ToolbarButton", "NavigatorTitle", "NavigatorScreen", "Host", "inWorkArea", "ShellContentContext", "node", "target", "Page", "SidePaneTitle", "isTop", "heading", "Heading", "store", "useClaimPage", "setPageCollapsed", "NavigatorLink"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as g}from"./chunk-FATCGZZE.js";import{a as f}from"./chunk-OBSZOD5M.js";import{
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as g}from"./chunk-FATCGZZE.js";import{a as f}from"./chunk-OBSZOD5M.js";import{b as C}from"./chunk-3RJVW6RK.js";import{a}from"./chunk-TGRHRMQI.js";import{a as d}from"./chunk-FICBVI4M.js";import{a as h}from"./chunk-HGF4CKRY.js";import{c}from"./chunk-5ON3XLRD.js";import{a as P}from"./chunk-4KBKS3ZE.js";import{c as m}from"./chunk-OKQAVYW4.js";import{a as W}from"./chunk-VQPANPMI.js";var j={};W(j,{Close:()=>E,Content:()=>y,Description:()=>T,Root:()=>S,Title:()=>D,Trigger:()=>R});import*as e from"react";import k from"classnames";import{Dialog as i}from"radix-ui";var S=t=>e.createElement(i.Root,{...t,modal:!0});S.displayName="Sheet.Root";var R=e.forwardRef(({children:t,...o},r)=>e.createElement(i.Trigger,{...o,ref:r,asChild:!0},a(t)));R.displayName="Sheet.Trigger";var{align:Y,...w}=g,u=w,B={Title:({children:t})=>e.createElement(i.Title,{asChild:!0},t),Close:({children:t})=>e.createElement(i.Close,{asChild:!0},t)},v=e.createContext(null),y=e.forwardRef((t,o)=>{let{side:r="start",forceMount:s,container:n,className:N,...x}=t,b=c(x,u.size),H={left:"start",right:"end",start:"start",end:"end",top:"top",bottom:"bottom"}[r],{className:O,...l}=m(b,u),z=e.useRef(0),M=e.useCallback(p=>{typeof o=="function"?o(p):o&&(o.current=p)},[o]);return C(),e.createElement(i.Portal,{container:n,forceMount:s},e.createElement(v.Provider,{value:z},e.createElement(h,{asChild:!0},e.createElement(i.Overlay,{className:"kui-BaseDialogOverlay kui-DialogOverlay kui-SheetOverlay"},e.createElement(i.Content,{...l,ref:M,className:k("kui-BaseDialogContent","kui-SheetContent",N,O),"data-side":H,"aria-modal":"true",children:e.createElement(P.Provider,{value:B},l.children)})))))});y.displayName="Sheet.Content";var D=e.forwardRef(({size:t="4",weight:o="medium",...r},s)=>{let n=e.useContext(v);return e.useLayoutEffect(()=>{if(n)return n.current+=1,()=>{n.current-=1}},[n]),e.createElement(i.Title,{asChild:!0},e.createElement(f,{ref:s,size:t,weight:o,...r}))});D.displayName="Sheet.Title";var T=e.forwardRef(({size:t="2",emphasis:o="medium",...r},s)=>e.createElement(i.Description,{asChild:!0},e.createElement(d,{ref:s,size:t,emphasis:o,...r})));T.displayName="Sheet.Description";var E=e.forwardRef(({children:t,...o},r)=>e.createElement(i.Close,{...o,ref:r,asChild:!0},a(t)));E.displayName="Sheet.Close";export{S as a,R as b,y as c,D as d,T as e,E as f,j as g};
|
|
3
|
+
//# sourceMappingURL=chunk-QV66TN2A.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as T,b as I}from"./chunk-3RJVW6RK.js";import{a as N}from"./chunk-HGF4CKRY.js";import{b as x}from"./chunk-5ON3XLRD.js";import*as e from"react";import{createPortal as z}from"react-dom";import d from"classnames";import{Command as v}from"cmdk";import{Dialog as g}from"radix-ui";var M={1:"2",2:"3",3:"4",4:"4"},G={values:["1","2","3","4"],default:"2"},h=e.createContext("2"),L=e.createContext(()=>{}),E=e.createContext([]),w=e.createContext(null),O=e.createContext({query:"",filter:null,itemToString:String}),b=e.createContext(null);function B(t){if(typeof t=="string"||typeof t=="number")return String(t);if(t&&typeof t=="object"){let o=t;for(let n of["label","title","value","name"])if(typeof o[n]=="string")return o[n]}return""}var F=(t,o,n)=>n(t).toLowerCase().includes(o.trim().toLowerCase());function A(t){return!!(t&&typeof t=="object"&&Array.isArray(t.items))}function H(t,o,n,i){if(n===null||o.trim()==="")return[...t];let a=[];for(let r of t)if(A(r)){let s=r.items.filter(m=>n(m,o,i));s.length>0&&a.push({...r,items:s})}else n(r,o,i)&&a.push(r);return a}function Z({size:t,items:o,open:n,defaultOpen:i,onOpenChange:a,children:r}){let s=x(t,G),[m,C]=e.useState(i??!1),l=n!==void 0,p=l?n:m,c=e.useCallback((u,R)=>{a?.(u,{reason:R}),l||C(u)},[a,l]),f=e.useCallback(()=>c(!1,"item-press"),[c]);return e.createElement(h.Provider,{value:s},e.createElement(E.Provider,{value:o},e.createElement(w.Provider,{value:f},e.createElement(g.Root,{open:p,onOpenChange:u=>c(u,"dismiss"),modal:!0},r))))}function J({children:t,...o}){return e.createElement(g.Trigger,{asChild:!0,...o},t)}function K({"aria-label":t,filter:o=F,itemToString:n=B,onQueryChange:i,container:a,children:r,className:s,style:m}){let C=e.useContext(h),[l,p]=e.useState(""),[c,f]=e.useState(null),u=e.useRef(i);e.useEffect(()=>{u.current=i}),e.useEffect(()=>()=>u.current?.(""),[]),I();let R=e.useCallback(y=>{p(y),u.current?.(y)},[]),S=e.useMemo(()=>({query:l,filter:o,itemToString:n}),[l,o,n]),P=e.useMemo(()=>({seat:c,setSeat:f}),[c]);return e.createElement(g.Portal,{container:a},e.createElement(N,{asChild:!0},e.createElement(g.Overlay,{className:"kui-BaseDialogOverlay kui-CommandOverlay"},e.createElement(g.Content,{"aria-label":t,"aria-describedby":void 0,className:d("kui-CommandContent",`kui-r-size-${C}`,s),style:m,onCloseAutoFocus:()=>{T()}},e.createElement(g.Title,{className:"kui-sr-only"},t),e.createElement(v,{label:t,shouldFilter:!1,loop:!0,className:"kui-CommandRoot"},e.createElement(O.Provider,{value:S},e.createElement(L.Provider,{value:R},e.createElement(b.Provider,{value:P},r))))))))}function U({leading:t,className:o,...n}){let i=e.useContext(h),a=e.useContext(L),r=e.useRef(null);return e.createElement("div",{className:d("kui-CommandSearch",`kui-r-size-${i}`),onMouseDown:s=>{s.target!==r.current&&(s.preventDefault(),r.current?.focus())}},t?e.createElement("span",{className:"kui-CommandSearchSlot","aria-hidden":!0},t):null,e.createElement(v.Input,{ref:r,autoFocus:!0,...n,onValueChange:a,className:d("kui-reset","kui-CommandInput",o)}))}function X({children:t,className:o}){let n=e.useContext(h),i=e.useContext(E),{query:a,filter:r,itemToString:s}=e.useContext(O),m=e.useContext(b),C=e.useMemo(()=>H(i,a,r,s),[i,a,r,s]);return e.createElement("div",{className:d("kui-BaseMenuContent","kui-variant-soft",`kui-r-size-${M[n]}`,"kui-CommandPanel",o)},e.createElement(v.List,{className:d("kui-BaseMenuViewport","kui-CommandList")},C.map(l=>t(l)),e.createElement("div",{className:"kui-CommandSeat",ref:m?m.setSeat:void 0})))}var D=e.createContext([]);function Y({items:t,children:o,className:n}){return e.createElement(D.Provider,{value:t},e.createElement(v.Group,{className:d("kui-BaseMenuGroup","kui-CommandGroup",n)},o))}function ee({children:t,className:o}){let n=e.useId(),i=e.useRef(null);return e.useLayoutEffect(()=>{let a=i.current?.closest("[cmdk-group-items]");if(!(!a||a.hasAttribute("aria-labelledby")))return a.setAttribute("aria-labelledby",n),()=>{a.getAttribute("aria-labelledby")===n&&a.removeAttribute("aria-labelledby")}},[n]),e.createElement("div",{ref:i,id:n,className:d("kui-BaseMenuLabel","kui-CommandGroupLabel",o),"aria-hidden":!0},t)}function te({children:t}){let o=e.useContext(D);return e.createElement(e.Fragment,null,o.map(n=>t(n)))}function ne({value:t,onSelect:o,leading:n,trailing:i,tone:a,asChild:r,children:s,className:m,...C}){let l=e.useContext(w),p=e.useId(),c=e.useRef(null),f=e.useRef(!1),u=typeof t=="string"?t:p,R=()=>{o?.(),l?.()},S=()=>{if(f.current){f.current=!1,R();return}let k=c.current??document.querySelector(`[data-kui-command-item="${CSS.escape(p)}"]`);if(r&&k instanceof HTMLAnchorElement){k.click();return}R()},P=r&&e.isValidElement(s)?s:null,y=k=>e.createElement(e.Fragment,null,n?e.createElement("span",{className:"kui-CommandItemSlot","data-slot":"leading","aria-hidden":!0},n):null,e.createElement("span",{className:"kui-CommandItemLabel"},k),i?e.createElement("span",{className:"kui-CommandItemSlot","data-slot":"trailing"},i):null);return e.createElement(v.Item,{...C,ref:c,"data-kui-command-item":p,value:u,asChild:!!P,onSelect:S,onClickCapture:()=>{f.current=!0},"data-tone":a,className:d("kui-reset","kui-BaseMenuItem","kui-CommandItem",m)},P?e.cloneElement(P,void 0,y(P.props.children)):y(s))}function oe({children:t,className:o}){let n=e.useContext(b);return n?.seat?z(e.createElement(v.Empty,{className:d("kui-CommandEmpty",o)},t),n.seat):null}export{M as a,Z as b,J as c,K as d,U as e,X as f,Y as g,ee as h,te as i,ne as j,oe as k};
|
|
3
|
+
//# sourceMappingURL=chunk-SR42NATX.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/command.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * Command, from v2 (2026-11-03): a command palette, one field over everything the app can do.\n *\n * It is a Dialog: it covers the app, traps focus, locks the page and leaves on Escape. Inside are\n * two panes in a column anchored to the top, the search bar and the results, so a result count\n * never moves the field. The keyboard model is the package's: a row is highlighted from the first\n * frame and after every keystroke, the arrows move it, Enter runs it, and running a row closes the\n * palette. What rows exist and what they do is the app's.\n *\n * Filtering keeps the order of `items`: a palette is used by muscle memory, so typing never\n * reorders it. Pass `filter={null}` to narrow and rank `items` yourself.\n *\n * Differs from v2 in its machine only: v1 builds on cmdk where v2 builds on Base UI's Autocomplete.\n * A row that should be a link takes `asChild` around the app's link, where v2 takes `render`.\n */\n\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport classNames from 'classnames';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { releaseBodyPointerEvents, useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\n\ntype Size = '1' | '2' | '3' | '4';\n\n/** The rows stand one step above the palette: it is the one object on screen, read from a distance. */\nconst ROW_STEP: Record<Size, Size> = { '1': '2', '2': '3', '3': '4', '4': '4' };\n\ntype CommandOpenChangeReason = 'item-press' | 'dismiss';\ntype CommandOpenChangeDetails = { reason: CommandOpenChangeReason };\n\ntype Filter = (item: unknown, query: string, itemToString: (item: unknown) => string) => boolean;\n\nconst SIZE_DEF = { values: ['1', '2', '3', '4'], default: '2' } as const;\n\nconst CommandSizeContext = React.createContext<Size>('2');\nconst CommandQueryContext = React.createContext<(query: string) => void>(() => {});\nconst CommandItemsContext = React.createContext<readonly unknown[]>([]);\nconst CommandCloseContext = React.createContext<(() => void) | null>(null);\nconst CommandListContext = React.createContext<{ query: string; filter: Filter | null; itemToString: (item: unknown) => string }>({\n query: '',\n filter: null,\n itemToString: String,\n});\nconst CommandSeatContext = React.createContext<{ seat: HTMLElement | null; setSeat: (node: HTMLElement | null) => void } | null>(null);\n\n/** What an item says, for the default filter: a string as itself, an object by its label, title or value. */\nfunction defaultItemToString(item: unknown): string {\n if (typeof item === 'string' || typeof item === 'number') return String(item);\n if (item && typeof item === 'object') {\n const record = item as Record<string, unknown>;\n for (const key of ['label', 'title', 'value', 'name']) {\n if (typeof record[key] === 'string') return record[key] as string;\n }\n }\n return '';\n}\n\nconst defaultFilter: Filter = (item, query, itemToString) => itemToString(item).toLowerCase().includes(query.trim().toLowerCase());\n\n/** A group is an item that carries its own `items`; it stays while any of them matches. */\nfunction isGroup(item: unknown): item is { items: readonly unknown[] } {\n return Boolean(item && typeof item === 'object' && Array.isArray((item as { items?: unknown }).items));\n}\n\nfunction narrow(items: readonly unknown[], query: string, filter: Filter | null, itemToString: (item: unknown) => string): unknown[] {\n if (filter === null || query.trim() === '') return [...items];\n const out: unknown[] = [];\n for (const item of items) {\n if (isGroup(item)) {\n const kept = item.items.filter((member) => filter(member, query, itemToString));\n if (kept.length > 0) out.push({ ...item, items: kept });\n } else if (filter(item, query, itemToString)) {\n out.push(item);\n }\n }\n return out;\n}\n\ninterface CommandProps {\n /**\n * The size step of the palette, from `\"1\"` to `\"4\"`. The rows are one step larger than the\n * app's controls at the same step, and the search text larger again. The default comes from\n * the theme.\n */\n size?: Size;\n /**\n * Every item the palette can show, before filtering. `CommandList` takes a function that turns\n * an item into a row. An item with its own `items` array is a group. Keep the array stable.\n */\n items: readonly unknown[];\n /** Whether the palette is open, for a controlled palette. Most are, because a key handler opens them. */\n open?: boolean;\n /** Whether the palette is open at the start, for an uncontrolled palette. */\n defaultOpen?: boolean;\n /** Called each time the palette opens or closes. `reason` is `\"item-press\"` when a row ran. */\n onOpenChange?: (open: boolean, details: CommandOpenChangeDetails) => void;\n /** A `CommandTrigger`, if there is one, and a `CommandContent`. */\n children: React.ReactNode;\n}\n\n/** A command palette: a field over a list of rows, in a dialog. Running a row closes it. */\nfunction Command({ size: sizeProp, items, open, defaultOpen, onOpenChange, children }: CommandProps) {\n const size = useThemeSize<Size>(sizeProp, SIZE_DEF);\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen ?? false);\n const controlled = open !== undefined;\n const isOpen = controlled ? open : internalOpen;\n\n const change = React.useCallback(\n (next: boolean, reason: CommandOpenChangeReason) => {\n onOpenChange?.(next, { reason });\n if (!controlled) setInternalOpen(next);\n },\n [onOpenChange, controlled],\n );\n const close = React.useCallback(() => change(false, 'item-press'), [change]);\n\n return (\n <CommandSizeContext.Provider value={size}>\n <CommandItemsContext.Provider value={items}>\n <CommandCloseContext.Provider value={close}>\n <DialogPrimitive.Root open={isOpen} onOpenChange={(next) => change(next, 'dismiss')} modal>\n {children}\n </DialogPrimitive.Root>\n </CommandCloseContext.Provider>\n </CommandItemsContext.Provider>\n </CommandSizeContext.Provider>\n );\n}\n\ninterface CommandTriggerProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger> {}\n\n/** Opens the palette. Most palettes open from a key handler instead, and render none. */\nfunction CommandTrigger({ children, ...props }: CommandTriggerProps) {\n return (\n <DialogPrimitive.Trigger asChild {...props}>\n {children}\n </DialogPrimitive.Trigger>\n );\n}\n\ninterface CommandContentProps {\n /** The palette's accessible name, such as \"Search the documentation\". */\n 'aria-label': string;\n /**\n * How an item matches the query. The default keeps an item whose text contains the query.\n * `null` turns filtering off, for an app that narrows and ranks `items` itself.\n */\n filter?: Filter | null;\n /** What an item says, for the filter. The default reads a string, or an object's label, title or value. */\n itemToString?: (item: unknown) => string;\n /** Called with the query on every keystroke, and with `\"\"` when the palette closes. */\n onQueryChange?: (query: string) => void;\n /** Keep the portal in a container of your own. */\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** The palette: a column of the search bar over the results, anchored to the top of the window. */\nfunction CommandContent({ 'aria-label': label, filter = defaultFilter, itemToString = defaultItemToString, onQueryChange, container, children, className, style }: CommandContentProps) {\n const size = React.useContext(CommandSizeContext);\n const [query, setQuery] = React.useState('');\n const [seat, setSeat] = React.useState<HTMLElement | null>(null);\n const report = React.useRef(onQueryChange);\n React.useEffect(() => {\n report.current = onQueryChange;\n });\n\n // Closing clears the query, so the palette opens fresh.\n React.useEffect(() => () => report.current?.(''), []);\n useBodyPointerEventsCleanup();\n\n const changeQuery = React.useCallback((next: string) => {\n setQuery(next);\n report.current?.(next);\n }, []);\n const listValue = React.useMemo(() => ({ query, filter, itemToString }), [query, filter, itemToString]);\n const seatValue = React.useMemo(() => ({ seat, setSeat }), [seat]);\n\n return (\n <DialogPrimitive.Portal container={container}>\n <PortalTheme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-CommandOverlay\">\n <DialogPrimitive.Content\n aria-label={label}\n aria-describedby={undefined}\n className={classNames('kui-CommandContent', `kui-r-size-${size}`, className)}\n style={style}\n onCloseAutoFocus={() => {\n releaseBodyPointerEvents();\n }}\n >\n <DialogPrimitive.Title className=\"kui-sr-only\">{label}</DialogPrimitive.Title>\n {/* cmdk owns the highlight and Enter; this file owns the filter, so order never changes. */}\n <CommandPrimitive label={label} shouldFilter={false} loop className=\"kui-CommandRoot\">\n <CommandListContext.Provider value={listValue}>\n <CommandQueryContext.Provider value={changeQuery}>\n <CommandSeatContext.Provider value={seatValue}>{children}</CommandSeatContext.Provider>\n </CommandQueryContext.Provider>\n </CommandListContext.Provider>\n </CommandPrimitive>\n </DialogPrimitive.Content>\n </DialogPrimitive.Overlay>\n </PortalTheme>\n </DialogPrimitive.Portal>\n );\n}\n\ninterface CommandInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange' | 'aria-label'> {\n /** The field's accessible name. */\n 'aria-label': string;\n /** An icon before the text, such as a search glyph. */\n leading?: React.ReactNode;\n}\n\n/** The search bar, a pane of its own. The palette opens with the caret in it. */\nfunction CommandInput({ leading, className, ...props }: CommandInputProps) {\n const size = React.useContext(CommandSizeContext);\n const setQuery = React.useContext(CommandQueryContext);\n const inputRef = React.useRef<HTMLInputElement>(null);\n return (\n // A press anywhere on the bar puts the caret in the field.\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={classNames('kui-CommandSearch', `kui-r-size-${size}`)}\n onMouseDown={(event) => {\n if (event.target === inputRef.current) return;\n event.preventDefault();\n inputRef.current?.focus();\n }}\n >\n {leading ? (\n <span className=\"kui-CommandSearchSlot\" aria-hidden>\n {leading}\n </span>\n ) : null}\n {/* `autoFocus` focuses inside the tap's own task, which is what raises the keyboard on iOS. */}\n <CommandPrimitive.Input\n ref={inputRef}\n // The palette is the field: it opens to type into, the one place autofocus is the design.\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n {...props}\n onValueChange={setQuery}\n className={classNames('kui-reset', 'kui-CommandInput', className)}\n />\n </div>\n );\n}\n\ninterface CommandListProps<T> {\n /** Turns an item into a row (a `CommandItem`) or a group (a `CommandGroup`). */\n children: (item: T) => React.ReactNode;\n className?: string;\n}\n\n/** The results, a pane of their own under the search bar. Its height follows the results. */\nfunction CommandList<T>({ children, className }: CommandListProps<T>) {\n const size = React.useContext(CommandSizeContext);\n const items = React.useContext(CommandItemsContext);\n const { query, filter, itemToString } = React.useContext(CommandListContext);\n const seat = React.useContext(CommandSeatContext);\n const shown = React.useMemo(() => narrow(items, query, filter, itemToString), [items, query, filter, itemToString]);\n return (\n <div className={classNames('kui-BaseMenuContent', 'kui-variant-soft', `kui-r-size-${ROW_STEP[size]}`, 'kui-CommandPanel', className)}>\n <CommandPrimitive.List className={classNames('kui-BaseMenuViewport', 'kui-CommandList')}>\n {shown.map((item) => children(item as T))}\n {/* The empty state's seat, inside this pane, so it is the same box as the results. */}\n <div className=\"kui-CommandSeat\" ref={seat ? seat.setSeat : undefined} />\n </CommandPrimitive.List>\n </div>\n );\n}\n\nconst CommandGroupItemsContext = React.createContext<readonly unknown[]>([]);\n\ninterface CommandGroupProps {\n /** The group's own items, after filtering. Render them with `CommandCollection`. */\n items: readonly unknown[];\n children: React.ReactNode;\n className?: string;\n}\n\n/** A labelled run of rows. A group with no matching rows is left out. */\nfunction CommandGroup({ items, children, className }: CommandGroupProps) {\n return (\n <CommandGroupItemsContext.Provider value={items}>\n <CommandPrimitive.Group className={classNames('kui-BaseMenuGroup', 'kui-CommandGroup', className)}>{children}</CommandPrimitive.Group>\n </CommandGroupItemsContext.Provider>\n );\n}\n\ninterface CommandGroupLabelProps {\n children: React.ReactNode;\n className?: string;\n}\n\n/** The group's name, above its rows. */\nfunction CommandGroupLabel({ children, className }: CommandGroupLabelProps) {\n const id = React.useId();\n const ref = React.useRef<HTMLDivElement>(null);\n // cmdk renders the group's `role=\"group\"` element itself and gives no way to name it from a\n // child, so the label names it here, as Combobox.Label does. The label stays out of the\n // reading order: a screen reader hears it as the group's name, not as a row.\n React.useLayoutEffect(() => {\n const group = ref.current?.closest('[cmdk-group-items]');\n if (!group || group.hasAttribute('aria-labelledby')) return;\n group.setAttribute('aria-labelledby', id);\n return () => {\n if (group.getAttribute('aria-labelledby') === id) group.removeAttribute('aria-labelledby');\n };\n }, [id]);\n return (\n <div ref={ref} id={id} className={classNames('kui-BaseMenuLabel', 'kui-CommandGroupLabel', className)} aria-hidden>\n {children}\n </div>\n );\n}\n\ninterface CommandCollectionProps<T> {\n /** Turns one of the group's items into a row. */\n children: (item: T) => React.ReactNode;\n}\n\n/** The group's rows. */\nfunction CommandCollection<T>({ children }: CommandCollectionProps<T>) {\n const items = React.useContext(CommandGroupItemsContext);\n return <>{items.map((item) => children(item as T))}</>;\n}\n\ninterface CommandItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'value' | 'onSelect'> {\n /** The item this row shows. A string is also the row's identity for the highlight. */\n value?: unknown;\n /** Runs when the row is pressed or Enter is pressed on it. The palette then closes. */\n onSelect?: () => void;\n /** An icon before the label. */\n leading?: React.ReactNode;\n /** Something after the label, such as a shortcut. */\n trailing?: React.ReactNode;\n /** Set when running the row destroys something. */\n tone?: 'destructive';\n /** Renders the child, such as your router's link, as the row. Enter follows the link. */\n asChild?: boolean;\n}\n\n/** One row. Running it, by press or by Enter, runs `onSelect` and closes the palette. */\nfunction CommandItem({ value, onSelect, leading, trailing, tone, asChild, children, className, ...props }: CommandItemProps) {\n const close = React.useContext(CommandCloseContext);\n const id = React.useId();\n const element = React.useRef<HTMLDivElement>(null);\n const clicked = React.useRef(false);\n const itemValue = typeof value === 'string' ? value : id;\n\n const run = () => {\n onSelect?.();\n close?.();\n };\n\n // cmdk runs a row from Enter without a click. A link has to be clicked to navigate, so Enter\n // clicks it, and the click comes back through here as the run.\n const handleSelect = () => {\n if (clicked.current) {\n clicked.current = false;\n run();\n return;\n }\n // Found by attribute, not by ref: an app's link component need not forward a ref.\n const node = element.current ?? document.querySelector(`[data-kui-command-item=\"${CSS.escape(id)}\"]`);\n if (asChild && node instanceof HTMLAnchorElement) {\n node.click();\n return;\n }\n run();\n };\n\n const child = asChild && React.isValidElement<{ children?: React.ReactNode }>(children) ? children : null;\n const inner = (label: React.ReactNode) => (\n <>\n {leading ? (\n <span className=\"kui-CommandItemSlot\" data-slot=\"leading\" aria-hidden>\n {leading}\n </span>\n ) : null}\n <span className=\"kui-CommandItemLabel\">{label}</span>\n {trailing ? (\n <span className=\"kui-CommandItemSlot\" data-slot=\"trailing\">\n {trailing}\n </span>\n ) : null}\n </>\n );\n\n return (\n <CommandPrimitive.Item\n {...props}\n ref={element}\n data-kui-command-item={id}\n value={itemValue}\n asChild={Boolean(child)}\n onSelect={handleSelect}\n onClickCapture={() => {\n clicked.current = true;\n }}\n data-tone={tone}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-CommandItem', className)}\n >\n {child ? React.cloneElement(child, undefined, inner(child.props.children)) : inner(children)}\n </CommandPrimitive.Item>\n );\n}\n\ninterface CommandEmptyProps {\n children: React.ReactNode;\n className?: string;\n}\n\n/** What the results pane says when nothing matches. It renders inside that pane. */\nfunction CommandEmpty({ children, className }: CommandEmptyProps) {\n const seat = React.useContext(CommandSeatContext);\n if (!seat?.seat) return null;\n return createPortal(<CommandPrimitive.Empty className={classNames('kui-CommandEmpty', className)}>{children}</CommandPrimitive.Empty>, seat.seat);\n}\n\nexport { Command, CommandTrigger, CommandContent, CommandInput, CommandList, CommandGroup, CommandGroupLabel, CommandCollection, CommandItem, CommandEmpty, ROW_STEP as COMMAND_ROW_STEP };\nexport type {\n CommandProps,\n CommandTriggerProps,\n CommandContentProps,\n CommandInputProps,\n CommandListProps,\n CommandGroupProps,\n CommandGroupLabelProps,\n CommandCollectionProps,\n CommandItemProps,\n CommandEmptyProps,\n CommandOpenChangeDetails,\n CommandOpenChangeReason,\n};\n"],
|
|
5
|
+
"mappings": ";+HAkBA,UAAYA,MAAW,QACvB,OAAS,gBAAAC,MAAoB,YAC7B,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,OAC5C,OAAS,UAAUC,MAAuB,WAS1C,IAAMC,EAA+B,CAAE,EAAK,IAAK,EAAK,IAAK,EAAK,IAAK,EAAK,GAAI,EAOxEC,EAAW,CAAE,OAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAAG,QAAS,GAAI,EAExDC,EAA2B,gBAAoB,GAAG,EAClDC,EAA4B,gBAAuC,IAAM,CAAC,CAAC,EAC3EC,EAA4B,gBAAkC,CAAC,CAAC,EAChEC,EAA4B,gBAAmC,IAAI,EACnEC,EAA2B,gBAAiG,CAChI,MAAO,GACP,OAAQ,KACR,aAAc,MAChB,CAAC,EACKC,EAA2B,gBAAgG,IAAI,EAGrI,SAASC,EAAoBC,EAAuB,CAClD,GAAI,OAAOA,GAAS,UAAY,OAAOA,GAAS,SAAU,OAAO,OAAOA,CAAI,EAC5E,GAAIA,GAAQ,OAAOA,GAAS,SAAU,CACpC,IAAMC,EAASD,EACf,QAAWE,IAAO,CAAC,QAAS,QAAS,QAAS,MAAM,EAClD,GAAI,OAAOD,EAAOC,CAAG,GAAM,SAAU,OAAOD,EAAOC,C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,kBAAmBX,CAAS,GAElFuC,EAAc,eAAaA,EAAO,OAAWC,EAAMD,EAAM,MAAM,QAAQ,CAAC,EAAIC,EAAM1D,CAAQ,CAC7F,CAEJ,CAQA,SAAS2D,GAAa,CAAE,SAAA3D,EAAU,UAAAkB,CAAU,EAAsB,CAChE,IAAMG,EAAa,aAAWzC,CAAkB,EAChD,OAAKyC,GAAM,KACJuC,EAAa,gBAAC7B,EAAiB,MAAjB,CAAuB,UAAWF,EAAW,mBAAoBX,CAAS,GAAIlB,CAAS,EAA2BqB,EAAK,IAAI,EADxH,IAE1B",
|
|
6
|
+
"names": ["React", "createPortal", "classNames", "CommandPrimitive", "DialogPrimitive", "ROW_STEP", "SIZE_DEF", "CommandSizeContext", "CommandQueryContext", "CommandItemsContext", "CommandCloseContext", "CommandListContext", "CommandSeatContext", "defaultItemToString", "item", "record", "key", "defaultFilter", "query", "itemToString", "isGroup", "narrow", "items", "filter", "out", "kept", "member", "Command", "sizeProp", "open", "defaultOpen", "onOpenChange", "children", "size", "useThemeSize", "internalOpen", "setInternalOpen", "controlled", "isOpen", "change", "next", "reason", "close", "DialogPrimitive", "CommandTrigger", "props", "CommandContent", "label", "onQueryChange", "container", "className", "style", "setQuery", "seat", "setSeat", "report", "useBodyPointerEventsCleanup", "changeQuery", "listValue", "seatValue", "PortalTheme", "classNames", "releaseBodyPointerEvents", "CommandPrimitive", "CommandInput", "leading", "inputRef", "event", "CommandList", "shown", "CommandGroupItemsContext", "CommandGroup", "CommandGroupLabel", "id", "ref", "group", "CommandCollection", "CommandItem", "value", "onSelect", "trailing", "tone", "asChild", "element", "clicked", "itemValue", "run", "handleSelect", "node", "child", "inner", "CommandEmpty", "createPortal"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as p}from"./chunk-FATCGZZE.js";import{a as g}from"./chunk-OBSZOD5M.js";import{a as m,b as c}from"./chunk-3RJVW6RK.js";import{a as l}from"./chunk-TGRHRMQI.js";import{a as D}from"./chunk-FICBVI4M.js";import{a as s}from"./chunk-HGF4CKRY.js";import{c as n}from"./chunk-5ON3XLRD.js";import{c as a}from"./chunk-OKQAVYW4.js";import{a as O}from"./chunk-VQPANPMI.js";var H={};O(H,{Action:()=>v,Cancel:()=>T,Content:()=>d,Description:()=>R,Root:()=>f,Title:()=>y,Trigger:()=>C});import*as e from"react";import B from"classnames";import{AlertDialog as r}from"radix-ui";var P={...p};var f=t=>e.createElement(r.Root,{...t});f.displayName="AlertDialog.Root";var C=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Trigger,{...o,ref:i,asChild:!0},l(t)));C.displayName="AlertDialog.Trigger";var{align:z,...A}=P,S={align:z},d=e.forwardRef(({align:t,...o},i)=>{let u=n(o,A.size),{className:h}=a({align:t},S),{className:E,forceMount:N,container:x,onCloseAutoFocus:w,...W}=a(u,A);return c(),e.createElement(r.Portal,{container:x,forceMount:N},e.createElement(s,{asChild:!0},e.createElement(r.Overlay,{className:"kui-BaseDialogOverlay kui-AlertDialogOverlay"},e.createElement("div",{className:"kui-BaseDialogScroll kui-AlertDialogScroll"},e.createElement("div",{className:`kui-BaseDialogScrollPadding kui-AlertDialogScrollPadding ${h}`},e.createElement(r.Content,{...W,ref:i,className:B("kui-BaseDialogContent","kui-AlertDialogContent",E),"aria-modal":"true",onCloseAutoFocus:k=>{w?.(k),m()}}))))))});d.displayName="AlertDialog.Content";var y=e.forwardRef((t,o)=>e.createElement(r.Title,{asChild:!0},e.createElement(g,{size:"5",trim:"start",...t,asChild:!1,ref:o})));y.displayName="AlertDialog.Title";var R=e.forwardRef((t,o)=>e.createElement(r.Description,{asChild:!0},e.createElement(D,{as:"p",size:"3",...t,asChild:!1,ref:o})));R.displayName="AlertDialog.Description";var v=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Action,{...o,ref:i,asChild:!0},l(t)));v.displayName="AlertDialog.Action";var T=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Cancel,{...o,ref:i,asChild:!0},l(t)));T.displayName="AlertDialog.Cancel";export{f as a,C as b,d as c,y as d,R as e,v as f,T as g,H as h};
|
|
3
|
+
//# sourceMappingURL=chunk-UH6CJXHY.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/alert-dialog.tsx", "../../src/components/alert-dialog.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\n\nimport { alertDialogContentPropDefs } from './alert-dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { releaseBodyPointerEvents, useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { AlertDialogContentOwnProps } from './alert-dialog.props.js';\nimport type { ComponentPropsWithout, RemovedProps, ComponentPropsAs } from '../helpers/component-props.js';\n\ninterface AlertDialogRootProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root> {}\nconst AlertDialogRoot: React.FC<AlertDialogRootProps> = (props) => <AlertDialogPrimitive.Root {...props} />;\nAlertDialogRoot.displayName = 'AlertDialog.Root';\n\ntype AlertDialogTriggerElement = React.ElementRef<typeof AlertDialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps extends ComponentPropsWithout<typeof AlertDialogPrimitive.Trigger, RemovedProps> {}\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Trigger>\n));\nAlertDialogTrigger.displayName = 'AlertDialog.Trigger';\n\n// Split once at module scope. `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them on every render.\nconst { align: alignPropDef, ...contentPropDefs } = alertDialogContentPropDefs;\nconst alignPropDefs = { align: alignPropDef };\n\ntype AlertDialogContentElement = React.ElementRef<typeof AlertDialogPrimitive.Content>;\ninterface AlertDialogContentProps extends ComponentPropsWithout<typeof AlertDialogPrimitive.Content, RemovedProps>, AlertDialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Portal>['container'];\n}\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(({ align, ...ownProps }, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, contentPropDefs.size);\n const { className: alignClassName } = extractProps({ align }, alignPropDefs);\n\n const { className, forceMount, container, onCloseAutoFocus, ...contentProps } = extractProps(props, contentPropDefs);\n\n // Same stuck pointer-events fallback as Dialog and Sheet.\n useBodyPointerEventsCleanup();\n\n return (\n <AlertDialogPrimitive.Portal container={container} forceMount={forceMount}>\n <PortalTheme asChild>\n <AlertDialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-AlertDialogOverlay\">\n <div className=\"kui-BaseDialogScroll kui-AlertDialogScroll\">\n <div className={`kui-BaseDialogScrollPadding kui-AlertDialogScrollPadding ${alignClassName}`}>\n <AlertDialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-BaseDialogContent', 'kui-AlertDialogContent', className)}\n aria-modal=\"true\"\n onCloseAutoFocus={(event) => {\n // Radix returns focus to the trigger unless the caller prevents it.\n onCloseAutoFocus?.(event);\n // Restore pointer-events to body (Radix UI fix for issue #1241)\n releaseBodyPointerEvents();\n }}\n />\n </div>\n </div>\n </AlertDialogPrimitive.Overlay>\n </PortalTheme>\n </AlertDialogPrimitive.Portal>\n );\n});\nAlertDialogContent.displayName = 'AlertDialog.Content';\n\ntype AlertDialogTitleElement = React.ElementRef<typeof Heading>;\ntype AlertDialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>((props, forwardedRef) => (\n <AlertDialogPrimitive.Title asChild>\n <Heading size=\"5\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialog.Title';\n\ntype AlertDialogDescriptionElement = HTMLParagraphElement;\ntype AlertDialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst AlertDialogDescription = React.forwardRef<AlertDialogDescriptionElement, AlertDialogDescriptionProps>((props, forwardedRef) => (\n <AlertDialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialog.Description';\n\ntype AlertDialogActionElement = React.ElementRef<typeof AlertDialogPrimitive.Action>;\ninterface AlertDialogActionProps extends ComponentPropsWithout<typeof AlertDialogPrimitive.Action, RemovedProps> {}\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Action {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Action>\n));\nAlertDialogAction.displayName = 'AlertDialog.Action';\n\ntype AlertDialogCancelElement = React.ElementRef<typeof AlertDialogPrimitive.Cancel>;\ninterface AlertDialogCancelProps extends ComponentPropsWithout<typeof AlertDialogPrimitive.Cancel, RemovedProps> {}\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Cancel {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Cancel>\n));\nAlertDialogCancel.displayName = 'AlertDialog.Cancel';\n\nexport {\n AlertDialogRoot as Root,\n AlertDialogTrigger as Trigger,\n AlertDialogContent as Content,\n AlertDialogTitle as Title,\n AlertDialogDescription as Description,\n AlertDialogAction as Action,\n AlertDialogCancel as Cancel,\n};\n\nexport type {\n AlertDialogRootProps as RootProps,\n AlertDialogTriggerProps as TriggerProps,\n AlertDialogContentProps as ContentProps,\n AlertDialogTitleProps as TitleProps,\n AlertDialogDescriptionProps as DescriptionProps,\n AlertDialogActionProps as ActionProps,\n AlertDialogCancelProps as CancelProps,\n};\n", "import { dialogContentPropDefs } from './dialog.props.js';\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst alertDialogContentPropDefs = {\n ...dialogContentPropDefs,\n} satisfies {\n align: PropDef<'start' | 'center'>;\n size: PropDef<'1' | '2' | '3' | '4'>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype AlertDialogContentOwnProps = GetPropDefTypes<typeof alertDialogContentPropDefs>;\n\nexport { alertDialogContentPropDefs };\nexport type { AlertDialogContentOwnProps };\n"],
|
|
5
|
+
"mappings": ";+WAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,WAAAC,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,eAAeC,MAA4B,WCCpD,IAAMC,EAA6B,CACjC,GAAGC,CACL,EDYA,IAAMC,EAAmDC,GAAU,gBAACC,EAAqB,KAArB,CAA2B,GAAGD,EAAO,EACzGD,EAAgB,YAAc,mBAI9B,IAAMG,EAA2B,aAA+D,CAAC,CAAE,SAAAC,EAAU,GAAGH,CAAM,EAAGI,IACvH,gBAACH,EAAqB,QAArB,CAA8B,GAAGD,EAAO,IAAKI,EAAc,QAAO,IAChEC,EAAoBF,CAAQ,CAC/B,CACD,EACDD,EAAmB,YAAc,sBAKjC,GAAM,CAAE,MAAOI,EAAc,GAAGC,CAAgB,EAAIC,EAC9CC,EAAgB,CAAE,MAAOH,CAAa,EAMtCI,EA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H,CAAM,EAAGI,IACpH,gBAACH,EAAqB,OAArB,CAA6B,GAAGD,EAAO,IAAKI,EAAc,QAAO,IAC/DC,EAAoBF,CAAQ,CAC/B,CACD,EACD2B,EAAkB,YAAc,qBAIhC,IAAMC,EAA0B,aAA6D,CAAC,CAAE,SAAA5B,EAAU,GAAGH,CAAM,EAAGI,IACpH,gBAACH,EAAqB,OAArB,CAA6B,GAAGD,EAAO,IAAKI,EAAc,QAAO,IAC/DC,EAAoBF,CAAQ,CAC/B,CACD,EACD4B,EAAkB,YAAc",
|
|
6
|
+
"names": ["alert_dialog_exports", "__export", "AlertDialogAction", "AlertDialogCancel", "AlertDialogContent", "AlertDialogDescription", "AlertDialogRoot", "AlertDialogTitle", "AlertDialogTrigger", "React", "classNames", "AlertDialogPrimitive", "alertDialogContentPropDefs", "dialogContentPropDefs", "AlertDialogRoot", "props", "AlertDialogPrimitive", "AlertDialogTrigger", "children", "forwardedRef", "requireReactElement", "alignPropDef", "contentPropDefs", "alertDialogContentPropDefs", "alignPropDefs", "AlertDialogContent", "align", "ownProps", "useThemeSizeProps", "alignClassName", "extractProps", "className", "forceMount", "container", "onCloseAutoFocus", "contentProps", "useBodyPointerEventsCleanup", "PortalTheme", "classNames", "event", "releaseBodyPointerEvents", "AlertDialogTitle", "Heading", "AlertDialogDescription", "Text", "AlertDialogAction", "AlertDialogCancel"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as m}from"./chunk-FATCGZZE.js";import{a as D}from"./chunk-OBSZOD5M.js";import{a as c,b as C}from"./chunk-3RJVW6RK.js";import{a as l}from"./chunk-TGRHRMQI.js";import{a as P}from"./chunk-FICBVI4M.js";import{a as g}from"./chunk-HGF4CKRY.js";import{c as n}from"./chunk-5ON3XLRD.js";import{a as p}from"./chunk-4KBKS3ZE.js";import{c as r}from"./chunk-OKQAVYW4.js";import{a as W}from"./chunk-VQPANPMI.js";var A={};W(A,{Close:()=>u,Content:()=>R,Description:()=>T,Root:()=>d,Title:()=>y,Trigger:()=>v});import*as o from"react";import B from"classnames";import{Dialog as i}from"radix-ui";var d=e=>o.createElement(i.Root,{...e,modal:!0});d.displayName="Dialog.Root";var v=o.forwardRef(({children:e,...t},a)=>o.createElement(i.Trigger,{...t,ref:a,asChild:!0},l(e)));v.displayName="Dialog.Trigger";var{align:O,...f}=m,S={align:O},z={Title:({children:e})=>o.createElement(i.Title,{asChild:!0},e),Close:({children:e})=>o.createElement(i.Close,{asChild:!0},e)},R=o.forwardRef(({align:e,...t},a)=>{let h=n(t,f.size),{className:N}=r({align:e},S),{className:E,forceMount:x,container:H,onCloseAutoFocus:k,...s}=r(h,f);return C(),o.createElement(i.Portal,{container:H,forceMount:x},o.createElement(g,{asChild:!0},o.createElement(i.Overlay,{className:"kui-BaseDialogOverlay kui-DialogOverlay"},o.createElement("div",{className:"kui-BaseDialogScroll kui-DialogScroll"},o.createElement("div",{className:`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${N}`},o.createElement(i.Content,{...s,ref:a,className:B("kui-BaseDialogContent","kui-DialogContent",E),children:o.createElement(p.Provider,{value:z},s.children),"aria-modal":"true",onCloseAutoFocus:w=>{k?.(w),c()}}))))))});R.displayName="Dialog.Content";var y=o.forwardRef((e,t)=>o.createElement(i.Title,{asChild:!0},o.createElement(D,{size:"5",trim:"start",...e,asChild:!1,ref:t})));y.displayName="Dialog.Title";var T=o.forwardRef((e,t)=>o.createElement(i.Description,{asChild:!0},o.createElement(P,{as:"p",size:"3",...e,asChild:!1,ref:t})));T.displayName="Dialog.Description";var u=o.forwardRef(({children:e,...t},a)=>o.createElement(i.Close,{...t,ref:a,asChild:!0},l(e)));u.displayName="Dialog.Close";export{d as a,v as b,R as c,y as d,T as e,u as f,A as g};
|
|
3
|
+
//# sourceMappingURL=chunk-XVN43IZL.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/dialog.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { NavigatorHostContext, type NavigatorHost } from './_internal/navigator-host.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { releaseBodyPointerEvents, useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport type { ComponentPropsWithout, RemovedProps, ComponentPropsAs } from '../helpers/component-props.js';\n\ninterface DialogRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst DialogRoot: React.FC<DialogRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nDialogRoot.displayName = 'Dialog.Root';\n\ntype DialogTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\ninterface DialogTriggerProps extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n));\nDialogTrigger.displayName = 'Dialog.Trigger';\n\n// Split once at module scope. `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them on every render.\nconst { align: alignPropDef, ...contentPropDefs } = dialogContentPropDefs;\nconst alignPropDefs = { align: alignPropDef };\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface DialogContentProps extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>, DialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\n/** What a Navigator screen in this panel uses: its title names the panel, its close closes it. */\nconst dialogNavigatorHost: NavigatorHost = {\n Title: ({ children }) => <DialogPrimitive.Title asChild>{children}</DialogPrimitive.Title>,\n Close: ({ children }) => <DialogPrimitive.Close asChild>{children}</DialogPrimitive.Close>,\n};\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(({ align, ...ownProps }, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, contentPropDefs.size);\n const { className: alignClassName } = extractProps({ align }, alignPropDefs);\n\n const { className, forceMount, container, onCloseAutoFocus, ...contentProps } = extractProps(props, contentPropDefs);\n\n // Cleanup stuck pointer-events on body\n useBodyPointerEventsCleanup();\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <PortalTheme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-DialogOverlay\">\n <div className=\"kui-BaseDialogScroll kui-DialogScroll\">\n <div className={`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${alignClassName}`}>\n <DialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-BaseDialogContent', 'kui-DialogContent', className)}\n children={<NavigatorHostContext.Provider value={dialogNavigatorHost}>{contentProps.children}</NavigatorHostContext.Provider>}\n aria-modal=\"true\"\n onCloseAutoFocus={(event) => {\n // Radix returns focus to the trigger unless the caller prevents it.\n onCloseAutoFocus?.(event);\n // Restore pointer-events to body (Radix UI fix for issue #1241)\n releaseBodyPointerEvents();\n }}\n />\n </div>\n </div>\n </DialogPrimitive.Overlay>\n </PortalTheme>\n </DialogPrimitive.Portal>\n );\n});\nDialogContent.displayName = 'Dialog.Content';\n\ntype DialogTitleElement = React.ElementRef<typeof Heading>;\ntype DialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>((props, forwardedRef) => (\n <DialogPrimitive.Title asChild>\n <Heading size=\"5\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Title>\n));\nDialogTitle.displayName = 'Dialog.Title';\n\ntype DialogDescriptionElement = HTMLParagraphElement;\ntype DialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>((props, forwardedRef) => (\n <DialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </DialogPrimitive.Description>\n));\nDialogDescription.displayName = 'Dialog.Description';\n\ntype DialogCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface DialogCloseProps extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(({ children, ...props }, forwardedRef) => (\n <DialogPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n));\nDialogClose.displayName = 'Dialog.Close';\n\nexport { DialogRoot as Root, DialogTrigger as Trigger, DialogContent as Content, DialogTitle as Title, DialogDescription as Description, DialogClose as Close };\n\nexport type {\n DialogRootProps as RootProps,\n DialogTriggerProps as TriggerProps,\n DialogContentProps as ContentProps,\n DialogTitleProps as TitleProps,\n DialogDescriptionProps as DescriptionProps,\n DialogCloseProps as CloseProps,\n};\n"],
|
|
5
|
+
"mappings": ";uZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WAgB1C,IAAMC,EAAyCC,GAAU,gBAACC,EAAgB,KAAhB,CAAsB,GAAGD,EAAO,MAAK,GAAC,EAChGD,EAAW,YAAc,cAIzB,IAAMG,EAAsB,aAAqD,CAAC,CAAE,SAAAC,EAAU,GAAGH,CAAM,EAAG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CAAC,EACDhB,EAAc,YAAc,iBAI5B,IAAMiB,EAAoB,aAAiD,CAAC5B,EAAOI,IACjF,gBAACH,EAAgB,MAAhB,CAAsB,QAAO,IAC5B,gBAAC4B,EAAA,CAAQ,KAAK,IAAI,KAAK,QAAS,GAAG7B,EAAO,QAAS,GAAO,IAAKI,EAAc,CAC/E,CACD,EACDwB,EAAY,YAAc,eAI1B,IAAME,EAA0B,aAA6D,CAAC9B,EAAOI,IACnG,gBAACH,EAAgB,YAAhB,CAA4B,QAAO,IAClC,gBAAC8B,EAAA,CAAK,GAAG,IAAI,KAAK,IAAK,GAAG/B,EAAO,QAAS,GAAO,IAAKI,EAAc,CACtE,CACD,EACD0B,EAAkB,YAAc,qBAIhC,IAAME,EAAoB,aAAiD,CAAC,CAAE,SAAA7B,EAAU,GAAGH,CAAM,EAAGI,IAClG,gBAACH,EAAgB,MAAhB,CAAuB,GAAGD,EAAO,IAAKI,EAAc,QAAO,IACzDC,EAAoBF,CAAQ,CAC/B,CACD,EACD6B,EAAY,YAAc",
|
|
6
|
+
"names": ["dialog_exports", "__export", "DialogClose", "DialogContent", "DialogDescription", "DialogRoot", "DialogTitle", "DialogTrigger", "React", "classNames", "DialogPrimitive", "DialogRoot", "props", "DialogPrimitive", "DialogTrigger", "children", "forwardedRef", "requireReactElement", "alignPropDef", "contentPropDefs", "dialogContentPropDefs", "alignPropDefs", "dialogNavigatorHost", "DialogContent", "align", "ownProps", "useThemeSizeProps", "alignClassName", "extractProps", "className", "forceMount", "container", "onCloseAutoFocus", "contentProps", "useBodyPointerEventsCleanup", "PortalTheme", "classNames", "NavigatorHostContext", "event", "releaseBodyPointerEvents", "DialogTitle", "Heading", "DialogDescription", "Text", "DialogClose"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a,b,c,d,e,f,g}from"../chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g}from"../chunk-UH6CJXHY.js";import"../chunk-FATCGZZE.js";import"../chunk-OBSZOD5M.js";import"../chunk-3RJVW6RK.js";import"../chunk-TGRHRMQI.js";import"../chunk-FICBVI4M.js";import"../chunk-BQC2P3SN.js";import"../chunk-UJ7JERJ5.js";import"../chunk-HGF4CKRY.js";import"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-VWRPVM5K.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-XU74PNM2.js";import"../chunk-OKQAVYW4.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-VQPANPMI.js";export{f as Action,g as Cancel,c as Content,e as Description,a as Root,d as Title,b as Trigger};
|
|
3
3
|
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/components/command.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrD,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAElC,uGAAuG;AACvG,QAAA,MAAM,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAA8C,CAAC;AAEhF,KAAK,uBAAuB,GAAG,YAAY,GAAG,SAAS,CAAC;AACxD,KAAK,wBAAwB,GAAG;IAAE,MAAM,EAAE,uBAAuB,CAAA;CAAE,CAAC;AAEpE,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,KAAK,OAAO,CAAC;AA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|
|
2
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-
|
|
2
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-SR42NATX.js";import"../chunk-3RJVW6RK.js";import"../chunk-HGF4CKRY.js";import"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-VWRPVM5K.js";import"../chunk-XU74PNM2.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-VQPANPMI.js";export{a as COMMAND_ROW_STEP,b as Command,i as CommandCollection,d as CommandContent,k as CommandEmpty,g as CommandGroup,h as CommandGroupLabel,e as CommandInput,j as CommandItem,f as CommandList,c as CommandTrigger};
|
|
3
3
|
//# sourceMappingURL=command.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
2
|
+
import{a,b,c,d,e,f}from"../chunk-XVN43IZL.js";import"../chunk-FATCGZZE.js";import"../chunk-OBSZOD5M.js";import"../chunk-3RJVW6RK.js";import"../chunk-TGRHRMQI.js";import"../chunk-FICBVI4M.js";import"../chunk-BQC2P3SN.js";import"../chunk-UJ7JERJ5.js";import"../chunk-HGF4CKRY.js";import"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-4KBKS3ZE.js";import"../chunk-VWRPVM5K.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-XU74PNM2.js";import"../chunk-OKQAVYW4.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-VQPANPMI.js";export{f as Close,c as Content,e as Description,a as Root,d as Title,b as Trigger};
|
|
3
3
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"../chunk-SHKPQ3RI.js";import{a as ma}from"../chunk-FYZXC7AL.js";import{a as Ea}from"../chunk-FTNZWAPB.js";import{a as ga}from"../chunk-VYF6KKYM.js";import{a as ha}from"../chunk-VBF3XALY.js";import{h as ia}from"../chunk-MPLBIPJ6.js";import{e as ja}from"../chunk-QBONJMSE.js";import{a as ka}from"../chunk-D42VCLKH.js";import{d as la}from"../chunk-YLGIP3A5.js";import{h as ea}from"../chunk-OGVKMDO7.js";import{g as Ha}from"../chunk-
|
|
2
|
+
import"../chunk-SHKPQ3RI.js";import{a as ma}from"../chunk-FYZXC7AL.js";import{a as Ea}from"../chunk-FTNZWAPB.js";import{a as ga}from"../chunk-VYF6KKYM.js";import{a as ha}from"../chunk-VBF3XALY.js";import{h as ia}from"../chunk-MPLBIPJ6.js";import{e as ja}from"../chunk-QBONJMSE.js";import{a as ka}from"../chunk-D42VCLKH.js";import{d as la}from"../chunk-YLGIP3A5.js";import{h as ea}from"../chunk-OGVKMDO7.js";import{g as Ha}from"../chunk-QV66TN2A.js";import{h as Ga}from"../chunk-BJVXB3PN.js";import"../chunk-TS4QCDSI.js";import"../chunk-B447PNRD.js";import{l as Fa}from"../chunk-X4PWBFOT.js";import{a as fa}from"../chunk-COLJWVN7.js";import{a as ca}from"../chunk-L66IUPDW.js";import{c as da}from"../chunk-S6SEWECR.js";import{a as xa,b as ya,c as za,d as Aa,e as Ba,f as Ca,g as Da}from"../chunk-LR4X7SVV.js";import{a as na,c as oa,d as pa,e as qa,f as ra,g as sa,h as ta,i as ua,j as va}from"../chunk-C6VGCYFQ.js";import{a as wa}from"../chunk-65URNXF2.js";import{a as _}from"../chunk-AXODGYRY.js";import{a as $}from"../chunk-LFAUMDU5.js";import{c as aa}from"../chunk-26O4RBOJ.js";import{a as ba}from"../chunk-OPYTQ34H.js";import{a as X}from"../chunk-AKSAKP35.js";import{a as Y}from"../chunk-3H33S3UA.js";import{i as Ia}from"../chunk-Y5ITMKC6.js";import{e as Z}from"../chunk-4X64QOAR.js";import{a as G}from"../chunk-NYIYRILR.js";import{l as I}from"../chunk-XFMAA4MD.js";import{g as H}from"../chunk-TUZ665BA.js";import{b as J,c as K,d as L,e as M,f as N,g as O,h as P,i as Q,j as R,k as S}from"../chunk-SR42NATX.js";import{n as T}from"../chunk-TRJAVWCK.js";import{g as U}from"../chunk-XVN43IZL.js";import{o as V}from"../chunk-KBSH6CBD.js";import"../chunk-2ACVWLFA.js";import{a as W}from"../chunk-Q5SANVIW.js";import{a as u}from"../chunk-XD3C3GVF.js";import{a as y}from"../chunk-X7DGYRAY.js";import{m as C}from"../chunk-R4DMVTM3.js";import{b as z,c as A}from"../chunk-TANYRHGP.js";import{a as B}from"../chunk-WUCBFB25.js";import{a as x}from"../chunk-YLPCYCYA.js";import"../chunk-Y2DBXOLT.js";import{c as D}from"../chunk-3M5ZM67R.js";import"../chunk-2VSRZ4IT.js";import{a as E}from"../chunk-HVMRB3AH.js";import"../chunk-4KIZRO52.js";import{a as F}from"../chunk-JFJV4HL3.js";import{a as v,b as w}from"../chunk-NJ7RQYLX.js";import"../chunk-2WFN4D52.js";import{a as n}from"../chunk-B6YGNB3V.js";import{f as o}from"../chunk-OMPLFDS6.js";import{h as r}from"../chunk-UH6CJXHY.js";import"../chunk-FATCGZZE.js";import{a as p}from"../chunk-OBSZOD5M.js";import"../chunk-3RJVW6RK.js";import"../chunk-TGRHRMQI.js";import{a as q}from"../chunk-FICBVI4M.js";import"../chunk-BQC2P3SN.js";import{a as s}from"../chunk-5APRBJRR.js";import{a as t}from"../chunk-IFHBMTFX.js";import"../chunk-UJ7JERJ5.js";import"../chunk-HGF4CKRY.js";import{a as k,b as l,c as m}from"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-M26LLCQC.js";import"../chunk-HQT32HQ6.js";import"../chunk-XUCR7L4G.js";import"../chunk-4OJRLS5N.js";import"../chunk-KGCGT4MJ.js";import"../chunk-4TTRPCGG.js";import"../chunk-MXEOE4LA.js";import"../chunk-SGKLJDA3.js";import{a as d}from"../chunk-BUXK5VGR.js";import{a as c}from"../chunk-KVVRFWGQ.js";import"../chunk-YCLPURTD.js";import"../chunk-CR65RYGM.js";import"../chunk-7N2Q5WOM.js";import"../chunk-OAJ5DARR.js";import{b as a,c as b}from"../chunk-5KMEUZWN.js";import{a as e,b as f,c as g,d as h}from"../chunk-GKDGNPBD.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-5JYSYTHA.js";import"../chunk-ISCZ57VL.js";import"../chunk-EB4AG3OL.js";import{a as i}from"../chunk-QPRUTOLI.js";import"../chunk-G66WDIIV.js";import"../chunk-4KBKS3ZE.js";import"../chunk-VWRPVM5K.js";import"../chunk-PMXIQ5B4.js";import{a as j}from"../chunk-DFQIIYLD.js";import"../chunk-KOAWATCI.js";import"../chunk-5KJIPH2N.js";import"../chunk-YOSLXJI5.js";import"../chunk-QEDKL23P.js";import"../chunk-5BXCPANF.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-XU74PNM2.js";import"../chunk-MAA6LEE2.js";import"../chunk-OKQAVYW4.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-VQPANPMI.js";export{n as AccessibleIcon,o as Accordion,r as AlertDialog,s as Avatar,t as Blockquote,u as Box,x as Button,y as Card,C as Chatbar,E as Checkbox,D as CheckboxGroup,g as ChevronDownIcon,F as Chip,G as Code,I as Combobox,J as Command,Q as CommandCollection,L as CommandContent,S as CommandEmpty,O as CommandGroup,P as CommandGroupLabel,M as CommandInput,R as CommandItem,N as CommandList,K as CommandTrigger,A as Confirmation,T as ContextMenu,U as Dialog,V as DropdownMenu,c as Flex,W as Grid,p as Heading,X as Image,i as Kbd,Y as Link,Ia as MessageScroller,Z as Navbar,xa as Navigator,Aa as NavigatorBack,Da as NavigatorLink,ya as NavigatorOutlet,Ca as NavigatorScreen,Ba as NavigatorTitle,z as Notice,wa as Page,H as Popover,_ as Portal,$ as Progress,ba as Radio,aa as RadioGroup,ca as Reset,j as ScrollArea,da as SegmentedControl,ea as Select,fa as Separator,Ha as Sheet,Ga as Shell,Fa as Sidebar,ga as Slider,a as Slot,b as Slottable,d as Spinner,ha as Switch,ia as Table,ja as Tabs,q as Text,ka as TextArea,la as TextField,m as Theme,k as ThemeContext,f as ThickCheckIcon,h as ThickChevronRightIcon,e as ThickDividerHorizontalIcon,ma as Toggle,va as Toolbar,pa as ToolbarButton,sa as ToolbarFill,oa as ToolbarGroup,qa as ToolbarOverflow,ta as ToolbarSeparator,ra as ToolbarSlot,ua as ToolbarTitle,w as Tooltip,v as TooltipProvider,Ea as VirtualMenu,B as VisuallyHidden,za as useNavigator,l as useThemeContext,na as useToolbarOverflow};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -34,7 +34,12 @@ type NavigatorApi<T> = {
|
|
|
34
34
|
canGoBack: boolean;
|
|
35
35
|
};
|
|
36
36
|
interface NavigatorProps<T> {
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The screens above the root, as values. Use it with `onPathChange` to control the path. Each
|
|
39
|
+
* value is a string or a number: a screen is told apart by its value, and every object reads the
|
|
40
|
+
* same, so an object here would hand one screen's state to the next. Keep an id in the path and
|
|
41
|
+
* look the record up in `screen`.
|
|
42
|
+
*/
|
|
38
43
|
path?: readonly T[];
|
|
39
44
|
/** The path to start with when the navigator controls its own path. */
|
|
40
45
|
defaultPath?: readonly T[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigator.d.ts","sourceRoot":"","sources":["../../../src/components/navigator.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,YAAY,CAAC,CAAC,IAAI;IACrB,kEAAkE;IAClE,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;IACnB,4BAA4B;IAC5B,IAAI,EAAE,CAAC,KA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ED,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;AACnH,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a,b,c,d,e,f,g}from"../chunk-
|
|
2
|
+
"use client";import{a,b,c,d,e,f,g}from"../chunk-LR4X7SVV.js";import"../chunk-C6VGCYFQ.js";import"../chunk-65URNXF2.js";import"../chunk-KBSH6CBD.js";import"../chunk-2ACVWLFA.js";import"../chunk-YLPCYCYA.js";import"../chunk-Y2DBXOLT.js";import"../chunk-NJ7RQYLX.js";import"../chunk-OBSZOD5M.js";import"../chunk-TGRHRMQI.js";import"../chunk-FICBVI4M.js";import"../chunk-BQC2P3SN.js";import"../chunk-UJ7JERJ5.js";import"../chunk-HGF4CKRY.js";import"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-SGKLJDA3.js";import"../chunk-BUXK5VGR.js";import"../chunk-KVVRFWGQ.js";import"../chunk-YCLPURTD.js";import"../chunk-CR65RYGM.js";import"../chunk-7N2Q5WOM.js";import"../chunk-OAJ5DARR.js";import"../chunk-5KMEUZWN.js";import"../chunk-GKDGNPBD.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-5JYSYTHA.js";import"../chunk-ISCZ57VL.js";import"../chunk-EB4AG3OL.js";import"../chunk-QPRUTOLI.js";import"../chunk-G66WDIIV.js";import"../chunk-4KBKS3ZE.js";import"../chunk-VWRPVM5K.js";import"../chunk-PMXIQ5B4.js";import"../chunk-DFQIIYLD.js";import"../chunk-KOAWATCI.js";import"../chunk-5KJIPH2N.js";import"../chunk-YOSLXJI5.js";import"../chunk-QEDKL23P.js";import"../chunk-5BXCPANF.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-XU74PNM2.js";import"../chunk-MAA6LEE2.js";import"../chunk-OKQAVYW4.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-VQPANPMI.js";export{a as Navigator,d as NavigatorBack,g as NavigatorLink,b as NavigatorOutlet,f as NavigatorScreen,e as NavigatorTitle,c as useNavigator};
|
|
3
3
|
//# sourceMappingURL=navigator.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a,b,c,d,e,f}from"../chunk-
|
|
2
|
+
"use client";import{a,b,c,d,e,f}from"../chunk-QV66TN2A.js";import"../chunk-FATCGZZE.js";import"../chunk-OBSZOD5M.js";import"../chunk-3RJVW6RK.js";import"../chunk-TGRHRMQI.js";import"../chunk-FICBVI4M.js";import"../chunk-BQC2P3SN.js";import"../chunk-UJ7JERJ5.js";import"../chunk-HGF4CKRY.js";import"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-4KBKS3ZE.js";import"../chunk-VWRPVM5K.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-XU74PNM2.js";import"../chunk-OKQAVYW4.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-VQPANPMI.js";export{f as Close,c as Content,e as Description,a as Root,d as Title,b as Trigger};
|
|
3
3
|
//# sourceMappingURL=sheet.js.map
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"../chunk-VRWZLGR7.js";import{a as c,b as d,c as e,d as f}from"../chunk-3LIF53YY.js";import{a as b}from"../chunk-Y2DBXOLT.js";import{a}from"../chunk-
|
|
2
|
+
import"../chunk-VRWZLGR7.js";import{a as c,b as d,c as e,d as f}from"../chunk-3LIF53YY.js";import{a as b}from"../chunk-Y2DBXOLT.js";import{b as a}from"../chunk-3RJVW6RK.js";import"../chunk-VQPANPMI.js";export{c as APPEARANCE_STORAGE_KEY,d as appearanceScript,e as setAppearance,f as useAppearance,a as useBodyPointerEventsCleanup,b as useTooltipWrapper};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clears a `pointer-events: none` that Radix left on `document.body`, for a dialog that has just
|
|
3
|
+
* closed. Leaves it alone while another modal is still open: that modal needs the page behind it
|
|
4
|
+
* to stay blocked, and it clears the value itself when it closes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function releaseBodyPointerEvents(): void;
|
|
1
7
|
/**
|
|
2
8
|
* Hook to cleanup stuck pointer-events: none on document.body
|
|
3
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-body-pointer-events-cleanup.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-body-pointer-events-cleanup.ts"],"names":[],"mappings":"AAoHA;;;;;;GAMG;AACH,wBAAgB,2BAA2B,SAiB1C"}
|
|
1
|
+
{"version":3,"file":"use-body-pointer-events-cleanup.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-body-pointer-events-cleanup.ts"],"names":[],"mappings":"AAoHA;;;;GAIG;AACH,wBAAgB,wBAAwB,SAKvC;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,SAiB1C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a}from"../chunk-
|
|
2
|
+
import{a,b}from"../chunk-3RJVW6RK.js";import"../chunk-VQPANPMI.js";export{a as releaseBodyPointerEvents,b as useBodyPointerEventsCleanup};
|
|
3
3
|
//# sourceMappingURL=use-body-pointer-events-cleanup.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"./chunk-VRWZLGR7.js";import{a as Mo,b as No,c as Oo,d as Po}from"./chunk-3LIF53YY.js";import"./chunk-SHKPQ3RI.js";import{a as jo}from"./chunk-FYZXC7AL.js";import{a as Ho}from"./chunk-FTNZWAPB.js";import{a as ao}from"./chunk-VYF6KKYM.js";import{a as bo}from"./chunk-VBF3XALY.js";import{h as co}from"./chunk-MPLBIPJ6.js";import{e as go}from"./chunk-QBONJMSE.js";import{a as ho}from"./chunk-D42VCLKH.js";import{d as io}from"./chunk-YLGIP3A5.js";import{h as to}from"./chunk-OGVKMDO7.js";import{g as Ko}from"./chunk-
|
|
2
|
+
import"./chunk-VRWZLGR7.js";import{a as Mo,b as No,c as Oo,d as Po}from"./chunk-3LIF53YY.js";import"./chunk-SHKPQ3RI.js";import{a as jo}from"./chunk-FYZXC7AL.js";import{a as Ho}from"./chunk-FTNZWAPB.js";import{a as ao}from"./chunk-VYF6KKYM.js";import{a as bo}from"./chunk-VBF3XALY.js";import{h as co}from"./chunk-MPLBIPJ6.js";import{e as go}from"./chunk-QBONJMSE.js";import{a as ho}from"./chunk-D42VCLKH.js";import{d as io}from"./chunk-YLGIP3A5.js";import{h as to}from"./chunk-OGVKMDO7.js";import{g as Ko}from"./chunk-QV66TN2A.js";import{h as Jo}from"./chunk-BJVXB3PN.js";import"./chunk-TS4QCDSI.js";import"./chunk-B447PNRD.js";import{l as Io}from"./chunk-X4PWBFOT.js";import{a as xo}from"./chunk-COLJWVN7.js";import{a as mo}from"./chunk-L66IUPDW.js";import{c as po}from"./chunk-S6SEWECR.js";import{a as Ao,b as Bo,c as Co,d as Do,e as Eo,f as Fo,g as Go}from"./chunk-LR4X7SVV.js";import{a as ko,c as lo,d as no,e as qo,f as so,g as uo,h as vo,i as wo,j as yo}from"./chunk-C6VGCYFQ.js";import{a as zo}from"./chunk-65URNXF2.js";import{a as oo}from"./chunk-AXODGYRY.js";import{a as ro}from"./chunk-LFAUMDU5.js";import{c as eo}from"./chunk-26O4RBOJ.js";import{a as fo}from"./chunk-OPYTQ34H.js";import{a as Z}from"./chunk-AKSAKP35.js";import{a as _}from"./chunk-3H33S3UA.js";import{i as Lo}from"./chunk-Y5ITMKC6.js";import{e as $}from"./chunk-4X64QOAR.js";import{a as I}from"./chunk-NYIYRILR.js";import{l as K}from"./chunk-XFMAA4MD.js";import{g as J}from"./chunk-TUZ665BA.js";import{b as L,c as M,d as N,e as O,f as P,g as Q,h as R,i as S,j as T,k as U}from"./chunk-SR42NATX.js";import{n as V}from"./chunk-TRJAVWCK.js";import{g as W}from"./chunk-XVN43IZL.js";import{o as X}from"./chunk-KBSH6CBD.js";import"./chunk-2ACVWLFA.js";import{a as Y}from"./chunk-Q5SANVIW.js";import{a as u}from"./chunk-XD3C3GVF.js";import{a as A}from"./chunk-X7DGYRAY.js";import{m as E}from"./chunk-R4DMVTM3.js";import{b as B,c as C}from"./chunk-TANYRHGP.js";import{a as D}from"./chunk-WUCBFB25.js";import{a as z}from"./chunk-YLPCYCYA.js";import{a as y}from"./chunk-Y2DBXOLT.js";import{c as F}from"./chunk-3M5ZM67R.js";import"./chunk-2VSRZ4IT.js";import{a as G}from"./chunk-HVMRB3AH.js";import"./chunk-4KIZRO52.js";import{a as H}from"./chunk-JFJV4HL3.js";import{a as v,b as w}from"./chunk-NJ7RQYLX.js";import"./chunk-2WFN4D52.js";import{a as h}from"./chunk-B6YGNB3V.js";import{f as i}from"./chunk-OMPLFDS6.js";import{h as n}from"./chunk-UH6CJXHY.js";import"./chunk-FATCGZZE.js";import{a as j}from"./chunk-OBSZOD5M.js";import{b as l}from"./chunk-3RJVW6RK.js";import"./chunk-TGRHRMQI.js";import{a as k}from"./chunk-FICBVI4M.js";import"./chunk-BQC2P3SN.js";import{a as q}from"./chunk-5APRBJRR.js";import{a as s}from"./chunk-IFHBMTFX.js";import"./chunk-UJ7JERJ5.js";import"./chunk-HGF4CKRY.js";import{a as c,b as d,c as g}from"./chunk-FVRVBB6O.js";import"./chunk-GHUAUFG7.js";import"./chunk-M26LLCQC.js";import"./chunk-HQT32HQ6.js";import"./chunk-XUCR7L4G.js";import"./chunk-4OJRLS5N.js";import"./chunk-KGCGT4MJ.js";import"./chunk-4TTRPCGG.js";import"./chunk-MXEOE4LA.js";import"./chunk-SGKLJDA3.js";import{a as f}from"./chunk-BUXK5VGR.js";import{a as e}from"./chunk-KVVRFWGQ.js";import"./chunk-YCLPURTD.js";import"./chunk-CR65RYGM.js";import"./chunk-7N2Q5WOM.js";import"./chunk-OAJ5DARR.js";import{b as o,c as r}from"./chunk-5KMEUZWN.js";import{a as m,b as p,c as t,d as x}from"./chunk-GKDGNPBD.js";import"./chunk-5ON3XLRD.js";import"./chunk-HBWBPBSA.js";import"./chunk-5JYSYTHA.js";import"./chunk-ISCZ57VL.js";import"./chunk-EB4AG3OL.js";import{a}from"./chunk-QPRUTOLI.js";import"./chunk-G66WDIIV.js";import"./chunk-4KBKS3ZE.js";import"./chunk-VWRPVM5K.js";import"./chunk-PMXIQ5B4.js";import{a as b}from"./chunk-DFQIIYLD.js";import"./chunk-KOAWATCI.js";import"./chunk-5KJIPH2N.js";import"./chunk-YOSLXJI5.js";import"./chunk-QEDKL23P.js";import"./chunk-5BXCPANF.js";import"./chunk-LPLW7OWA.js";import"./chunk-L54FWKJE.js";import"./chunk-XU74PNM2.js";import"./chunk-MAA6LEE2.js";import"./chunk-OKQAVYW4.js";import"./chunk-CLJ6SEGP.js";import"./chunk-ANQLWGFN.js";import"./chunk-VQPANPMI.js";export{Mo as APPEARANCE_STORAGE_KEY,h as AccessibleIcon,i as Accordion,n as AlertDialog,q as Avatar,s as Blockquote,u as Box,z as Button,A as Card,E as Chatbar,G as Checkbox,F as CheckboxGroup,t as ChevronDownIcon,H as Chip,I as Code,K as Combobox,L as Command,S as CommandCollection,N as CommandContent,U as CommandEmpty,Q as CommandGroup,R as CommandGroupLabel,O as CommandInput,T as CommandItem,P as CommandList,M as CommandTrigger,C as Confirmation,V as ContextMenu,W as Dialog,X as DropdownMenu,e as Flex,Y as Grid,j as Heading,Z as Image,a as Kbd,_ as Link,Lo as MessageScroller,$ as Navbar,Ao as Navigator,Do as NavigatorBack,Go as NavigatorLink,Bo as NavigatorOutlet,Fo as NavigatorScreen,Eo as NavigatorTitle,B as Notice,zo as Page,J as Popover,oo as Portal,ro as Progress,fo as Radio,eo as RadioGroup,mo as Reset,b as ScrollArea,po as SegmentedControl,to as Select,xo as Separator,Ko as Sheet,Jo as Shell,Io as Sidebar,ao as Slider,o as Slot,r as Slottable,f as Spinner,bo as Switch,co as Table,go as Tabs,k as Text,ho as TextArea,io as TextField,g as Theme,c as ThemeContext,p as ThickCheckIcon,x as ThickChevronRightIcon,m as ThickDividerHorizontalIcon,jo as Toggle,yo as Toolbar,no as ToolbarButton,uo as ToolbarFill,lo as ToolbarGroup,qo as ToolbarOverflow,vo as ToolbarSeparator,so as ToolbarSlot,wo as ToolbarTitle,w as Tooltip,v as TooltipProvider,Ho as VirtualMenu,D as VisuallyHidden,No as appearanceScript,Oo as setAppearance,Po as useAppearance,l as useBodyPointerEventsCleanup,Co as useNavigator,d as useThemeContext,ko as useToolbarOverflow,y as useTooltipWrapper};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED