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.18.2 to 0.18.3

7

dist/builders/collapsible/create.d.ts

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

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

@@ -13,7 +13,8 @@ trigger: import("../../internal/helpers").BuilderReturn<[import("svelte/store").Writable<boolean>, import("svelte/store").Writable<boolean>], (node: HTMLElement) => {

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

@@ -20,0 +21,0 @@ }, string>;

@@ -16,3 +16,3 @@ import { addEventListener, builder, createElHelpers } from '../../internal/helpers';

'data-state': $open ? 'open' : 'closed',
'data-disabled': options.disabled ? true : 'undefined',
'data-disabled': options.disabled ? '' : 'undefined',
}),

@@ -24,6 +24,10 @@ });

'data-state': $open ? 'open' : 'closed',
'data-disabled': $disabled ? true : undefined,
'data-disabled': $disabled ? '' : undefined,
disabled: $disabled ? '' : undefined,
}),
action: (node) => {
const unsub = addEventListener(node, 'click', () => {
const disabled = node.dataset.disabled !== undefined;
if (disabled)
return;
open.update(($open) => !$open);

@@ -40,3 +44,3 @@ });

'data-state': $open ? 'open' : 'closed',
'data-disabled': $disabled ? true : undefined,
'data-disabled': $disabled ? '' : undefined,
hidden: $open ? undefined : true,

@@ -43,0 +47,0 @@ }),

@@ -107,3 +107,3 @@ import { usePopper } from '../../internal/actions/popper';

*/
const isKeyDownInside = target.closest(selector()) === menuElement;
const isKeyDownInside = target.closest('[role="menu"]') === menuElement;
if (!isKeyDownInside)

@@ -582,2 +582,5 @@ return;

e.preventDefault();
rootActiveTrigger.set(null);
rootOpen.set(false);
handleTabNavigation(e, nextFocusable, prevFocusable);
return;

@@ -1038,3 +1041,4 @@ }

export function getMenuItems(menuElement) {
return Array.from(menuElement.querySelectorAll(`[data-melt-menu-id="${menuElement.id}"]`));
const menuItems = Array.from(menuElement.querySelectorAll(`[data-melt-menu-id="${menuElement.id}"]`));
return menuItems;
}

@@ -1041,0 +1045,0 @@ export function applyAttrsIfDisabled(element) {

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

*/
const isKeyDownInside = target.closest('[data-melt-menubar-menu]') === menuElement;
const isKeyDownInside = target.closest('[role="menu"]') === menuElement;
if (!isKeyDownInside)

@@ -111,0 +111,0 @@ return;

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

const candidateItems = items.filter((item) => {
if (item.hasAttribute('disabled')) {
if (item.getAttribute('disabled') === 'true' ||
item.getAttribute('aria-disabled') === 'true') {
return false;

@@ -32,0 +33,0 @@ }

{
"name": "@melt-ui/svelte",
"version": "0.18.2",
"version": "0.18.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "exports": {

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