@torpor/ui 0.0.17 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/Accordion/Accordion.torp +53 -54
- package/dist/Accordion/AccordionContent.torp +5 -5
- package/dist/Accordion/AccordionHeader.torp +5 -4
- package/dist/Accordion/AccordionItem.torp +13 -8
- package/dist/Accordion/AccordionTrigger.torp +5 -5
- package/dist/Accordion/AccordionTypes.ts +1 -0
- package/dist/Dialog/Dialog.torp +156 -0
- package/dist/Dialog/DialogBody.torp +34 -0
- package/dist/Dialog/DialogButton.torp +48 -0
- package/dist/Dialog/DialogFooter.torp +13 -0
- package/dist/Dialog/DialogHeader.torp +34 -0
- package/dist/Dialog/DialogTypes.ts +16 -0
- package/dist/Dialog/index.cjs +53 -0
- package/dist/Dialog/index.cjs.map +1 -0
- package/dist/Dialog/index.js +22 -0
- package/dist/Dialog/index.js.map +1 -0
- package/dist/NavMenu/NavMenu.torp +178 -0
- package/dist/NavMenu/NavMenuButton.torp +46 -0
- package/dist/NavMenu/NavMenuElement.torp +43 -0
- package/dist/NavMenu/NavMenuGroup.torp +30 -0
- package/dist/NavMenu/NavMenuGroupHeader.torp +30 -0
- package/dist/NavMenu/NavMenuLink.torp +52 -0
- package/dist/NavMenu/NavMenuPopout.torp +69 -0
- package/dist/NavMenu/NavMenuPopoutButton.torp +120 -0
- package/dist/NavMenu/NavMenuPopoutContent.torp +79 -0
- package/dist/NavMenu/NavMenuSeparator.torp +14 -0
- package/dist/NavMenu/NavMenuTypes.ts +32 -0
- package/dist/NavMenu/index.cjs +78 -0
- package/dist/NavMenu/index.cjs.map +1 -0
- package/dist/NavMenu/index.js +42 -0
- package/dist/NavMenu/index.js.map +1 -0
- package/dist/Popover/Popover.torp +105 -0
- package/dist/Popover/PopoverContentAnchored.torp +107 -0
- package/dist/Popover/PopoverContentContextual.torp +99 -0
- package/dist/Popover/PopoverContentStatic.torp +78 -0
- package/dist/Popover/PopoverOverlay.torp +32 -0
- package/dist/Popover/PopoverTrigger.torp +29 -0
- package/dist/Popover/PopoverTriggerContextual.torp +37 -0
- package/dist/Popover/PopoverTriggerHover.torp +30 -0
- package/dist/Popover/PopoverTypes.ts +30 -0
- package/dist/Popover/index.cjs +222 -0
- package/dist/Popover/index.cjs.map +1 -0
- package/dist/Popover/index.js +183 -0
- package/dist/Popover/index.js.map +1 -0
- package/dist/Popover/mountClickPopover.ts +50 -0
- package/dist/Popover/mountContextPopover.ts +50 -0
- package/dist/Popover/mountHoverPopover.ts +57 -0
- package/dist/Popover/showPopover.ts +24 -0
- package/dist/Popover/showPopoverPrompt.ts +23 -0
- package/dist/TabGroup/TabContent.torp +4 -4
- package/dist/TabGroup/TabGroup.torp +58 -59
- package/dist/TabGroup/TabGroupTypes.ts +1 -0
- package/dist/TabGroup/TabHeader.torp +10 -8
- package/dist/TabGroup/TabList.torp +4 -3
- package/dist/TabGroup/TabTrigger.torp +6 -6
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/mount/disableScroll.ts +28 -0
- package/dist/mount/hoverTrigger.ts +59 -0
- package/dist/mount/trapFocus.ts +58 -0
- package/dist/utils/documentEvents.ts +17 -0
- package/dist/utils/getScrollParent.ts +22 -0
- package/dist/utils/setContextPosition.ts +31 -0
- package/dist/utils/setPopoverPosition.ts +138 -0
- package/package.json +21 -6
- package/scripts/postbuild.ts +17 -5
- package/src/Accordion/Accordion.torp +53 -54
- package/src/Accordion/AccordionContent.torp +5 -5
- package/src/Accordion/AccordionHeader.torp +5 -4
- package/src/Accordion/AccordionItem.torp +13 -8
- package/src/Accordion/AccordionTrigger.torp +5 -5
- package/src/Accordion/AccordionTypes.ts +1 -0
- package/src/Dialog/Dialog.torp +156 -0
- package/src/Dialog/DialogBody.torp +34 -0
- package/src/Dialog/DialogButton.torp +48 -0
- package/src/Dialog/DialogFooter.torp +13 -0
- package/src/Dialog/DialogHeader.torp +34 -0
- package/src/Dialog/DialogTypes.ts +16 -0
- package/src/Dialog/index.ts +7 -0
- package/src/Dialog.ts +7 -0
- package/src/NavMenu/NavMenu.torp +178 -0
- package/src/NavMenu/NavMenuButton.torp +46 -0
- package/src/NavMenu/NavMenuElement.torp +43 -0
- package/src/NavMenu/NavMenuGroup.torp +30 -0
- package/src/NavMenu/NavMenuGroupHeader.torp +30 -0
- package/src/NavMenu/NavMenuLink.torp +52 -0
- package/src/NavMenu/NavMenuPopout.torp +69 -0
- package/src/NavMenu/NavMenuPopoutButton.torp +120 -0
- package/src/NavMenu/NavMenuPopoutContent.torp +79 -0
- package/src/NavMenu/NavMenuSeparator.torp +14 -0
- package/src/NavMenu/NavMenuTypes.ts +32 -0
- package/src/NavMenu/index.ts +23 -0
- package/src/NavMenu.ts +23 -0
- package/src/Popover/Popover.torp +105 -0
- package/src/Popover/PopoverContentAnchored.torp +107 -0
- package/src/Popover/PopoverContentContextual.torp +99 -0
- package/src/Popover/PopoverContentStatic.torp +78 -0
- package/src/Popover/PopoverOverlay.torp +32 -0
- package/src/Popover/PopoverTrigger.torp +29 -0
- package/src/Popover/PopoverTriggerContextual.torp +37 -0
- package/src/Popover/PopoverTriggerHover.torp +30 -0
- package/src/Popover/PopoverTypes.ts +30 -0
- package/src/Popover/index.ts +29 -0
- package/src/Popover/mountClickPopover.ts +50 -0
- package/src/Popover/mountContextPopover.ts +50 -0
- package/src/Popover/mountHoverPopover.ts +57 -0
- package/src/Popover/showPopover.ts +24 -0
- package/src/Popover/showPopoverPrompt.ts +23 -0
- package/src/Popover.ts +29 -0
- package/src/TabGroup/TabContent.torp +4 -4
- package/src/TabGroup/TabGroup.torp +58 -59
- package/src/TabGroup/TabGroupTypes.ts +1 -0
- package/src/TabGroup/TabHeader.torp +10 -8
- package/src/TabGroup/TabList.torp +4 -3
- package/src/TabGroup/TabTrigger.torp +6 -6
- package/src/mount/disableScroll.ts +28 -0
- package/src/mount/hoverTrigger.ts +59 -0
- package/src/mount/trapFocus.ts +58 -0
- package/src/utils/documentEvents.ts +17 -0
- package/src/utils/getScrollParent.ts +22 -0
- package/src/utils/setContextPosition.ts +31 -0
- package/src/utils/setPopoverPosition.ts +138 -0
- package/test/Accordion/accessibility.test.ts +0 -3
- package/test/Accordion/for-items.test.ts +2 -4
- package/test/Accordion/keyboard.test.ts +0 -3
- package/test/Accordion/multiple-item-toggle.test.ts +3 -5
- package/test/Accordion/single-item-toggle.test.ts +3 -5
- package/test/Dialog/accessibility-alert.test.ts +40 -0
- package/test/Dialog/accessibility-modal.test.ts +52 -0
- package/test/Dialog/components/CustomDialog.torp +20 -0
- package/test/Dialog/components/DialogAccessibility.torp +31 -0
- package/test/Dialog/components/DialogFunction.torp +22 -0
- package/test/Dialog/components/DialogVariable.torp +35 -0
- package/test/Dialog/function.test.ts +26 -0
- package/test/Dialog/variable.test.ts +27 -0
- package/test/NavMenu/accessibility.test.ts +97 -0
- package/test/NavMenu/basic.test.ts +22 -0
- package/test/NavMenu/components/NavMenu.torp +28 -0
- package/test/NavMenu/components/NavMenuAccessibility.torp +35 -0
- package/test/TabGroup/for-items.test.ts +2 -4
- package/test/TabGroup/item-trigger.test.ts +3 -5
- package/tsup.config.ts +8 -1
package/dist/metafile-cjs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/motion/fade.ts":{"bytes":155,"imports":[],"format":"esm"},"src/motion.ts":{"bytes":52,"imports":[{"path":"src/motion/fade.ts","kind":"import-statement","original":"./motion/fade"}],"format":"esm"},"src/Accordion/Accordion.torp":{"bytes":5525,"imports":[]},"src/Accordion/AccordionContent.torp":{"bytes":1189,"imports":[]},"src/Accordion/AccordionHeader.torp":{"bytes":855,"imports":[]},"src/Accordion/AccordionItem.torp":{"bytes":2331,"imports":[]},"src/Accordion/AccordionTrigger.torp":{"bytes":1815,"imports":[]},"src/Accordion/index.ts":{"bytes":349,"imports":[{"path":"src/Accordion/Accordion.torp","kind":"import-statement","original":"./Accordion.torp"},{"path":"src/Accordion/AccordionContent.torp","kind":"import-statement","original":"./AccordionContent.torp"},{"path":"src/Accordion/AccordionHeader.torp","kind":"import-statement","original":"./AccordionHeader.torp"},{"path":"src/Accordion/AccordionItem.torp","kind":"import-statement","original":"./AccordionItem.torp"},{"path":"src/Accordion/AccordionTrigger.torp","kind":"import-statement","original":"./AccordionTrigger.torp"}],"format":"esm"},"src/TabGroup/TabContent.torp":{"bytes":1004,"imports":[]},"src/TabGroup/TabGroup.torp":{"bytes":5988,"imports":[]},"src/TabGroup/TabHeader.torp":{"bytes":1434,"imports":[]},"src/TabGroup/TabList.torp":{"bytes":1230,"imports":[]},"src/TabGroup/TabTrigger.torp":{"bytes":1881,"imports":[]},"src/TabGroup/index.ts":{"bytes":274,"imports":[{"path":"src/TabGroup/TabContent.torp","kind":"import-statement","original":"./TabContent.torp"},{"path":"src/TabGroup/TabGroup.torp","kind":"import-statement","original":"./TabGroup.torp"},{"path":"src/TabGroup/TabHeader.torp","kind":"import-statement","original":"./TabHeader.torp"},{"path":"src/TabGroup/TabList.torp","kind":"import-statement","original":"./TabList.torp"},{"path":"src/TabGroup/TabTrigger.torp","kind":"import-statement","original":"./TabTrigger.torp"}],"format":"esm"}},"outputs":{"dist/motion.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":487},"dist/motion.cjs":{"imports":[],"exports":[],"entryPoint":"src/motion.ts","inputs":{"src/motion.ts":{"bytesInOutput":130},"src/motion/fade.ts":{"bytesInOutput":92}},"bytes":1160},"dist/Accordion-E6VNLVJW.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/Accordion.torp":{"bytesInOutput":5525}},"bytes":5525},"dist/AccordionContent-HGVMBVT6.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionContent.torp":{"bytesInOutput":1189}},"bytes":1189},"dist/AccordionHeader-YC7XXPRV.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionHeader.torp":{"bytesInOutput":855}},"bytes":855},"dist/AccordionItem-RQ6AWHXL.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionItem.torp":{"bytesInOutput":2331}},"bytes":2331},"dist/AccordionTrigger-7OBA72E2.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionTrigger.torp":{"bytesInOutput":1815}},"bytes":1815},"dist/Accordion/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":557},"dist/Accordion/index.cjs":{"imports":[{"path":"dist/Accordion-E6VNLVJW.torp","kind":"file-loader"},{"path":"dist/AccordionContent-HGVMBVT6.torp","kind":"file-loader"},{"path":"dist/AccordionHeader-YC7XXPRV.torp","kind":"file-loader"},{"path":"dist/AccordionItem-RQ6AWHXL.torp","kind":"file-loader"},{"path":"dist/AccordionTrigger-7OBA72E2.torp","kind":"file-loader"}],"exports":[],"entryPoint":"src/Accordion/index.ts","inputs":{"src/Accordion/index.ts":{"bytesInOutput":349},"src/Accordion/Accordion.torp":{"bytesInOutput":54},"src/Accordion/AccordionContent.torp":{"bytesInOutput":68},"src/Accordion/AccordionHeader.torp":{"bytesInOutput":66},"src/Accordion/AccordionItem.torp":{"bytesInOutput":62},"src/Accordion/AccordionTrigger.torp":{"bytesInOutput":68}},"bytes":1861},"dist/TabContent-47Q6KW7X.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabContent.torp":{"bytesInOutput":1004}},"bytes":1004},"dist/TabGroup-NYWPQAQC.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabGroup.torp":{"bytesInOutput":5988}},"bytes":5988},"dist/TabHeader-MIXZZW3W.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabHeader.torp":{"bytesInOutput":1434}},"bytes":1434},"dist/TabList-RQKKSKQX.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabList.torp":{"bytesInOutput":1230}},"bytes":1230},"dist/TabTrigger-W2D6RBVP.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabTrigger.torp":{"bytesInOutput":1881}},"bytes":1881},"dist/TabGroup/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":481},"dist/TabGroup/index.cjs":{"imports":[{"path":"dist/TabContent-47Q6KW7X.torp","kind":"file-loader"},{"path":"dist/TabGroup-NYWPQAQC.torp","kind":"file-loader"},{"path":"dist/TabHeader-MIXZZW3W.torp","kind":"file-loader"},{"path":"dist/TabList-RQKKSKQX.torp","kind":"file-loader"},{"path":"dist/TabTrigger-W2D6RBVP.torp","kind":"file-loader"}],"exports":[],"entryPoint":"src/TabGroup/index.ts","inputs":{"src/TabGroup/index.ts":{"bytesInOutput":296},"src/TabGroup/TabContent.torp":{"bytesInOutput":56},"src/TabGroup/TabGroup.torp":{"bytesInOutput":52},"src/TabGroup/TabHeader.torp":{"bytesInOutput":54},"src/TabGroup/TabList.torp":{"bytesInOutput":50},"src/TabGroup/TabTrigger.torp":{"bytesInOutput":56}},"bytes":1702}}}
|
|
1
|
+
{"inputs":{"src/motion/fade.ts":{"bytes":155,"imports":[],"format":"esm"},"src/motion.ts":{"bytes":52,"imports":[{"path":"src/motion/fade.ts","kind":"import-statement","original":"./motion/fade"}],"format":"esm"},"src/Accordion/Accordion.torp":{"bytes":5416,"imports":[]},"src/Accordion/AccordionContent.torp":{"bytes":1220,"imports":[]},"src/Accordion/AccordionHeader.torp":{"bytes":904,"imports":[]},"src/Accordion/AccordionItem.torp":{"bytes":2448,"imports":[]},"src/Accordion/AccordionTrigger.torp":{"bytes":1846,"imports":[]},"src/Accordion/index.ts":{"bytes":349,"imports":[{"path":"src/Accordion/Accordion.torp","kind":"import-statement","original":"./Accordion.torp"},{"path":"src/Accordion/AccordionContent.torp","kind":"import-statement","original":"./AccordionContent.torp"},{"path":"src/Accordion/AccordionHeader.torp","kind":"import-statement","original":"./AccordionHeader.torp"},{"path":"src/Accordion/AccordionItem.torp","kind":"import-statement","original":"./AccordionItem.torp"},{"path":"src/Accordion/AccordionTrigger.torp","kind":"import-statement","original":"./AccordionTrigger.torp"}],"format":"esm"},"src/Dialog/Dialog.torp":{"bytes":4423,"imports":[]},"src/Dialog/DialogBody.torp":{"bytes":971,"imports":[]},"src/Dialog/DialogButton.torp":{"bytes":1470,"imports":[]},"src/Dialog/DialogFooter.torp":{"bytes":261,"imports":[]},"src/Dialog/DialogHeader.torp":{"bytes":966,"imports":[]},"src/Dialog/index.ts":{"bytes":298,"imports":[{"path":"src/Dialog/Dialog.torp","kind":"import-statement","original":"./Dialog.torp"},{"path":"src/Dialog/DialogBody.torp","kind":"import-statement","original":"./DialogBody.torp"},{"path":"src/Dialog/DialogButton.torp","kind":"import-statement","original":"./DialogButton.torp"},{"path":"src/Dialog/DialogFooter.torp","kind":"import-statement","original":"./DialogFooter.torp"},{"path":"src/Dialog/DialogHeader.torp","kind":"import-statement","original":"./DialogHeader.torp"}],"format":"esm"},"src/NavMenu/NavMenu.torp":{"bytes":4116,"imports":[]},"src/NavMenu/NavMenuButton.torp":{"bytes":1238,"imports":[]},"src/NavMenu/NavMenuElement.torp":{"bytes":1222,"imports":[]},"src/NavMenu/NavMenuGroup.torp":{"bytes":717,"imports":[]},"src/NavMenu/NavMenuGroupHeader.torp":{"bytes":789,"imports":[]},"src/NavMenu/NavMenuLink.torp":{"bytes":1436,"imports":[]},"src/NavMenu/NavMenuPopout.torp":{"bytes":1477,"imports":[]},"src/NavMenu/NavMenuPopoutButton.torp":{"bytes":3119,"imports":[]},"src/NavMenu/NavMenuPopoutContent.torp":{"bytes":2398,"imports":[]},"src/NavMenu/NavMenuSeparator.torp":{"bytes":282,"imports":[]},"src/NavMenu/index.ts":{"bytes":712,"imports":[{"path":"src/NavMenu/NavMenu.torp","kind":"import-statement","original":"./NavMenu.torp"},{"path":"src/NavMenu/NavMenuButton.torp","kind":"import-statement","original":"./NavMenuButton.torp"},{"path":"src/NavMenu/NavMenuElement.torp","kind":"import-statement","original":"./NavMenuElement.torp"},{"path":"src/NavMenu/NavMenuGroup.torp","kind":"import-statement","original":"./NavMenuGroup.torp"},{"path":"src/NavMenu/NavMenuGroupHeader.torp","kind":"import-statement","original":"./NavMenuGroupHeader.torp"},{"path":"src/NavMenu/NavMenuLink.torp","kind":"import-statement","original":"./NavMenuLink.torp"},{"path":"src/NavMenu/NavMenuPopout.torp","kind":"import-statement","original":"./NavMenuPopout.torp"},{"path":"src/NavMenu/NavMenuPopoutButton.torp","kind":"import-statement","original":"./NavMenuPopoutButton.torp"},{"path":"src/NavMenu/NavMenuPopoutContent.torp","kind":"import-statement","original":"./NavMenuPopoutContent.torp"},{"path":"src/NavMenu/NavMenuSeparator.torp","kind":"import-statement","original":"./NavMenuSeparator.torp"}],"format":"esm"},"src/Popover/Popover.torp":{"bytes":2903,"imports":[]},"src/Popover/PopoverContentAnchored.torp":{"bytes":3306,"imports":[]},"src/Popover/PopoverContentContextual.torp":{"bytes":2993,"imports":[]},"src/Popover/PopoverContentStatic.torp":{"bytes":2152,"imports":[]},"src/Popover/PopoverOverlay.torp":{"bytes":862,"imports":[]},"src/Popover/PopoverTrigger.torp":{"bytes":700,"imports":[]},"src/Popover/PopoverTriggerContextual.torp":{"bytes":1188,"imports":[]},"src/Popover/PopoverTriggerHover.torp":{"bytes":814,"imports":[]},"src/Popover/showPopover.ts":{"bytes":866,"imports":[],"format":"esm"},"src/Popover/mountClickPopover.ts":{"bytes":1231,"imports":[{"path":"src/Popover/showPopover.ts","kind":"import-statement","original":"./showPopover"}],"format":"esm"},"src/Popover/mountContextPopover.ts":{"bytes":1274,"imports":[{"path":"src/Popover/showPopover.ts","kind":"import-statement","original":"./showPopover"}],"format":"esm"},"src/mount/hoverTrigger.ts":{"bytes":1885,"imports":[],"format":"esm"},"src/Popover/mountHoverPopover.ts":{"bytes":1727,"imports":[{"path":"src/mount/hoverTrigger.ts","kind":"import-statement","original":"../mount/hoverTrigger"},{"path":"src/Popover/showPopover.ts","kind":"import-statement","original":"./showPopover"}],"format":"esm"},"src/Popover/showPopoverPrompt.ts":{"bytes":785,"imports":[],"format":"esm"},"src/Popover/index.ts":{"bytes":984,"imports":[{"path":"src/Popover/Popover.torp","kind":"import-statement","original":"./Popover.torp"},{"path":"src/Popover/PopoverContentAnchored.torp","kind":"import-statement","original":"./PopoverContentAnchored.torp"},{"path":"src/Popover/PopoverContentContextual.torp","kind":"import-statement","original":"./PopoverContentContextual.torp"},{"path":"src/Popover/PopoverContentStatic.torp","kind":"import-statement","original":"./PopoverContentStatic.torp"},{"path":"src/Popover/PopoverOverlay.torp","kind":"import-statement","original":"./PopoverOverlay.torp"},{"path":"src/Popover/PopoverTrigger.torp","kind":"import-statement","original":"./PopoverTrigger.torp"},{"path":"src/Popover/PopoverTriggerContextual.torp","kind":"import-statement","original":"./PopoverTriggerContextual.torp"},{"path":"src/Popover/PopoverTriggerHover.torp","kind":"import-statement","original":"./PopoverTriggerHover.torp"},{"path":"src/Popover/mountClickPopover.ts","kind":"import-statement","original":"./mountClickPopover"},{"path":"src/Popover/mountContextPopover.ts","kind":"import-statement","original":"./mountContextPopover"},{"path":"src/Popover/mountHoverPopover.ts","kind":"import-statement","original":"./mountHoverPopover"},{"path":"src/Popover/showPopover.ts","kind":"import-statement","original":"./showPopover"},{"path":"src/Popover/showPopoverPrompt.ts","kind":"import-statement","original":"./showPopoverPrompt"}],"format":"esm"},"src/TabGroup/TabContent.torp":{"bytes":1035,"imports":[]},"src/TabGroup/TabGroup.torp":{"bytes":5920,"imports":[]},"src/TabGroup/TabHeader.torp":{"bytes":1388,"imports":[]},"src/TabGroup/TabList.torp":{"bytes":1278,"imports":[]},"src/TabGroup/TabTrigger.torp":{"bytes":1912,"imports":[]},"src/TabGroup/index.ts":{"bytes":274,"imports":[{"path":"src/TabGroup/TabContent.torp","kind":"import-statement","original":"./TabContent.torp"},{"path":"src/TabGroup/TabGroup.torp","kind":"import-statement","original":"./TabGroup.torp"},{"path":"src/TabGroup/TabHeader.torp","kind":"import-statement","original":"./TabHeader.torp"},{"path":"src/TabGroup/TabList.torp","kind":"import-statement","original":"./TabList.torp"},{"path":"src/TabGroup/TabTrigger.torp","kind":"import-statement","original":"./TabTrigger.torp"}],"format":"esm"}},"outputs":{"dist/motion.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":487},"dist/motion.cjs":{"imports":[],"exports":[],"entryPoint":"src/motion.ts","inputs":{"src/motion.ts":{"bytesInOutput":130},"src/motion/fade.ts":{"bytesInOutput":92}},"bytes":1160},"dist/Accordion-QRVUJYO4.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/Accordion.torp":{"bytesInOutput":5416}},"bytes":5416},"dist/AccordionContent-N2MX55UP.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionContent.torp":{"bytesInOutput":1220}},"bytes":1220},"dist/AccordionHeader-63PAFATF.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionHeader.torp":{"bytesInOutput":904}},"bytes":904},"dist/AccordionItem-OZM2RDTP.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionItem.torp":{"bytesInOutput":2448}},"bytes":2448},"dist/AccordionTrigger-A2BNI4UL.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionTrigger.torp":{"bytesInOutput":1846}},"bytes":1846},"dist/Accordion/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":557},"dist/Accordion/index.cjs":{"imports":[{"path":"dist/Accordion-QRVUJYO4.torp","kind":"file-loader"},{"path":"dist/AccordionContent-N2MX55UP.torp","kind":"file-loader"},{"path":"dist/AccordionHeader-63PAFATF.torp","kind":"file-loader"},{"path":"dist/AccordionItem-OZM2RDTP.torp","kind":"file-loader"},{"path":"dist/AccordionTrigger-A2BNI4UL.torp","kind":"file-loader"}],"exports":[],"entryPoint":"src/Accordion/index.ts","inputs":{"src/Accordion/index.ts":{"bytesInOutput":349},"src/Accordion/Accordion.torp":{"bytesInOutput":54},"src/Accordion/AccordionContent.torp":{"bytesInOutput":68},"src/Accordion/AccordionHeader.torp":{"bytesInOutput":66},"src/Accordion/AccordionItem.torp":{"bytesInOutput":62},"src/Accordion/AccordionTrigger.torp":{"bytesInOutput":68}},"bytes":1861},"dist/Dialog-MXD6FCTC.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/Dialog.torp":{"bytesInOutput":4423}},"bytes":4423},"dist/DialogBody-AGHBYC75.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/DialogBody.torp":{"bytesInOutput":971}},"bytes":971},"dist/DialogButton-RLATFTMQ.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/DialogButton.torp":{"bytesInOutput":1470}},"bytes":1470},"dist/DialogFooter-RRRHATC4.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/DialogFooter.torp":{"bytesInOutput":261}},"bytes":261},"dist/DialogHeader-SP44TBW2.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/DialogHeader.torp":{"bytesInOutput":966}},"bytes":966},"dist/Dialog/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":503},"dist/Dialog/index.cjs":{"imports":[{"path":"dist/Dialog-MXD6FCTC.torp","kind":"file-loader"},{"path":"dist/DialogBody-AGHBYC75.torp","kind":"file-loader"},{"path":"dist/DialogButton-RLATFTMQ.torp","kind":"file-loader"},{"path":"dist/DialogFooter-RRRHATC4.torp","kind":"file-loader"},{"path":"dist/DialogHeader-SP44TBW2.torp","kind":"file-loader"}],"exports":[],"entryPoint":"src/Dialog/index.ts","inputs":{"src/Dialog/index.ts":{"bytesInOutput":306},"src/Dialog/Dialog.torp":{"bytesInOutput":48},"src/Dialog/DialogBody.torp":{"bytesInOutput":56},"src/Dialog/DialogButton.torp":{"bytesInOutput":60},"src/Dialog/DialogFooter.torp":{"bytesInOutput":60},"src/Dialog/DialogHeader.torp":{"bytesInOutput":60}},"bytes":1732},"dist/NavMenu-UJCM4WXB.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenu.torp":{"bytesInOutput":4116}},"bytes":4116},"dist/NavMenuButton-RMKLDWBU.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuButton.torp":{"bytesInOutput":1238}},"bytes":1238},"dist/NavMenuElement-PV4LVXYB.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuElement.torp":{"bytesInOutput":1222}},"bytes":1222},"dist/NavMenuGroup-OMQVOQWO.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuGroup.torp":{"bytesInOutput":717}},"bytes":717},"dist/NavMenuGroupHeader-AATDD4TU.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuGroupHeader.torp":{"bytesInOutput":789}},"bytes":789},"dist/NavMenuLink-NKOAOAKK.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuLink.torp":{"bytesInOutput":1436}},"bytes":1436},"dist/NavMenuPopout-XSEJCS65.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuPopout.torp":{"bytesInOutput":1477}},"bytes":1477},"dist/NavMenuPopoutButton-54RVYQIZ.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuPopoutButton.torp":{"bytesInOutput":3119}},"bytes":3119},"dist/NavMenuPopoutContent-2PY5VBAN.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuPopoutContent.torp":{"bytesInOutput":2398}},"bytes":2398},"dist/NavMenuSeparator-4CEIKZRA.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuSeparator.torp":{"bytesInOutput":282}},"bytes":282},"dist/NavMenu/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":979},"dist/NavMenu/index.cjs":{"imports":[{"path":"dist/NavMenu-UJCM4WXB.torp","kind":"file-loader"},{"path":"dist/NavMenuButton-RMKLDWBU.torp","kind":"file-loader"},{"path":"dist/NavMenuElement-PV4LVXYB.torp","kind":"file-loader"},{"path":"dist/NavMenuGroup-OMQVOQWO.torp","kind":"file-loader"},{"path":"dist/NavMenuGroupHeader-AATDD4TU.torp","kind":"file-loader"},{"path":"dist/NavMenuLink-NKOAOAKK.torp","kind":"file-loader"},{"path":"dist/NavMenuPopout-XSEJCS65.torp","kind":"file-loader"},{"path":"dist/NavMenuPopoutButton-54RVYQIZ.torp","kind":"file-loader"},{"path":"dist/NavMenuPopoutContent-2PY5VBAN.torp","kind":"file-loader"},{"path":"dist/NavMenuSeparator-4CEIKZRA.torp","kind":"file-loader"}],"exports":[],"entryPoint":"src/NavMenu/index.ts","inputs":{"src/NavMenu/index.ts":{"bytesInOutput":591},"src/NavMenu/NavMenu.torp":{"bytesInOutput":50},"src/NavMenu/NavMenuButton.torp":{"bytesInOutput":62},"src/NavMenu/NavMenuElement.torp":{"bytesInOutput":64},"src/NavMenu/NavMenuGroup.torp":{"bytesInOutput":60},"src/NavMenu/NavMenuGroupHeader.torp":{"bytesInOutput":72},"src/NavMenu/NavMenuLink.torp":{"bytesInOutput":58},"src/NavMenu/NavMenuPopout.torp":{"bytesInOutput":62},"src/NavMenu/NavMenuPopoutButton.torp":{"bytesInOutput":74},"src/NavMenu/NavMenuPopoutContent.torp":{"bytesInOutput":76},"src/NavMenu/NavMenuSeparator.torp":{"bytesInOutput":68}},"bytes":2697},"dist/Popover-YHGYEB4G.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/Popover.torp":{"bytesInOutput":2903}},"bytes":2903},"dist/PopoverContentAnchored-DS57DKKY.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverContentAnchored.torp":{"bytesInOutput":3306}},"bytes":3306},"dist/PopoverContentContextual-INQC2C2C.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverContentContextual.torp":{"bytesInOutput":2993}},"bytes":2993},"dist/PopoverContentStatic-I7PGGQDK.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverContentStatic.torp":{"bytesInOutput":2152}},"bytes":2152},"dist/PopoverOverlay-LSEZJUMZ.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverOverlay.torp":{"bytesInOutput":862}},"bytes":862},"dist/PopoverTrigger-U7VM7RNB.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverTrigger.torp":{"bytesInOutput":700}},"bytes":700},"dist/PopoverTriggerContextual-S32VBOKW.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverTriggerContextual.torp":{"bytesInOutput":1188}},"bytes":1188},"dist/PopoverTriggerHover-YHR4DOTU.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverTriggerHover.torp":{"bytesInOutput":814}},"bytes":814},"dist/Popover/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12837},"dist/Popover/index.cjs":{"imports":[{"path":"dist/Popover-YHGYEB4G.torp","kind":"file-loader"},{"path":"dist/PopoverContentAnchored-DS57DKKY.torp","kind":"file-loader"},{"path":"dist/PopoverContentContextual-INQC2C2C.torp","kind":"file-loader"},{"path":"dist/PopoverContentStatic-I7PGGQDK.torp","kind":"file-loader"},{"path":"dist/PopoverOverlay-LSEZJUMZ.torp","kind":"file-loader"},{"path":"dist/PopoverTrigger-U7VM7RNB.torp","kind":"file-loader"},{"path":"dist/PopoverTriggerContextual-S32VBOKW.torp","kind":"file-loader"},{"path":"dist/PopoverTriggerHover-YHR4DOTU.torp","kind":"file-loader"}],"exports":[],"entryPoint":"src/Popover/index.ts","inputs":{"src/Popover/index.ts":{"bytesInOutput":745},"src/Popover/Popover.torp":{"bytesInOutput":50},"src/Popover/PopoverContentAnchored.torp":{"bytesInOutput":80},"src/Popover/PopoverContentContextual.torp":{"bytesInOutput":84},"src/Popover/PopoverContentStatic.torp":{"bytesInOutput":76},"src/Popover/PopoverOverlay.torp":{"bytesInOutput":64},"src/Popover/PopoverTrigger.torp":{"bytesInOutput":64},"src/Popover/PopoverTriggerContextual.torp":{"bytesInOutput":84},"src/Popover/PopoverTriggerHover.torp":{"bytesInOutput":74},"src/Popover/showPopover.ts":{"bytesInOutput":190},"src/Popover/mountClickPopover.ts":{"bytesInOutput":566},"src/Popover/mountContextPopover.ts":{"bytesInOutput":580},"src/mount/hoverTrigger.ts":{"bytesInOutput":1345},"src/Popover/mountHoverPopover.ts":{"bytesInOutput":943},"src/Popover/showPopoverPrompt.ts":{"bytesInOutput":221}},"bytes":6873},"dist/TabContent-F2PXYZ4M.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabContent.torp":{"bytesInOutput":1035}},"bytes":1035},"dist/TabGroup-JFP4Z5EQ.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabGroup.torp":{"bytesInOutput":5920}},"bytes":5920},"dist/TabHeader-EBSLHWGA.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabHeader.torp":{"bytesInOutput":1388}},"bytes":1388},"dist/TabList-5U65GJ6Y.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabList.torp":{"bytesInOutput":1278}},"bytes":1278},"dist/TabTrigger-4QPQTTIR.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabTrigger.torp":{"bytesInOutput":1912}},"bytes":1912},"dist/TabGroup/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":481},"dist/TabGroup/index.cjs":{"imports":[{"path":"dist/TabContent-F2PXYZ4M.torp","kind":"file-loader"},{"path":"dist/TabGroup-JFP4Z5EQ.torp","kind":"file-loader"},{"path":"dist/TabHeader-EBSLHWGA.torp","kind":"file-loader"},{"path":"dist/TabList-5U65GJ6Y.torp","kind":"file-loader"},{"path":"dist/TabTrigger-4QPQTTIR.torp","kind":"file-loader"}],"exports":[],"entryPoint":"src/TabGroup/index.ts","inputs":{"src/TabGroup/index.ts":{"bytesInOutput":296},"src/TabGroup/TabContent.torp":{"bytesInOutput":56},"src/TabGroup/TabGroup.torp":{"bytesInOutput":52},"src/TabGroup/TabHeader.torp":{"bytesInOutput":54},"src/TabGroup/TabList.torp":{"bytesInOutput":50},"src/TabGroup/TabTrigger.torp":{"bytesInOutput":56}},"bytes":1702}}}
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/motion/fade.ts":{"bytes":155,"imports":[],"format":"esm"},"src/motion.ts":{"bytes":52,"imports":[{"path":"src/motion/fade.ts","kind":"import-statement","original":"./motion/fade"}],"format":"esm"},"src/Accordion/Accordion.torp":{"bytes":5525,"imports":[]},"src/Accordion/AccordionContent.torp":{"bytes":1189,"imports":[]},"src/Accordion/AccordionHeader.torp":{"bytes":855,"imports":[]},"src/Accordion/AccordionItem.torp":{"bytes":2331,"imports":[]},"src/Accordion/AccordionTrigger.torp":{"bytes":1815,"imports":[]},"src/Accordion/index.ts":{"bytes":349,"imports":[{"path":"src/Accordion/Accordion.torp","kind":"import-statement","original":"./Accordion.torp"},{"path":"src/Accordion/AccordionContent.torp","kind":"import-statement","original":"./AccordionContent.torp"},{"path":"src/Accordion/AccordionHeader.torp","kind":"import-statement","original":"./AccordionHeader.torp"},{"path":"src/Accordion/AccordionItem.torp","kind":"import-statement","original":"./AccordionItem.torp"},{"path":"src/Accordion/AccordionTrigger.torp","kind":"import-statement","original":"./AccordionTrigger.torp"}],"format":"esm"},"src/TabGroup/TabContent.torp":{"bytes":1004,"imports":[]},"src/TabGroup/TabGroup.torp":{"bytes":5988,"imports":[]},"src/TabGroup/TabHeader.torp":{"bytes":1434,"imports":[]},"src/TabGroup/TabList.torp":{"bytes":1230,"imports":[]},"src/TabGroup/TabTrigger.torp":{"bytes":1881,"imports":[]},"src/TabGroup/index.ts":{"bytes":274,"imports":[{"path":"src/TabGroup/TabContent.torp","kind":"import-statement","original":"./TabContent.torp"},{"path":"src/TabGroup/TabGroup.torp","kind":"import-statement","original":"./TabGroup.torp"},{"path":"src/TabGroup/TabHeader.torp","kind":"import-statement","original":"./TabHeader.torp"},{"path":"src/TabGroup/TabList.torp","kind":"import-statement","original":"./TabList.torp"},{"path":"src/TabGroup/TabTrigger.torp","kind":"import-statement","original":"./TabTrigger.torp"}],"format":"esm"}},"outputs":{"dist/motion.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":360},"dist/motion.js":{"imports":[],"exports":["fade"],"entryPoint":"src/motion.ts","inputs":{"src/motion/fade.ts":{"bytesInOutput":92},"src/motion.ts":{"bytesInOutput":0}},"bytes":149},"dist/Accordion-E6VNLVJW.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/Accordion.torp":{"bytesInOutput":5525}},"bytes":5525},"dist/AccordionContent-HGVMBVT6.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionContent.torp":{"bytesInOutput":1189}},"bytes":1189},"dist/AccordionHeader-YC7XXPRV.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionHeader.torp":{"bytesInOutput":855}},"bytes":855},"dist/AccordionItem-RQ6AWHXL.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionItem.torp":{"bytesInOutput":2331}},"bytes":2331},"dist/AccordionTrigger-7OBA72E2.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionTrigger.torp":{"bytesInOutput":1815}},"bytes":1815},"dist/Accordion/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/Accordion/index.js":{"imports":[{"path":"dist/Accordion-E6VNLVJW.torp","kind":"file-loader"},{"path":"dist/AccordionContent-HGVMBVT6.torp","kind":"file-loader"},{"path":"dist/AccordionHeader-YC7XXPRV.torp","kind":"file-loader"},{"path":"dist/AccordionItem-RQ6AWHXL.torp","kind":"file-loader"},{"path":"dist/AccordionTrigger-7OBA72E2.torp","kind":"file-loader"}],"exports":["Accordion","AccordionContent","AccordionHeader","AccordionItem","AccordionTrigger"],"entryPoint":"src/Accordion/index.ts","inputs":{"src/Accordion/Accordion.torp":{"bytesInOutput":54},"src/Accordion/AccordionContent.torp":{"bytesInOutput":68},"src/Accordion/AccordionHeader.torp":{"bytesInOutput":66},"src/Accordion/AccordionItem.torp":{"bytesInOutput":62},"src/Accordion/AccordionTrigger.torp":{"bytesInOutput":68},"src/Accordion/index.ts":{"bytesInOutput":0}},"bytes":735},"dist/TabContent-47Q6KW7X.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabContent.torp":{"bytesInOutput":1004}},"bytes":1004},"dist/TabGroup-NYWPQAQC.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabGroup.torp":{"bytesInOutput":5988}},"bytes":5988},"dist/TabHeader-MIXZZW3W.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabHeader.torp":{"bytesInOutput":1434}},"bytes":1434},"dist/TabList-RQKKSKQX.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabList.torp":{"bytesInOutput":1230}},"bytes":1230},"dist/TabTrigger-W2D6RBVP.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabTrigger.torp":{"bytesInOutput":1881}},"bytes":1881},"dist/TabGroup/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/TabGroup/index.js":{"imports":[{"path":"dist/TabContent-47Q6KW7X.torp","kind":"file-loader"},{"path":"dist/TabGroup-NYWPQAQC.torp","kind":"file-loader"},{"path":"dist/TabHeader-MIXZZW3W.torp","kind":"file-loader"},{"path":"dist/TabList-RQKKSKQX.torp","kind":"file-loader"},{"path":"dist/TabTrigger-W2D6RBVP.torp","kind":"file-loader"}],"exports":["TabContent","TabGroup","TabHeader","TabList","TabTrigger"],"entryPoint":"src/TabGroup/index.ts","inputs":{"src/TabGroup/TabContent.torp":{"bytesInOutput":56},"src/TabGroup/TabGroup.torp":{"bytesInOutput":52},"src/TabGroup/TabHeader.torp":{"bytesInOutput":54},"src/TabGroup/TabList.torp":{"bytesInOutput":50},"src/TabGroup/TabTrigger.torp":{"bytesInOutput":56},"src/TabGroup/index.ts":{"bytesInOutput":0}},"bytes":605}}}
|
|
1
|
+
{"inputs":{"src/motion/fade.ts":{"bytes":155,"imports":[],"format":"esm"},"src/motion.ts":{"bytes":52,"imports":[{"path":"src/motion/fade.ts","kind":"import-statement","original":"./motion/fade"}],"format":"esm"},"src/Accordion/Accordion.torp":{"bytes":5416,"imports":[]},"src/Accordion/AccordionContent.torp":{"bytes":1220,"imports":[]},"src/Accordion/AccordionHeader.torp":{"bytes":904,"imports":[]},"src/Accordion/AccordionItem.torp":{"bytes":2448,"imports":[]},"src/Accordion/AccordionTrigger.torp":{"bytes":1846,"imports":[]},"src/Accordion/index.ts":{"bytes":349,"imports":[{"path":"src/Accordion/Accordion.torp","kind":"import-statement","original":"./Accordion.torp"},{"path":"src/Accordion/AccordionContent.torp","kind":"import-statement","original":"./AccordionContent.torp"},{"path":"src/Accordion/AccordionHeader.torp","kind":"import-statement","original":"./AccordionHeader.torp"},{"path":"src/Accordion/AccordionItem.torp","kind":"import-statement","original":"./AccordionItem.torp"},{"path":"src/Accordion/AccordionTrigger.torp","kind":"import-statement","original":"./AccordionTrigger.torp"}],"format":"esm"},"src/Dialog/Dialog.torp":{"bytes":4423,"imports":[]},"src/Dialog/DialogBody.torp":{"bytes":971,"imports":[]},"src/Dialog/DialogButton.torp":{"bytes":1470,"imports":[]},"src/Dialog/DialogFooter.torp":{"bytes":261,"imports":[]},"src/Dialog/DialogHeader.torp":{"bytes":966,"imports":[]},"src/Dialog/index.ts":{"bytes":298,"imports":[{"path":"src/Dialog/Dialog.torp","kind":"import-statement","original":"./Dialog.torp"},{"path":"src/Dialog/DialogBody.torp","kind":"import-statement","original":"./DialogBody.torp"},{"path":"src/Dialog/DialogButton.torp","kind":"import-statement","original":"./DialogButton.torp"},{"path":"src/Dialog/DialogFooter.torp","kind":"import-statement","original":"./DialogFooter.torp"},{"path":"src/Dialog/DialogHeader.torp","kind":"import-statement","original":"./DialogHeader.torp"}],"format":"esm"},"src/NavMenu/NavMenu.torp":{"bytes":4116,"imports":[]},"src/NavMenu/NavMenuButton.torp":{"bytes":1238,"imports":[]},"src/NavMenu/NavMenuElement.torp":{"bytes":1222,"imports":[]},"src/NavMenu/NavMenuGroup.torp":{"bytes":717,"imports":[]},"src/NavMenu/NavMenuGroupHeader.torp":{"bytes":789,"imports":[]},"src/NavMenu/NavMenuLink.torp":{"bytes":1436,"imports":[]},"src/NavMenu/NavMenuPopout.torp":{"bytes":1477,"imports":[]},"src/NavMenu/NavMenuPopoutButton.torp":{"bytes":3119,"imports":[]},"src/NavMenu/NavMenuPopoutContent.torp":{"bytes":2398,"imports":[]},"src/NavMenu/NavMenuSeparator.torp":{"bytes":282,"imports":[]},"src/NavMenu/index.ts":{"bytes":712,"imports":[{"path":"src/NavMenu/NavMenu.torp","kind":"import-statement","original":"./NavMenu.torp"},{"path":"src/NavMenu/NavMenuButton.torp","kind":"import-statement","original":"./NavMenuButton.torp"},{"path":"src/NavMenu/NavMenuElement.torp","kind":"import-statement","original":"./NavMenuElement.torp"},{"path":"src/NavMenu/NavMenuGroup.torp","kind":"import-statement","original":"./NavMenuGroup.torp"},{"path":"src/NavMenu/NavMenuGroupHeader.torp","kind":"import-statement","original":"./NavMenuGroupHeader.torp"},{"path":"src/NavMenu/NavMenuLink.torp","kind":"import-statement","original":"./NavMenuLink.torp"},{"path":"src/NavMenu/NavMenuPopout.torp","kind":"import-statement","original":"./NavMenuPopout.torp"},{"path":"src/NavMenu/NavMenuPopoutButton.torp","kind":"import-statement","original":"./NavMenuPopoutButton.torp"},{"path":"src/NavMenu/NavMenuPopoutContent.torp","kind":"import-statement","original":"./NavMenuPopoutContent.torp"},{"path":"src/NavMenu/NavMenuSeparator.torp","kind":"import-statement","original":"./NavMenuSeparator.torp"}],"format":"esm"},"src/Popover/Popover.torp":{"bytes":2903,"imports":[]},"src/Popover/PopoverContentAnchored.torp":{"bytes":3306,"imports":[]},"src/Popover/PopoverContentContextual.torp":{"bytes":2993,"imports":[]},"src/Popover/PopoverContentStatic.torp":{"bytes":2152,"imports":[]},"src/Popover/PopoverOverlay.torp":{"bytes":862,"imports":[]},"src/Popover/PopoverTrigger.torp":{"bytes":700,"imports":[]},"src/Popover/PopoverTriggerContextual.torp":{"bytes":1188,"imports":[]},"src/Popover/PopoverTriggerHover.torp":{"bytes":814,"imports":[]},"src/Popover/showPopover.ts":{"bytes":866,"imports":[],"format":"esm"},"src/Popover/mountClickPopover.ts":{"bytes":1231,"imports":[{"path":"src/Popover/showPopover.ts","kind":"import-statement","original":"./showPopover"}],"format":"esm"},"src/Popover/mountContextPopover.ts":{"bytes":1274,"imports":[{"path":"src/Popover/showPopover.ts","kind":"import-statement","original":"./showPopover"}],"format":"esm"},"src/mount/hoverTrigger.ts":{"bytes":1885,"imports":[],"format":"esm"},"src/Popover/mountHoverPopover.ts":{"bytes":1727,"imports":[{"path":"src/mount/hoverTrigger.ts","kind":"import-statement","original":"../mount/hoverTrigger"},{"path":"src/Popover/showPopover.ts","kind":"import-statement","original":"./showPopover"}],"format":"esm"},"src/Popover/showPopoverPrompt.ts":{"bytes":785,"imports":[],"format":"esm"},"src/Popover/index.ts":{"bytes":984,"imports":[{"path":"src/Popover/Popover.torp","kind":"import-statement","original":"./Popover.torp"},{"path":"src/Popover/PopoverContentAnchored.torp","kind":"import-statement","original":"./PopoverContentAnchored.torp"},{"path":"src/Popover/PopoverContentContextual.torp","kind":"import-statement","original":"./PopoverContentContextual.torp"},{"path":"src/Popover/PopoverContentStatic.torp","kind":"import-statement","original":"./PopoverContentStatic.torp"},{"path":"src/Popover/PopoverOverlay.torp","kind":"import-statement","original":"./PopoverOverlay.torp"},{"path":"src/Popover/PopoverTrigger.torp","kind":"import-statement","original":"./PopoverTrigger.torp"},{"path":"src/Popover/PopoverTriggerContextual.torp","kind":"import-statement","original":"./PopoverTriggerContextual.torp"},{"path":"src/Popover/PopoverTriggerHover.torp","kind":"import-statement","original":"./PopoverTriggerHover.torp"},{"path":"src/Popover/mountClickPopover.ts","kind":"import-statement","original":"./mountClickPopover"},{"path":"src/Popover/mountContextPopover.ts","kind":"import-statement","original":"./mountContextPopover"},{"path":"src/Popover/mountHoverPopover.ts","kind":"import-statement","original":"./mountHoverPopover"},{"path":"src/Popover/showPopover.ts","kind":"import-statement","original":"./showPopover"},{"path":"src/Popover/showPopoverPrompt.ts","kind":"import-statement","original":"./showPopoverPrompt"}],"format":"esm"},"src/TabGroup/TabContent.torp":{"bytes":1035,"imports":[]},"src/TabGroup/TabGroup.torp":{"bytes":5920,"imports":[]},"src/TabGroup/TabHeader.torp":{"bytes":1388,"imports":[]},"src/TabGroup/TabList.torp":{"bytes":1278,"imports":[]},"src/TabGroup/TabTrigger.torp":{"bytes":1912,"imports":[]},"src/TabGroup/index.ts":{"bytes":274,"imports":[{"path":"src/TabGroup/TabContent.torp","kind":"import-statement","original":"./TabContent.torp"},{"path":"src/TabGroup/TabGroup.torp","kind":"import-statement","original":"./TabGroup.torp"},{"path":"src/TabGroup/TabHeader.torp","kind":"import-statement","original":"./TabHeader.torp"},{"path":"src/TabGroup/TabList.torp","kind":"import-statement","original":"./TabList.torp"},{"path":"src/TabGroup/TabTrigger.torp","kind":"import-statement","original":"./TabTrigger.torp"}],"format":"esm"}},"outputs":{"dist/motion.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":360},"dist/motion.js":{"imports":[],"exports":["fade"],"entryPoint":"src/motion.ts","inputs":{"src/motion/fade.ts":{"bytesInOutput":92},"src/motion.ts":{"bytesInOutput":0}},"bytes":149},"dist/Accordion-QRVUJYO4.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/Accordion.torp":{"bytesInOutput":5416}},"bytes":5416},"dist/AccordionContent-N2MX55UP.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionContent.torp":{"bytesInOutput":1220}},"bytes":1220},"dist/AccordionHeader-63PAFATF.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionHeader.torp":{"bytesInOutput":904}},"bytes":904},"dist/AccordionItem-OZM2RDTP.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionItem.torp":{"bytesInOutput":2448}},"bytes":2448},"dist/AccordionTrigger-A2BNI4UL.torp":{"imports":[],"exports":[],"inputs":{"src/Accordion/AccordionTrigger.torp":{"bytesInOutput":1846}},"bytes":1846},"dist/Accordion/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/Accordion/index.js":{"imports":[{"path":"dist/Accordion-QRVUJYO4.torp","kind":"file-loader"},{"path":"dist/AccordionContent-N2MX55UP.torp","kind":"file-loader"},{"path":"dist/AccordionHeader-63PAFATF.torp","kind":"file-loader"},{"path":"dist/AccordionItem-OZM2RDTP.torp","kind":"file-loader"},{"path":"dist/AccordionTrigger-A2BNI4UL.torp","kind":"file-loader"}],"exports":["Accordion","AccordionContent","AccordionHeader","AccordionItem","AccordionTrigger"],"entryPoint":"src/Accordion/index.ts","inputs":{"src/Accordion/Accordion.torp":{"bytesInOutput":54},"src/Accordion/AccordionContent.torp":{"bytesInOutput":68},"src/Accordion/AccordionHeader.torp":{"bytesInOutput":66},"src/Accordion/AccordionItem.torp":{"bytesInOutput":62},"src/Accordion/AccordionTrigger.torp":{"bytesInOutput":68},"src/Accordion/index.ts":{"bytesInOutput":0}},"bytes":735},"dist/Dialog-MXD6FCTC.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/Dialog.torp":{"bytesInOutput":4423}},"bytes":4423},"dist/DialogBody-AGHBYC75.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/DialogBody.torp":{"bytesInOutput":971}},"bytes":971},"dist/DialogButton-RLATFTMQ.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/DialogButton.torp":{"bytesInOutput":1470}},"bytes":1470},"dist/DialogFooter-RRRHATC4.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/DialogFooter.torp":{"bytesInOutput":261}},"bytes":261},"dist/DialogHeader-SP44TBW2.torp":{"imports":[],"exports":[],"inputs":{"src/Dialog/DialogHeader.torp":{"bytesInOutput":966}},"bytes":966},"dist/Dialog/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/Dialog/index.js":{"imports":[{"path":"dist/Dialog-MXD6FCTC.torp","kind":"file-loader"},{"path":"dist/DialogBody-AGHBYC75.torp","kind":"file-loader"},{"path":"dist/DialogButton-RLATFTMQ.torp","kind":"file-loader"},{"path":"dist/DialogFooter-RRRHATC4.torp","kind":"file-loader"},{"path":"dist/DialogHeader-SP44TBW2.torp","kind":"file-loader"}],"exports":["Dialog","DialogBody","DialogButton","DialogFooter","DialogHeader"],"entryPoint":"src/Dialog/index.ts","inputs":{"src/Dialog/Dialog.torp":{"bytesInOutput":48},"src/Dialog/DialogBody.torp":{"bytesInOutput":56},"src/Dialog/DialogButton.torp":{"bytesInOutput":60},"src/Dialog/DialogFooter.torp":{"bytesInOutput":60},"src/Dialog/DialogHeader.torp":{"bytesInOutput":60},"src/Dialog/index.ts":{"bytesInOutput":0}},"bytes":635},"dist/NavMenu-UJCM4WXB.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenu.torp":{"bytesInOutput":4116}},"bytes":4116},"dist/NavMenuButton-RMKLDWBU.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuButton.torp":{"bytesInOutput":1238}},"bytes":1238},"dist/NavMenuElement-PV4LVXYB.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuElement.torp":{"bytesInOutput":1222}},"bytes":1222},"dist/NavMenuGroup-OMQVOQWO.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuGroup.torp":{"bytesInOutput":717}},"bytes":717},"dist/NavMenuGroupHeader-AATDD4TU.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuGroupHeader.torp":{"bytesInOutput":789}},"bytes":789},"dist/NavMenuLink-NKOAOAKK.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuLink.torp":{"bytesInOutput":1436}},"bytes":1436},"dist/NavMenuPopout-XSEJCS65.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuPopout.torp":{"bytesInOutput":1477}},"bytes":1477},"dist/NavMenuPopoutButton-54RVYQIZ.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuPopoutButton.torp":{"bytesInOutput":3119}},"bytes":3119},"dist/NavMenuPopoutContent-2PY5VBAN.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuPopoutContent.torp":{"bytesInOutput":2398}},"bytes":2398},"dist/NavMenuSeparator-4CEIKZRA.torp":{"imports":[],"exports":[],"inputs":{"src/NavMenu/NavMenuSeparator.torp":{"bytesInOutput":282}},"bytes":282},"dist/NavMenu/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/NavMenu/index.js":{"imports":[{"path":"dist/NavMenu-UJCM4WXB.torp","kind":"file-loader"},{"path":"dist/NavMenuButton-RMKLDWBU.torp","kind":"file-loader"},{"path":"dist/NavMenuElement-PV4LVXYB.torp","kind":"file-loader"},{"path":"dist/NavMenuGroup-OMQVOQWO.torp","kind":"file-loader"},{"path":"dist/NavMenuGroupHeader-AATDD4TU.torp","kind":"file-loader"},{"path":"dist/NavMenuLink-NKOAOAKK.torp","kind":"file-loader"},{"path":"dist/NavMenuPopout-XSEJCS65.torp","kind":"file-loader"},{"path":"dist/NavMenuPopoutButton-54RVYQIZ.torp","kind":"file-loader"},{"path":"dist/NavMenuPopoutContent-2PY5VBAN.torp","kind":"file-loader"},{"path":"dist/NavMenuSeparator-4CEIKZRA.torp","kind":"file-loader"}],"exports":["NavMenu","NavMenuButton","NavMenuElement","NavMenuGroup","NavMenuGroupHeader","NavMenuLink","NavMenuPopout","NavMenuPopoutButton","NavMenuPopoutContent","NavMenuSeparator"],"entryPoint":"src/NavMenu/index.ts","inputs":{"src/NavMenu/NavMenu.torp":{"bytesInOutput":50},"src/NavMenu/NavMenuButton.torp":{"bytesInOutput":62},"src/NavMenu/NavMenuElement.torp":{"bytesInOutput":64},"src/NavMenu/NavMenuGroup.torp":{"bytesInOutput":60},"src/NavMenu/NavMenuGroupHeader.torp":{"bytesInOutput":72},"src/NavMenu/NavMenuLink.torp":{"bytesInOutput":58},"src/NavMenu/NavMenuPopout.torp":{"bytesInOutput":62},"src/NavMenu/NavMenuPopoutButton.torp":{"bytesInOutput":74},"src/NavMenu/NavMenuPopoutContent.torp":{"bytesInOutput":76},"src/NavMenu/NavMenuSeparator.torp":{"bytesInOutput":68},"src/NavMenu/index.ts":{"bytesInOutput":0}},"bytes":1465},"dist/Popover-YHGYEB4G.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/Popover.torp":{"bytesInOutput":2903}},"bytes":2903},"dist/PopoverContentAnchored-DS57DKKY.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverContentAnchored.torp":{"bytesInOutput":3306}},"bytes":3306},"dist/PopoverContentContextual-INQC2C2C.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverContentContextual.torp":{"bytesInOutput":2993}},"bytes":2993},"dist/PopoverContentStatic-I7PGGQDK.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverContentStatic.torp":{"bytesInOutput":2152}},"bytes":2152},"dist/PopoverOverlay-LSEZJUMZ.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverOverlay.torp":{"bytesInOutput":862}},"bytes":862},"dist/PopoverTrigger-U7VM7RNB.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverTrigger.torp":{"bytesInOutput":700}},"bytes":700},"dist/PopoverTriggerContextual-S32VBOKW.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverTriggerContextual.torp":{"bytesInOutput":1188}},"bytes":1188},"dist/PopoverTriggerHover-YHR4DOTU.torp":{"imports":[],"exports":[],"inputs":{"src/Popover/PopoverTriggerHover.torp":{"bytesInOutput":814}},"bytes":814},"dist/Popover/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":11644},"dist/Popover/index.js":{"imports":[{"path":"dist/Popover-YHGYEB4G.torp","kind":"file-loader"},{"path":"dist/PopoverContentAnchored-DS57DKKY.torp","kind":"file-loader"},{"path":"dist/PopoverContentContextual-INQC2C2C.torp","kind":"file-loader"},{"path":"dist/PopoverContentStatic-I7PGGQDK.torp","kind":"file-loader"},{"path":"dist/PopoverOverlay-LSEZJUMZ.torp","kind":"file-loader"},{"path":"dist/PopoverTrigger-U7VM7RNB.torp","kind":"file-loader"},{"path":"dist/PopoverTriggerContextual-S32VBOKW.torp","kind":"file-loader"},{"path":"dist/PopoverTriggerHover-YHR4DOTU.torp","kind":"file-loader"}],"exports":["Popover","PopoverContentAnchored","PopoverContentContextual","PopoverContentStatic","PopoverOverlay","PopoverTrigger","PopoverTriggerContextual","PopoverTriggerHover","clickPopover","contextPopover","hoverPopover","showPopover","showPopoverPrompt"],"entryPoint":"src/Popover/index.ts","inputs":{"src/Popover/Popover.torp":{"bytesInOutput":50},"src/Popover/PopoverContentAnchored.torp":{"bytesInOutput":80},"src/Popover/PopoverContentContextual.torp":{"bytesInOutput":84},"src/Popover/PopoverContentStatic.torp":{"bytesInOutput":76},"src/Popover/PopoverOverlay.torp":{"bytesInOutput":64},"src/Popover/PopoverTrigger.torp":{"bytesInOutput":64},"src/Popover/PopoverTriggerContextual.torp":{"bytesInOutput":84},"src/Popover/PopoverTriggerHover.torp":{"bytesInOutput":74},"src/Popover/showPopover.ts":{"bytesInOutput":190},"src/Popover/mountClickPopover.ts":{"bytesInOutput":566},"src/Popover/mountContextPopover.ts":{"bytesInOutput":580},"src/mount/hoverTrigger.ts":{"bytesInOutput":1345},"src/Popover/mountHoverPopover.ts":{"bytesInOutput":943},"src/Popover/showPopoverPrompt.ts":{"bytesInOutput":221},"src/Popover/index.ts":{"bytesInOutput":0}},"bytes":5464},"dist/TabContent-F2PXYZ4M.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabContent.torp":{"bytesInOutput":1035}},"bytes":1035},"dist/TabGroup-JFP4Z5EQ.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabGroup.torp":{"bytesInOutput":5920}},"bytes":5920},"dist/TabHeader-EBSLHWGA.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabHeader.torp":{"bytesInOutput":1388}},"bytes":1388},"dist/TabList-5U65GJ6Y.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabList.torp":{"bytesInOutput":1278}},"bytes":1278},"dist/TabTrigger-4QPQTTIR.torp":{"imports":[],"exports":[],"inputs":{"src/TabGroup/TabTrigger.torp":{"bytesInOutput":1912}},"bytes":1912},"dist/TabGroup/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/TabGroup/index.js":{"imports":[{"path":"dist/TabContent-F2PXYZ4M.torp","kind":"file-loader"},{"path":"dist/TabGroup-JFP4Z5EQ.torp","kind":"file-loader"},{"path":"dist/TabHeader-EBSLHWGA.torp","kind":"file-loader"},{"path":"dist/TabList-5U65GJ6Y.torp","kind":"file-loader"},{"path":"dist/TabTrigger-4QPQTTIR.torp","kind":"file-loader"}],"exports":["TabContent","TabGroup","TabHeader","TabList","TabTrigger"],"entryPoint":"src/TabGroup/index.ts","inputs":{"src/TabGroup/TabContent.torp":{"bytesInOutput":56},"src/TabGroup/TabGroup.torp":{"bytesInOutput":52},"src/TabGroup/TabHeader.torp":{"bytesInOutput":54},"src/TabGroup/TabList.torp":{"bytesInOutput":50},"src/TabGroup/TabTrigger.torp":{"bytesInOutput":56},"src/TabGroup/index.ts":{"bytesInOutput":0}},"bytes":605}}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function disableScroll(): () => void {
|
|
2
|
+
// Remember body styles
|
|
3
|
+
const overflowX = document.body.style.overflowY;
|
|
4
|
+
const overflowY = document.body.style.overflowY;
|
|
5
|
+
const overscrollBehaviourX = document.body.style.overscrollBehaviorX;
|
|
6
|
+
const overscrollBehaviourY = document.body.style.overscrollBehaviorY;
|
|
7
|
+
const marginRight = document.body.style.marginRight;
|
|
8
|
+
|
|
9
|
+
// Get scrollbar width (if visible) so that we can set a margin to avoid things jumping around
|
|
10
|
+
// HACK: Does this work in all browsers/systems?
|
|
11
|
+
const scrollBarWidth = window.innerWidth - document.body.clientWidth;
|
|
12
|
+
|
|
13
|
+
// Set body styles to disallow scrolling
|
|
14
|
+
document.body.style.overflowY = "hidden";
|
|
15
|
+
document.body.style.overflowY = "hidden";
|
|
16
|
+
document.body.style.overscrollBehaviorX = "contain";
|
|
17
|
+
document.body.style.overscrollBehaviorY = "contain";
|
|
18
|
+
document.body.style.marginRight = scrollBarWidth + "px";
|
|
19
|
+
|
|
20
|
+
return () => {
|
|
21
|
+
// Reset body styles
|
|
22
|
+
document.body.style.overflowY = overflowX;
|
|
23
|
+
document.body.style.overflowY = overflowY;
|
|
24
|
+
document.body.style.overscrollBehaviorX = overscrollBehaviourX;
|
|
25
|
+
document.body.style.overscrollBehaviorY = overscrollBehaviourY;
|
|
26
|
+
document.body.style.marginRight = marginRight;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
interface HoverTriggerOptions {
|
|
2
|
+
onHover: (node: HTMLElement, e: TouchEvent | MouseEvent) => void;
|
|
3
|
+
onExit?: (node: HTMLElement, e: TouchEvent | MouseEvent) => void;
|
|
4
|
+
hoverDelay?: number;
|
|
5
|
+
touchDelay?: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default function hoverTrigger(node: HTMLElement, options: HoverTriggerOptions): () => void {
|
|
9
|
+
const { onHover, onExit } = options;
|
|
10
|
+
const hoverDelay = options.hoverDelay || 1000;
|
|
11
|
+
const touchDelay = options.touchDelay || 1000;
|
|
12
|
+
|
|
13
|
+
let interval: NodeJS.Timeout | undefined;
|
|
14
|
+
|
|
15
|
+
// Add click event handlers to the node
|
|
16
|
+
node.addEventListener("mouseenter", handleMouseEnter);
|
|
17
|
+
node.addEventListener("mouseleave", handleMouseLeave);
|
|
18
|
+
node.addEventListener("mousemove", handleMouseMove);
|
|
19
|
+
node.addEventListener("touchstart", handleMouseEnter);
|
|
20
|
+
node.addEventListener("touchend", handleMouseLeave);
|
|
21
|
+
|
|
22
|
+
function handleMouseEnter(e: MouseEvent | TouchEvent) {
|
|
23
|
+
// Handle the hover after a delay
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
if (!interval) {
|
|
26
|
+
const delay = e.type.startsWith("mouse") ? hoverDelay : touchDelay;
|
|
27
|
+
interval = setTimeout(() => onHover(node, e), delay);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function handleMouseLeave(e: MouseEvent | TouchEvent) {
|
|
32
|
+
// Prevent short hovers or touches from firing the event
|
|
33
|
+
if (interval) {
|
|
34
|
+
clearTimeout(interval);
|
|
35
|
+
interval = undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (onExit) {
|
|
39
|
+
onExit(node, e);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function handleMouseMove(e: MouseEvent) {
|
|
44
|
+
// Reset the interval on mouse move
|
|
45
|
+
if (interval) {
|
|
46
|
+
clearTimeout(interval);
|
|
47
|
+
interval = setTimeout(() => onHover(node, e), hoverDelay);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Remove the event listeners from the node on destroy
|
|
52
|
+
return () => {
|
|
53
|
+
node.removeEventListener("mouseenter", handleMouseEnter);
|
|
54
|
+
node.removeEventListener("mouseleave", handleMouseLeave);
|
|
55
|
+
node.removeEventListener("mousemove", handleMouseMove);
|
|
56
|
+
node.removeEventListener("touchstart", handleMouseEnter);
|
|
57
|
+
node.removeEventListener("touchend", handleMouseLeave);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface TrapFocusOptions {
|
|
2
|
+
focusableElements: HTMLElement[];
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function trapFocus(node: HTMLElement, options?: TrapFocusOptions): () => void {
|
|
6
|
+
options = options || { focusableElements: [] };
|
|
7
|
+
|
|
8
|
+
// Selectors for all things that are focusable:
|
|
9
|
+
const focusableSelectors = [
|
|
10
|
+
"a[href]",
|
|
11
|
+
"area[href]",
|
|
12
|
+
'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
|
|
13
|
+
"select:not([disabled]):not([aria-hidden])",
|
|
14
|
+
"textarea:not([disabled]):not([aria-hidden])",
|
|
15
|
+
"button:not([disabled]):not([aria-hidden])",
|
|
16
|
+
"iframe",
|
|
17
|
+
"object",
|
|
18
|
+
"embed",
|
|
19
|
+
"[contenteditable]",
|
|
20
|
+
'[tabindex]:not([tabindex^="-"])',
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
// Set the focusable elements array in the options, which can be used in the caller e.g. to focus the first element
|
|
24
|
+
options.focusableElements = Array.from(node.querySelectorAll(focusableSelectors.join()));
|
|
25
|
+
|
|
26
|
+
// Store first and last focusable elements
|
|
27
|
+
const firstFocusableElement = options.focusableElements[0] as HTMLElement;
|
|
28
|
+
const lastFocusableElement = options.focusableElements[
|
|
29
|
+
options.focusableElements.length - 1
|
|
30
|
+
] as HTMLElement;
|
|
31
|
+
|
|
32
|
+
// Add the keydown event listener to the node
|
|
33
|
+
node.addEventListener("keydown", handleKey);
|
|
34
|
+
|
|
35
|
+
// On Tab or Shift+Tab, move through the focusable elements, wrapping at either end
|
|
36
|
+
function handleKey(e: KeyboardEvent) {
|
|
37
|
+
if (e.key === "Tab") {
|
|
38
|
+
if (e.shiftKey) {
|
|
39
|
+
if (document.activeElement === firstFocusableElement) {
|
|
40
|
+
// Shift + Tab on the first element, so move to the last one
|
|
41
|
+
lastFocusableElement.focus();
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
if (document.activeElement === lastFocusableElement) {
|
|
46
|
+
// Tab on the last element, so move to the first one
|
|
47
|
+
firstFocusableElement.focus();
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Remove the keydown event listener from the node on destroy
|
|
55
|
+
return () => {
|
|
56
|
+
node.removeEventListener("keydown", handleKey);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function addDocumentEvent<K extends keyof DocumentEventMap>(
|
|
2
|
+
type: K,
|
|
3
|
+
listener: (this: Document, ev: DocumentEventMap[K]) => any
|
|
4
|
+
): void {
|
|
5
|
+
if (typeof document !== 'undefined') {
|
|
6
|
+
document.addEventListener(type, listener);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function removeDocumentEvent<K extends keyof DocumentEventMap>(
|
|
11
|
+
type: K,
|
|
12
|
+
listener: (this: Document, ev: DocumentEventMap[K]) => any
|
|
13
|
+
): void {
|
|
14
|
+
if (typeof document !== 'undefined') {
|
|
15
|
+
document.removeEventListener(type, listener);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// From https://stackoverflow.com/a/76535387
|
|
2
|
+
export default function getScrollParent(node: Element): Element {
|
|
3
|
+
let currentParent = node.parentElement;
|
|
4
|
+
while (currentParent) {
|
|
5
|
+
if (isScrollable(currentParent)) {
|
|
6
|
+
return currentParent;
|
|
7
|
+
}
|
|
8
|
+
currentParent = currentParent.parentElement;
|
|
9
|
+
}
|
|
10
|
+
return document.scrollingElement || document.documentElement;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function isScrollable(node: Element): boolean {
|
|
14
|
+
if (!(node instanceof HTMLElement || node instanceof SVGElement)) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
const style = getComputedStyle(node);
|
|
18
|
+
return ["overflow", "overflow-x", "overflow-y"].some((propertyName) => {
|
|
19
|
+
const value = style.getPropertyValue(propertyName);
|
|
20
|
+
return value === "auto" || value === "scroll";
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export default function setContextPosition(
|
|
7
|
+
anchor: HTMLElement,
|
|
8
|
+
content: HTMLElement,
|
|
9
|
+
position: Point,
|
|
10
|
+
): void {
|
|
11
|
+
var anchorRect = anchor.getBoundingClientRect();
|
|
12
|
+
var contentRect = content.getBoundingClientRect();
|
|
13
|
+
|
|
14
|
+
content.style.position = "fixed";
|
|
15
|
+
|
|
16
|
+
// Try to make sure the content is entirely on the screen horizontally
|
|
17
|
+
// Just move it left or right -- the pointer is outside the content vertically so moving it left
|
|
18
|
+
// or right won't make the content appear over the cursor
|
|
19
|
+
let left = anchorRect.left + position.x;
|
|
20
|
+
left = Math.min(left, window.innerWidth - contentRect.width);
|
|
21
|
+
left = Math.max(left, 0);
|
|
22
|
+
content.style.left = left + "px";
|
|
23
|
+
|
|
24
|
+
// Try to make sure the content is entirely on the screen vertically
|
|
25
|
+
// Show it above the position if it wouldn't fit
|
|
26
|
+
let top = anchorRect.top + position.y;
|
|
27
|
+
if (top + contentRect.height > window.innerHeight) {
|
|
28
|
+
top -= contentRect.height;
|
|
29
|
+
}
|
|
30
|
+
content.style.top = top + "px";
|
|
31
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export default function setPopoverPosition(
|
|
2
|
+
anchor: HTMLElement,
|
|
3
|
+
content: HTMLElement,
|
|
4
|
+
side: "top" | "right" | "bottom" | "left",
|
|
5
|
+
alignment: "start" | "center" | "end",
|
|
6
|
+
): void {
|
|
7
|
+
var anchorRect = anchor.getBoundingClientRect();
|
|
8
|
+
var contentRect = content.getBoundingClientRect();
|
|
9
|
+
|
|
10
|
+
content.style.position = "fixed";
|
|
11
|
+
|
|
12
|
+
// Check that we there is enough room to show the content on the side requested
|
|
13
|
+
// Otherwise, if there is enough room on the other side, show it there instead
|
|
14
|
+
let calculatedSide = side;
|
|
15
|
+
const canShowOnTop = anchorRect.top - contentRect.height >= 0;
|
|
16
|
+
const canShowAtRight = anchorRect.right + contentRect.width <= window.innerWidth;
|
|
17
|
+
const canShowOnBottom = anchorRect.bottom + contentRect.height <= window.innerHeight;
|
|
18
|
+
const canShowAtLeft = anchorRect.left - contentRect.width >= 0;
|
|
19
|
+
switch (side) {
|
|
20
|
+
case "top": {
|
|
21
|
+
if (!canShowOnTop && canShowOnBottom) {
|
|
22
|
+
calculatedSide = "bottom";
|
|
23
|
+
}
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
case "right": {
|
|
27
|
+
if (!canShowAtRight && canShowAtLeft) {
|
|
28
|
+
calculatedSide = "left";
|
|
29
|
+
}
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case "bottom": {
|
|
33
|
+
if (!canShowOnBottom && canShowOnTop) {
|
|
34
|
+
calculatedSide = "top";
|
|
35
|
+
}
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
case "left": {
|
|
39
|
+
if (!canShowAtLeft && canShowAtRight) {
|
|
40
|
+
calculatedSide = "right";
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
default: {
|
|
45
|
+
throw new Error(`Invalid MenuPopout side: ${side}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
switch (calculatedSide) {
|
|
50
|
+
case "top": {
|
|
51
|
+
content.style.top = anchorRect.top - contentRect.height + "px";
|
|
52
|
+
setVerticalAlignment(content, anchorRect, contentRect, alignment);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case "right": {
|
|
56
|
+
content.style.left = anchorRect.right + "px";
|
|
57
|
+
setHorizontalAlignment(content, anchorRect, contentRect, alignment);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
case "bottom": {
|
|
61
|
+
content.style.top = anchorRect.bottom + "px";
|
|
62
|
+
setVerticalAlignment(content, anchorRect, contentRect, alignment);
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case "left": {
|
|
66
|
+
content.style.left = anchorRect.left - contentRect.width + "px";
|
|
67
|
+
setHorizontalAlignment(content, anchorRect, contentRect, alignment);
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
default: {
|
|
71
|
+
throw new Error(`Invalid MenuPopout side: ${side}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function setVerticalAlignment(
|
|
77
|
+
content: HTMLElement,
|
|
78
|
+
anchorRect: DOMRect,
|
|
79
|
+
contentRect: DOMRect,
|
|
80
|
+
alignment: "start" | "center" | "end",
|
|
81
|
+
) {
|
|
82
|
+
let left = 0;
|
|
83
|
+
switch (alignment) {
|
|
84
|
+
case "start": {
|
|
85
|
+
left = anchorRect.left;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
case "center": {
|
|
89
|
+
left = anchorRect.left + anchorRect.width / 2 - contentRect.width / 2;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case "end": {
|
|
93
|
+
left = anchorRect.right - contentRect.width;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
default: {
|
|
97
|
+
throw new Error(`Invalid Popout alignment: ${alignment}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Try to make sure the content is entirely on the screen horizontally
|
|
102
|
+
left = Math.min(left, window.innerWidth - contentRect.width);
|
|
103
|
+
left = Math.max(left, 0);
|
|
104
|
+
|
|
105
|
+
content.style.left = left + "px";
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function setHorizontalAlignment(
|
|
109
|
+
content: HTMLElement,
|
|
110
|
+
anchorRect: DOMRect,
|
|
111
|
+
contentRect: DOMRect,
|
|
112
|
+
alignment: "start" | "center" | "end",
|
|
113
|
+
) {
|
|
114
|
+
let top = 0;
|
|
115
|
+
switch (alignment) {
|
|
116
|
+
case "start": {
|
|
117
|
+
top = anchorRect.top;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
case "center": {
|
|
121
|
+
top = anchorRect.top + anchorRect.height / 2 - contentRect.height / 2;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
case "end": {
|
|
125
|
+
top = anchorRect.bottom - contentRect.height;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
default: {
|
|
129
|
+
throw new Error(`Invalid Popout alignment: ${alignment}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Try to make sure the content is entirely on the screen vertically
|
|
134
|
+
top = Math.min(top, window.innerHeight - contentRect.height);
|
|
135
|
+
top = Math.max(top, 0);
|
|
136
|
+
|
|
137
|
+
content.style.top = top + "px";
|
|
138
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@torpor/ui",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Accessible, unstyled components for use in your Torpor front-end",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -12,6 +12,21 @@
|
|
|
12
12
|
"import": "./dist/Accordion/index.js",
|
|
13
13
|
"require": "./dist/Accordion/index.cjs"
|
|
14
14
|
},
|
|
15
|
+
"./Dialog": {
|
|
16
|
+
"types": "./dist/Dialog/index.d.ts",
|
|
17
|
+
"import": "./dist/Dialog/index.js",
|
|
18
|
+
"require": "./dist/Dialog/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./NavMenu": {
|
|
21
|
+
"types": "./dist/NavMenu/index.d.ts",
|
|
22
|
+
"import": "./dist/NavMenu/index.js",
|
|
23
|
+
"require": "./dist/NavMenu/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./Popover": {
|
|
26
|
+
"types": "./dist/Popover/index.d.ts",
|
|
27
|
+
"import": "./dist/Popover/index.js",
|
|
28
|
+
"require": "./dist/Popover/index.cjs"
|
|
29
|
+
},
|
|
15
30
|
"./TabGroup": {
|
|
16
31
|
"types": "./dist/TabGroup/index.d.ts",
|
|
17
32
|
"import": "./dist/TabGroup/index.js",
|
|
@@ -35,18 +50,18 @@
|
|
|
35
50
|
"@testing-library/user-event": "^14.6.1",
|
|
36
51
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
37
52
|
"@types/jsdom": "^21.1.7",
|
|
38
|
-
"@types/node": "^22.15.
|
|
53
|
+
"@types/node": "^22.15.21",
|
|
39
54
|
"chalk": "^5.4.1",
|
|
40
55
|
"esno": "^4.8.0",
|
|
41
56
|
"fast-glob": "^3.3.3",
|
|
42
57
|
"jsdom": "^26.1.0",
|
|
43
|
-
"tsup": "^8.
|
|
58
|
+
"tsup": "^8.5.0",
|
|
44
59
|
"typescript": "^5.8.3",
|
|
45
|
-
"vitest": "^3.1.
|
|
60
|
+
"vitest": "^3.1.4"
|
|
46
61
|
},
|
|
47
62
|
"dependencies": {
|
|
48
|
-
"@torpor/
|
|
49
|
-
"@torpor/
|
|
63
|
+
"@torpor/view": "^0.1.0",
|
|
64
|
+
"@torpor/unplugin": "^0.1.11"
|
|
50
65
|
},
|
|
51
66
|
"scripts": {
|
|
52
67
|
"build": "tsc --noEmit && tsup",
|
package/scripts/postbuild.ts
CHANGED
|
@@ -35,7 +35,13 @@ async function run() {
|
|
|
35
35
|
let relatedFiles = (await fs.readdir(join(sourceFolder, component)))
|
|
36
36
|
.filter((f) => f.endsWith(".torp") && f !== component)
|
|
37
37
|
.map((f) => basename(f, ".torp"))
|
|
38
|
-
.map((f) =>
|
|
38
|
+
.map((f) => {
|
|
39
|
+
const output = distFiles.find((df) => df.startsWith(`${f}-`) && df.endsWith(".torp"));
|
|
40
|
+
if (!output) {
|
|
41
|
+
console.log("FILE NOT FOUND:", f, distFiles);
|
|
42
|
+
}
|
|
43
|
+
return output!;
|
|
44
|
+
});
|
|
39
45
|
for (let file of relatedFiles) {
|
|
40
46
|
const newfile = file.substring(0, file.indexOf("-")) + ".torp";
|
|
41
47
|
await fs.rename(join(distFolder, file), join(distFolder, component, newfile));
|
|
@@ -52,16 +58,22 @@ async function run() {
|
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
// Move all utils/*.ts files into the dest folder
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
moveUtils(distFolder, "utils");
|
|
62
|
+
moveUtils(distFolder, "mount");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function moveUtils(distFolder: string, folderName: string) {
|
|
66
|
+
// Move all utils/*.ts files into the dest folder
|
|
67
|
+
if (!existsSync(join(distFolder, folderName))) {
|
|
68
|
+
await fs.mkdir(join(distFolder, folderName));
|
|
57
69
|
}
|
|
58
70
|
|
|
59
|
-
const utilsFolder = resolve(distFolder, "..", "src",
|
|
71
|
+
const utilsFolder = resolve(distFolder, "..", "src", folderName);
|
|
60
72
|
const utilsFiles = (await fs.readdir(utilsFolder)).filter(
|
|
61
73
|
(f) => f.endsWith(".ts") && f !== "index.ts",
|
|
62
74
|
);
|
|
63
75
|
for (const file of utilsFiles) {
|
|
64
|
-
await fs.copyFile(join(utilsFolder, file), join(distFolder,
|
|
76
|
+
await fs.copyFile(join(utilsFolder, file), join(distFolder, folderName, file));
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
79
|
|