ui-ingredients 0.18.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,5 @@
1
- export declare const getPortalProviderPropsContext: () => {
2
- container?: HTMLElement;
3
- } | undefined, setPortalProviderPropsContext: (context: {
4
- container?: HTMLElement;
5
- } | (() => {
6
- container?: HTMLElement;
7
- })) => void;
1
+ interface PortalProviderProps {
2
+ container?: HTMLElement | null;
3
+ }
4
+ export declare const getPortalProviderPropsContext: () => PortalProviderProps | undefined, setPortalProviderPropsContext: (context: PortalProviderProps | (() => PortalProviderProps)) => void;
5
+ export {};
@@ -3,7 +3,7 @@
3
3
  import {setPortalProviderPropsContext} from './portal-context.svelte.js';
4
4
 
5
5
  export interface PortalProviderProps {
6
- container?: HTMLElement;
6
+ container?: HTMLElement | null;
7
7
  children?: Snippet;
8
8
  }
9
9
  </script>
@@ -1,6 +1,6 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  export interface PortalProviderProps {
3
- container?: HTMLElement;
3
+ container?: HTMLElement | null;
4
4
  children?: Snippet;
5
5
  }
6
6
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
@@ -4,7 +4,7 @@
4
4
 
5
5
  interface PortalActionProps {
6
6
  disabled?: boolean;
7
- container?: HTMLElement;
7
+ container?: HTMLElement | null;
8
8
  }
9
9
 
10
10
  export interface PortalProps
@@ -30,8 +30,11 @@
30
30
 
31
31
  <div
32
32
  use:portal={{
33
- ...portalProviderProps,
34
- ...portalActionProps,
33
+ container:
34
+ portalActionProps.container ??
35
+ portalProviderProps?.container ??
36
+ undefined,
37
+ disabled: portalActionProps.disabled ?? false,
35
38
  getRootNode: environment?.getRootNode,
36
39
  }}
37
40
  {...localProps}
@@ -2,7 +2,7 @@ import type { Assign } from '../types.js';
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
3
  interface PortalActionProps {
4
4
  disabled?: boolean;
5
- container?: HTMLElement;
5
+ container?: HTMLElement | null;
6
6
  }
7
7
  export interface PortalProps extends Assign<SvelteHTMLElements['div'], PortalActionProps> {
8
8
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ui-ingredients",
3
3
  "type": "module",
4
4
  "license": "MIT",
5
- "version": "0.18.0",
5
+ "version": "0.18.1",
6
6
  "packageManager": "pnpm@9.14.4",
7
7
  "svelte": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",