Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@melt-ui/svelte

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@melt-ui/svelte - npm Package Compare versions

Comparing version 0.47.6 to 0.48.0

dist/internal/helpers/attr.d.ts

10

dist/builders/accordion/create.js

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, createElHelpers, executeCallbacks, generateId, getElementByMeltId, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, createElHelpers, executeCallbacks, generateId, getElementByMeltId, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, disabledAttr, } from '../../internal/helpers/index.js';
import { tick } from 'svelte';

@@ -57,3 +57,3 @@ import { derived, writable } from 'svelte/store';

'data-state': isSelected(itemValue, $value) ? 'open' : 'closed',
'data-disabled': disabled ? true : undefined,
'data-disabled': disabledAttr(disabled),
};

@@ -71,6 +71,6 @@ };

return {
disabled: $disabled || disabled,
disabled: disabledAttr($disabled || disabled),
'aria-expanded': isSelected(itemValue, $value) ? true : false,
'aria-disabled': disabled ? true : false,
'data-disabled': disabled ? true : undefined,
'data-disabled': disabledAttr(disabled),
'data-value': itemValue,

@@ -140,3 +140,3 @@ 'data-state': isSelected(itemValue, $value) ? 'open' : 'closed',

'data-state': isVisible ? 'open' : 'closed',
'data-disabled': $disabled ? true : undefined,
'data-disabled': disabledAttr($disabled),
'data-value': itemValue,

@@ -143,0 +143,0 @@ hidden: isVisible ? undefined : true,

@@ -12,3 +12,3 @@ /// <reference types="svelte" />

}, import("svelte/store").Writable<boolean>, import("svelte/store").Writable<boolean>], (node: HTMLElement) => MeltActionReturn<CheckboxEvents['root']>, ([$checked, $disabled, $required]: [boolean | "indeterminate", boolean, boolean]) => {
readonly 'data-disabled': boolean;
readonly 'data-disabled': true | undefined;
readonly 'data-state': "indeterminate" | "checked" | "unchecked";

@@ -33,3 +33,3 @@ readonly type: "button";

readonly required: boolean;
readonly disabled: boolean;
readonly disabled: true | undefined;
readonly style: string;

@@ -36,0 +36,0 @@ }, "checkbox-input">;

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, executeCallbacks, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, disabledAttr, executeCallbacks, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { derived, get, writable } from 'svelte/store';

@@ -21,3 +21,3 @@ const defaults = {

return {
'data-disabled': $disabled,
'data-disabled': disabledAttr($disabled),
'data-state': $checked === 'indeterminate' ? 'indeterminate' : $checked ? 'checked' : 'unchecked',

@@ -61,3 +61,3 @@ type: 'button',

required: $required,
disabled: $disabled,
disabled: disabledAttr($disabled),
style: styleToString({

@@ -64,0 +64,0 @@ position: 'absolute',

@@ -13,3 +13,3 @@ /// <reference types="svelte" />

'data-state': string;
'data-disabled': string;
'data-disabled': boolean | undefined;
}, string>;

@@ -22,8 +22,8 @@ trigger: import("../../internal/helpers/index.js").ExplicitBuilderReturn<[{

readonly 'data-state': "open" | "closed";
readonly 'data-disabled': "" | undefined;
readonly disabled: boolean;
readonly 'data-disabled': true | undefined;
readonly disabled: true | undefined;
}, string>;
content: import("../../internal/helpers/index.js").ExplicitBuilderReturn<[import("svelte/store").Readable<boolean>, import("svelte/store").Writable<boolean>], import("svelte/action").Action<any, any, Record<never, any>>, ([$isVisible, $disabled]: [boolean, boolean]) => {
'data-state': string;
'data-disabled': string | undefined;
'data-disabled': boolean | undefined;
hidden: boolean | undefined;

@@ -30,0 +30,0 @@ style: string;

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, createElHelpers, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, createElHelpers, disabledAttr, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { derived, writable } from 'svelte/store';

@@ -19,3 +19,3 @@ const defaults = {

'data-state': $open ? 'open' : 'closed',
'data-disabled': $disabled ? '' : 'undefined',
'data-disabled': disabledAttr($disabled),
}),

@@ -27,4 +27,4 @@ });

'data-state': $open ? 'open' : 'closed',
'data-disabled': $disabled ? '' : undefined,
disabled: $disabled,
'data-disabled': disabledAttr($disabled),
disabled: disabledAttr($disabled),
}),

@@ -48,3 +48,3 @@ action: (node) => {

'data-state': $isVisible ? 'open' : 'closed',
'data-disabled': $disabled ? '' : undefined,
'data-disabled': disabledAttr($disabled),
hidden: $isVisible ? undefined : true,

@@ -51,0 +51,0 @@ style: styleToString({

@@ -84,3 +84,3 @@ /// <reference types="svelte" />

readonly 'data-label': string | undefined;
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'aria-disabled': true | undefined;

@@ -87,0 +87,0 @@ readonly 'aria-selected': boolean;

import { useEscapeKeydown, usePopper } from '../../internal/actions/index.js';
import { FIRST_LAST_KEYS, addHighlight, addMeltEventListener, back, builder, createClickOutsideIgnore, createElHelpers, derivedVisible, effect, executeCallbacks, forward, generateId, getElementByMeltId, getOptions, getPortalDestination, isBrowser, isElementDisabled, isHTMLElement, isHTMLInputElement, kbd, last, next, noop, omit, overridable, prev, removeHighlight, removeScroll, sleep, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { FIRST_LAST_KEYS, addHighlight, addMeltEventListener, back, builder, createClickOutsideIgnore, createElHelpers, derivedVisible, disabledAttr, effect, executeCallbacks, forward, generateId, getElementByMeltId, getOptions, getPortalDestination, isBrowser, isElementDisabled, isHTMLElement, isHTMLInputElement, kbd, last, next, noop, omit, overridable, prev, removeHighlight, removeScroll, sleep, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { debounceable } from '../../internal/helpers/store/index.js';

@@ -450,3 +450,3 @@ import { dequal as deepEqual } from 'dequal';

'data-label': props.label,
'data-disabled': props.disabled ? '' : undefined,
'data-disabled': disabledAttr(props.disabled),
'aria-disabled': props.disabled ? true : undefined,

@@ -453,0 +453,0 @@ 'aria-selected': selected,

@@ -69,3 +69,3 @@ /// <reference types="svelte" />

readonly 'data-state': "open" | "closed";
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'aria-haspopop': "menu";

@@ -118,3 +118,3 @@ }, string>;

readonly 'aria-checked': "true" | "mixed" | "false";
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'data-state': "indeterminate" | "checked" | "unchecked";

@@ -148,3 +148,3 @@ }, string>;

'aria-checked': boolean;
'data-disabled': string | undefined;
'data-disabled': boolean | undefined;
'data-value': string;

@@ -151,0 +151,0 @@ 'data-orientation': string;

@@ -64,3 +64,3 @@ /// <reference types="svelte" />

readonly 'aria-checked': "true" | "mixed" | "false";
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'data-state': "indeterminate" | "checked" | "unchecked";

@@ -89,3 +89,3 @@ }, string>;

readonly 'data-state': "open" | "closed";
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'aria-haspopop': "menu";

@@ -141,3 +141,3 @@ }, string>;

'aria-checked': boolean;
'data-disabled': string | undefined;
'data-disabled': boolean | undefined;
'data-value': string;

@@ -144,0 +144,0 @@ 'data-orientation': string;

@@ -66,3 +66,3 @@ /// <reference types="svelte" />

readonly 'aria-checked': "true" | "mixed" | "false";
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'data-state': "indeterminate" | "checked" | "unchecked";

@@ -91,3 +91,3 @@ }, string>;

readonly 'data-state': "open" | "closed";
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'aria-haspopop': "menu";

@@ -143,3 +143,3 @@ }, string>;

'aria-checked': boolean;
'data-disabled': string | undefined;
'data-disabled': boolean | undefined;
'data-value': string;

@@ -146,0 +146,0 @@ 'data-orientation': string;

import { createSeparator } from '../index.js';
import { usePopper } from '../../internal/actions/index.js';
import { FIRST_LAST_KEYS, SELECTION_KEYS, addEventListener, addHighlight, addMeltEventListener, builder, createElHelpers, createTypeaheadSearch, derivedVisible, derivedWithUnsubscribe, effect, executeCallbacks, generateId, getNextFocusable, getPortalDestination, getPreviousFocusable, handleRovingFocus, isBrowser, isElementDisabled, isHTMLElement, kbd, noop, overridable, removeHighlight, removeScroll, sleep, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { FIRST_LAST_KEYS, SELECTION_KEYS, addEventListener, addHighlight, addMeltEventListener, builder, createElHelpers, createTypeaheadSearch, derivedVisible, derivedWithUnsubscribe, disabledAttr, effect, executeCallbacks, generateId, getNextFocusable, getPortalDestination, getPreviousFocusable, handleRovingFocus, isBrowser, isElementDisabled, isHTMLElement, kbd, noop, overridable, removeHighlight, removeScroll, sleep, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { onMount, tick } from 'svelte';

@@ -298,3 +298,3 @@ import { derived, get, writable } from 'svelte/store';

'aria-checked': isIndeterminate($checked) ? 'mixed' : $checked ? 'true' : 'false',
'data-disabled': $disabled ? '' : undefined,
'data-disabled': disabledAttr($disabled),
'data-state': getCheckedState($checked),

@@ -395,3 +395,3 @@ };

'aria-checked': checked,
'data-disabled': disabled ? '' : undefined,
'data-disabled': disabledAttr(disabled),
'data-value': itemValue,

@@ -655,3 +655,3 @@ 'data-orientation': 'vertical',

'data-state': $subOpen ? 'open' : 'closed',
'data-disabled': $disabled ? '' : undefined,
'data-disabled': disabledAttr($disabled),
'aria-haspopop': 'menu',

@@ -658,0 +658,0 @@ };

@@ -77,3 +77,3 @@ /// <reference types="svelte" />

readonly 'aria-checked': "true" | "mixed" | "false";
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'data-state': "indeterminate" | "checked" | "unchecked";

@@ -102,3 +102,3 @@ }, string>;

readonly 'data-state': "open" | "closed";
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly 'aria-haspopop': "menu";

@@ -154,3 +154,3 @@ }, string>;

'aria-checked': boolean;
'data-disabled': string | undefined;
'data-disabled': boolean | undefined;
'data-value': string;

@@ -157,0 +157,0 @@ 'data-orientation': string;

@@ -22,3 +22,3 @@ /// <reference types="svelte" />

placeholder: string;
disabled: boolean;
disabled: boolean | undefined;
type: string;

@@ -25,0 +25,0 @@ value: string;

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, createElHelpers, executeCallbacks, generateId, isBrowser, isHTMLElement, isHTMLInputElement, last, next, omit, overridable, prev, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, createElHelpers, disabledAttr, executeCallbacks, generateId, isBrowser, isHTMLElement, isHTMLInputElement, last, next, omit, overridable, prev, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { tick } from 'svelte';

@@ -63,3 +63,3 @@ import { derived, get, readonly, writable } from 'svelte/store';

placeholder: $placeholder,
disabled: $disabled,
disabled: disabledAttr($disabled),
type: $type,

@@ -66,0 +66,0 @@ value: currValue,

@@ -34,3 +34,3 @@ /// <reference types="svelte" />

tabindex: number;
disabled: boolean;
disabled: boolean | undefined;
value: string;

@@ -37,0 +37,0 @@ required: boolean;

@@ -1,2 +0,2 @@

import { addEventListener, addMeltEventListener, builder, createElHelpers, effect, executeCallbacks, getDirectionalKeys, getElemDirection, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { addEventListener, addMeltEventListener, builder, createElHelpers, disabledAttr, effect, executeCallbacks, getDirectionalKeys, getElemDirection, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { onMount } from 'svelte';

@@ -75,3 +75,3 @@ import { derived, get, writable } from 'svelte/store';

'data-orientation': $orientation,
'data-disabled': disabled ? true : undefined,
'data-disabled': disabledAttr(disabled),
'data-state': checked ? 'checked' : 'unchecked',

@@ -145,3 +145,3 @@ 'aria-checked': checked,

tabindex: -1,
disabled: $disabled,
disabled: disabledAttr($disabled),
value: $value,

@@ -148,0 +148,0 @@ required: $required,

@@ -29,4 +29,4 @@ /// <reference types="svelte" />

readonly 'aria-labelledby': string;
readonly disabled: true | undefined;
readonly 'data-melt-id': string;
readonly disabled: boolean;
readonly id: string;

@@ -45,3 +45,3 @@ readonly tabindex: 0;

readonly 'data-label': string | undefined;
readonly 'data-disabled': "" | undefined;
readonly 'data-disabled': true | undefined;
readonly tabindex: -1;

@@ -61,3 +61,3 @@ }, string>;

required: boolean;
disabled: boolean;
disabled: boolean | undefined;
style: string;

@@ -64,0 +64,0 @@ }, string>;

import { createLabel, createSeparator } from '../index.js';
import { usePopper } from '../../internal/actions/index.js';
import { FIRST_LAST_KEYS, SELECTION_KEYS, addEventListener, addHighlight, addMeltEventListener, back, builder, createClickOutsideIgnore, createElHelpers, createTypeaheadSearch, derivedVisible, effect, executeCallbacks, forward, generateId, getFirstOption, getNextFocusable, getOptions, getPortalDestination, getPreviousFocusable, handleRovingFocus, isBrowser, isElementDisabled, isHTMLElement, kbd, last, next, noop, omit, overridable, prev, removeHighlight, removeScroll, sleep, styleToString, toWritableStores, toggle, } from '../../internal/helpers/index.js';
import { FIRST_LAST_KEYS, SELECTION_KEYS, addEventListener, addHighlight, addMeltEventListener, back, builder, createClickOutsideIgnore, createElHelpers, createTypeaheadSearch, derivedVisible, disabledAttr, effect, executeCallbacks, forward, generateId, getFirstOption, getNextFocusable, getOptions, getPortalDestination, getPreviousFocusable, handleRovingFocus, isBrowser, isElementDisabled, isHTMLElement, kbd, last, next, noop, omit, overridable, prev, removeHighlight, removeScroll, sleep, styleToString, toWritableStores, toggle, } from '../../internal/helpers/index.js';
import { dequal as deepEqual } from 'dequal';

@@ -268,6 +268,6 @@ import { onMount, tick } from 'svelte';

'data-state': $open ? 'open' : 'closed',
'data-disabled': $disabled ? true : undefined,
'data-disabled': disabledAttr($disabled),
'aria-labelledby': ids.label,
disabled: disabledAttr($disabled),
'data-melt-id': ids.trigger,
disabled: $disabled,
id: ids.trigger,

@@ -427,3 +427,3 @@ tabindex: 0,

'data-label': props.label ?? undefined,
'data-disabled': props.disabled ? '' : undefined,
'data-disabled': disabledAttr(props.disabled),
tabindex: -1,

@@ -511,3 +511,3 @@ };

required: $required,
disabled: $disabled,
disabled: disabledAttr($disabled),
style: styleToString({

@@ -514,0 +514,0 @@ position: 'absolute',

@@ -8,3 +8,3 @@ /// <reference types="svelte" />

root: import("../../internal/helpers/index.js").ExplicitBuilderReturn<[import("svelte/store").Writable<boolean>, import("svelte/store").Writable<"horizontal" | "vertical">], import("svelte/action").Action<any, any, Record<never, any>>, ([$disabled, $orientation]: [boolean, "horizontal" | "vertical"]) => {
disabled: boolean;
disabled: boolean | undefined;
'data-orientation': "horizontal" | "vertical";

@@ -11,0 +11,0 @@ style: string | undefined;

@@ -1,2 +0,2 @@

import { addEventListener, addMeltEventListener, builder, createElHelpers, effect, executeCallbacks, generateId, getElementByMeltId, isBrowser, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { addEventListener, addMeltEventListener, builder, createElHelpers, disabledAttr, effect, executeCallbacks, generateId, getElementByMeltId, isBrowser, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { add, sub, div, mul } from './helpers.js';

@@ -29,3 +29,3 @@ import { derived, get, writable } from 'svelte/store';

return {
disabled: $disabled,
disabled: disabledAttr($disabled),
'data-orientation': $orientation,

@@ -32,0 +32,0 @@ style: $disabled ? undefined : 'touch-action: none;',

@@ -12,4 +12,4 @@ /// <reference types="svelte" />

}, import("svelte/store").Writable<boolean>, import("svelte/store").Writable<boolean>], <Node_1 extends any>(node: HTMLElement) => MeltActionReturn<SwitchEvents['root']>, ([$checked, $disabled, $required]: [boolean, boolean, boolean]) => {
readonly 'data-disabled': boolean;
readonly disabled: boolean;
readonly 'data-disabled': true | undefined;
readonly disabled: true | undefined;
readonly 'data-state': "checked" | "unchecked";

@@ -34,3 +34,3 @@ readonly type: "button";

readonly required: boolean;
readonly disabled: boolean;
readonly disabled: true | undefined;
readonly style: string;

@@ -37,0 +37,0 @@ }, string>;

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, createElHelpers, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, createElHelpers, disabledAttr, kbd, omit, overridable, styleToString, toWritableStores, } from '../../internal/helpers/index.js';
import { get, writable } from 'svelte/store';

@@ -27,4 +27,4 @@ import { executeCallbacks } from '../../internal/helpers/callbacks.js';

return {
'data-disabled': $disabled,
disabled: $disabled,
'data-disabled': disabledAttr($disabled),
disabled: disabledAttr($disabled),
'data-state': $checked ? 'checked' : 'unchecked',

@@ -63,3 +63,3 @@ type: 'button',

required: $required,
disabled: $disabled,
disabled: disabledAttr($disabled),
style: styleToString({

@@ -66,0 +66,0 @@ position: 'absolute',

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, createElHelpers, executeCallbacks, getDirectionalKeys, getElemDirection, isBrowser, isHTMLElement, kbd, last, next, omit, overridable, prev, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, createElHelpers, disabledAttr, executeCallbacks, getDirectionalKeys, getElemDirection, isBrowser, isHTMLElement, kbd, last, next, omit, overridable, prev, toWritableStores, } from '../../internal/helpers/index.js';
import { get, writable } from 'svelte/store';

@@ -64,4 +64,4 @@ const defaults = {

'data-orientation': $orientation,
'data-disabled': disabled ? true : undefined,
disabled,
'data-disabled': disabledAttr(disabled),
disabled: disabledAttr(disabled),
};

@@ -68,0 +68,0 @@ };

@@ -10,8 +10,8 @@ /// <reference types="svelte" />

readonly 'data-disabled': true | undefined;
readonly disabled: boolean;
readonly disabled: true | undefined;
}, string>;
input: import("../../internal/helpers/index.js").ExplicitBuilderReturn<[import("svelte/store").Writable<boolean>, import("svelte/store").Writable<string>], (node: HTMLInputElement) => MeltActionReturn<TagsInputEvents['input']>, ([$disabled, $placeholder]: [boolean, string]) => {
'data-melt-id': string;
'data-disabled': string | undefined;
disabled: boolean;
'data-disabled': boolean | undefined;
disabled: boolean | undefined;
placeholder: string;

@@ -25,3 +25,3 @@ }, string>;

'data-editing': string | undefined;
'data-disabled': string | undefined;
'data-disabled': boolean | undefined;
disabled: boolean | undefined;

@@ -47,3 +47,3 @@ tabindex: number;

'data-editing': string | undefined;
'data-disabled': string | undefined;
'data-disabled': boolean | undefined;
disabled: boolean | undefined;

@@ -50,0 +50,0 @@ hidden: boolean | undefined;

@@ -1,2 +0,2 @@

import { builder, createElHelpers, effect, executeCallbacks, generateId, getElementByMeltId, isBrowser, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, addMeltEventListener, } from '../../internal/helpers/index.js';
import { builder, createElHelpers, effect, executeCallbacks, generateId, getElementByMeltId, isBrowser, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, addMeltEventListener, disabledAttr, } from '../../internal/helpers/index.js';
import { derived, get, readonly, writable } from 'svelte/store';

@@ -176,4 +176,4 @@ import { focusInput, highlightText, setSelectedFromEl } from './helpers.js';

'data-melt-id': ids.root,
'data-disabled': $disabled ? true : undefined,
disabled: $disabled,
'data-disabled': disabledAttr($disabled),
disabled: disabledAttr($disabled),
};

@@ -202,4 +202,4 @@ },

'data-melt-id': ids.input,
'data-disabled': $disabled ? '' : undefined,
disabled: $disabled,
'data-disabled': disabledAttr($disabled),
disabled: disabledAttr($disabled),
placeholder: $placeholder,

@@ -420,4 +420,4 @@ };

'data-editing': editing ? '' : undefined,
'data-disabled': disabled ? '' : undefined,
disabled: disabled,
'data-disabled': disabledAttr(disabled),
disabled: disabledAttr(disabled),
hidden: editing,

@@ -503,4 +503,4 @@ tabindex: -1,

'data-editing': editing ? '' : undefined,
'data-disabled': disabled ? '' : undefined,
disabled: disabled,
'data-disabled': disabledAttr(disabled),
disabled: disabledAttr(disabled),
tabindex: -1,

@@ -507,0 +507,0 @@ };

@@ -16,3 +16,3 @@ /// <reference types="svelte" />

}, import("svelte/store").Writable<boolean>, import("svelte/store").Writable<import("../../internal/types.js").Orientation>, import("svelte/store").Writable<"single" | T>], (node: HTMLElement) => MeltActionReturn<ToggleGroupEvents['item']>, ([$value, $disabled, $orientation, $type]: [string | string[] | undefined, boolean, import("../../internal/types.js").Orientation, "single" | T]) => (props: ToggleGroupItemProps) => {
readonly disabled: boolean;
readonly disabled: true | undefined;
readonly pressed: boolean;

@@ -19,0 +19,0 @@ readonly 'data-orientation': import("../../internal/types.js").Orientation;

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, createElHelpers, executeCallbacks, getElemDirection, handleRovingFocus, isHTMLElement, kbd, noop, omit, overridable, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, createElHelpers, disabledAttr, executeCallbacks, getElemDirection, handleRovingFocus, isHTMLElement, kbd, noop, omit, overridable, toWritableStores, } from '../../internal/helpers/index.js';
import { derived, get, writable } from 'svelte/store';

@@ -41,6 +41,6 @@ const defaults = {

return {
disabled,
disabled: disabledAttr(disabled),
pressed,
'data-orientation': $orientation,
'data-disabled': disabled ? true : undefined,
'data-disabled': disabledAttr(disabled),
'data-state': pressed ? 'on' : 'off',

@@ -47,0 +47,0 @@ 'data-value': itemValue,

@@ -13,3 +13,3 @@ /// <reference types="svelte" />

readonly 'data-disabled': true | undefined;
readonly disabled: boolean;
readonly disabled: true | undefined;
readonly 'data-state': "on" | "off";

@@ -16,0 +16,0 @@ readonly 'aria-pressed': boolean;

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, executeCallbacks, kbd, omit, overridable, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, disabledAttr, executeCallbacks, kbd, omit, overridable, toWritableStores, } from '../../internal/helpers/index.js';
import { get, writable } from 'svelte/store';

@@ -23,4 +23,4 @@ const defaults = {

return {
'data-disabled': $disabled ? true : undefined,
disabled: $disabled,
'data-disabled': disabledAttr($disabled),
disabled: disabledAttr($disabled),
'data-state': $pressed ? 'on' : 'off',

@@ -27,0 +27,0 @@ 'aria-pressed': $pressed,

@@ -39,3 +39,3 @@ /// <reference types="svelte" />

}, import("svelte/store").Writable<import("../../internal/types.js").Orientation>], (node: HTMLElement) => MeltActionReturn<ToolbarEvents['item']>, ([$disabled, $type, $value, $orientation]: [boolean, "single" | T, string | string[] | undefined, import("../../internal/types.js").Orientation]) => (props: ToolbarGroupItemProps) => {
readonly disabled: boolean;
readonly disabled: true | undefined;
readonly pressed: boolean;

@@ -42,0 +42,0 @@ readonly 'data-orientation': import("../../internal/types.js").Orientation;

@@ -1,2 +0,2 @@

import { addMeltEventListener, builder, createElHelpers, executeCallbacks, handleRovingFocus, isHTMLElement, kbd, overridable, toWritableStores, } from '../../internal/helpers/index.js';
import { addMeltEventListener, builder, createElHelpers, disabledAttr, executeCallbacks, handleRovingFocus, isHTMLElement, kbd, overridable, toWritableStores, } from '../../internal/helpers/index.js';
import { derived, get, writable } from 'svelte/store';

@@ -91,6 +91,6 @@ const defaults = {

return {
disabled,
disabled: disabledAttr(disabled),
pressed,
'data-orientation': $orientation,
'data-disabled': disabled ? true : undefined,
'data-disabled': disabledAttr(disabled),
'data-value': itemValue,

@@ -97,0 +97,0 @@ 'data-state': pressed ? 'on' : 'off',

@@ -43,3 +43,4 @@ /// <reference types="svelte" />

closeOnPointerDown: import("svelte/store").Writable<boolean>;
disableHoverableContent: import("svelte/store").Writable<boolean>;
};
};

@@ -17,2 +17,3 @@ import { addEventListener, addMeltEventListener, builder, createElHelpers, derivedVisible, effect, executeCallbacks, generateId, getPortalDestination, isBrowser, isTouch, kbd, makeHullFromElements, noop, omit, overridable, pointInPolygon, styleToString, toWritableStores, } from '../../internal/helpers/index.js';

closeOnEscape: true,
disableHoverableContent: false,
};

@@ -23,3 +24,3 @@ const { name } = createElHelpers('tooltip');

const options = toWritableStores(omit(withDefaults, 'open'));
const { positioning, arrowSize, closeOnPointerDown, openDelay, closeDelay, forceVisible, portal, closeOnEscape, } = options;
const { positioning, arrowSize, closeOnPointerDown, openDelay, closeDelay, forceVisible, portal, closeOnEscape, disableHoverableContent, } = options;
const openWritable = withDefaults.open ?? writable(withDefaults.defaultOpen);

@@ -184,3 +185,4 @@ const open = overridable(openWritable, withDefaults?.onOpenChange);

return;
const polygon = makeHullFromElements([$activeTrigger, contentEl]);
const polygonElements = get(disableHoverableContent) ? [$activeTrigger] : [$activeTrigger, contentEl];
const polygon = makeHullFromElements(polygonElements);
isMouseInTooltipArea = pointInPolygon({

@@ -187,0 +189,0 @@ x: e.clientX,

@@ -18,2 +18,3 @@ import type { FloatingConfig } from '../../internal/actions/index.js';

closeOnEscape?: boolean;
disableHoverableContent?: boolean;
/**

@@ -20,0 +21,0 @@ * If not undefined, the tooltip will be rendered within the provided element or selector.

export * from './array.js';
export * from './attr.js';
export * from './builder.js';

@@ -3,0 +4,0 @@ export * from './dom.js';

export * from './array.js';
export * from './attr.js';
export * from './builder.js';

@@ -3,0 +4,0 @@ export * from './dom.js';

{
"name": "@melt-ui/svelte",
"version": "0.47.6",
"version": "0.48.0",
"license": "MIT",
"repository": "github:melt-ui/melt-ui",
"exports": {

@@ -76,3 +77,2 @@ ".": {

"@typescript-eslint/parser": "^5.62.0",
"@vercel/analytics": "^1.0.1",
"@vitest/coverage-v8": "^0.33.0",

@@ -86,2 +86,3 @@ "autoprefixer": "^10.4.14",

"eslint-plugin-svelte": "^2.33.0",
"fathom-client": "^3.5.0",
"glob": "^9.3.2",

@@ -88,0 +89,0 @@ "happy-dom": "^10.5.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc