Socket
Socket
Sign inDemoInstall

@chasi/ui

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chasi/ui - npm Package Compare versions

Comparing version 0.2.80 to 0.2.81

42

dist/Actions/draggable.js

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

import { BROWSER } from 'esm-env';
import pannable from './pannable.js';
if (BROWSER) {
if (!document.querySelector('#draggable-styles')) {
const style = document.createElement('style');
style.setAttribute('id', 'draggable-styles');
style.innerHTML = `
[data-draggable-item].ghost {
position: fixed;
top: 0;
left: 0;
pointer-events: none;
transition: none;
z-index: 9999;
box-shadow: var(--shadow-4);
}
:where([data-draggable-item].dragged) {
opacity: 0;
transition: none !important;
animation: none !important;
pointer-events: none;
}`;
document.getElementsByTagName('head')[0].appendChild(style);
}
}
export default function (node, { onStart, onMove, onEnd, handlerSelector }) {

@@ -67,3 +43,9 @@ let ghostElement = null;

const clone = node.cloneNode(true);
clone.classList.add('ghost');
clone.style.position = 'fixed';
clone.style.top = '0';
clone.style.left = '0';
clone.style.pointerEvents = 'none';
clone.style.transition = 'none';
clone.style.zIndex = '9999';
clone.style.boxShadow = 'var(--shadow-4)';
clone.style.width = `${width}px`;

@@ -75,3 +57,6 @@ clone.style.height = `${height}px`;

document.body.append(clone);
node.classList.add('dragged');
node.style.opacity = '0';
node.style.transition = 'none';
node.style.animation = 'none';
node.style.pointerEvents = 'none';
return {

@@ -89,3 +74,6 @@ update(dx, dy) {

clone.remove();
node.classList.remove('dragged');
node.style.opacity = '';
node.style.transition = '';
node.style.animation = '';
node.style.pointerEvents = '';
}, duration);

@@ -92,0 +80,0 @@ }

{
"name": "@chasi/ui",
"version": "0.2.80",
"version": "0.2.81",
"bin": {

@@ -5,0 +5,0 @@ "gen-theme": "./dist/bin/theme.js"

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