ui-ingredients 0.18.0 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.2",
6
6
  "packageManager": "pnpm@9.14.4",
7
7
  "svelte": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -23,6 +23,10 @@
23
23
  "types": "./dist/alert-dialog/index.d.ts",
24
24
  "svelte": "./dist/alert-dialog/index.js"
25
25
  },
26
+ "./angle-slider": {
27
+ "types": "./dist/angle-slider/index.d.ts",
28
+ "svelte": "./dist/angle-slider/index.js"
29
+ },
26
30
  "./avatar": {
27
31
  "types": "./dist/avatar/index.d.ts",
28
32
  "svelte": "./dist/avatar/index.js"