feat(portal): support portal

This commit is contained in:
Eric Liu 2025-04-13 13:48:44 -07:00
commit 1ddd9ba1a5
14 changed files with 240 additions and 2 deletions

View file

@ -30,6 +30,7 @@
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
"@floating-ui/dom": "^1.6.13",
"@ibm/telemetry-js": "^1.5.0",
"flatpickr": "4.6.9"
},

View file

@ -1,5 +1,5 @@
{
"total": 165,
"total": 167,
"components": [
{
"moduleName": "Accordion",
@ -5241,6 +5241,16 @@
"name": "div | button | svg"
}
},
{
"moduleName": "FloatingPortal",
"filePath": "src/Portal/FloatingPortal.svelte",
"props": [],
"moduleExports": [],
"slots": [],
"events": [],
"typedefs": [],
"generics": null
},
{
"moduleName": "FluidForm",
"filePath": "src/FluidForm/FluidForm.svelte",
@ -10851,6 +10861,22 @@
"name": "div"
}
},
{
"moduleName": "Portal",
"filePath": "src/Portal/Portal.svelte",
"props": [],
"moduleExports": [],
"slots": [
{
"name": "__default__",
"default": true,
"slot_props": "{}"
}
],
"events": [],
"typedefs": [],
"generics": null
},
{
"moduleName": "ProgressBar",
"filePath": "src/ProgressBar/ProgressBar.svelte",

View file

@ -0,0 +1,8 @@
<script>
import { Portal } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
</script>
## Default
<FileSource src="/framed/Portal/BasicPortal" />

View file

@ -0,0 +1,6 @@
<script>
import { Portal } from "carbon-components-svelte";
</script>
<Portal>Hello world</Portal>
<Portal>Another portal</Portal>