New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@umbraco-ui/uui-base

Package Overview
Dependencies
Maintainers
5
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umbraco-ui/uui-base - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0-rc.0

lib/utils/drag.d.ts

2

lib/mixins/ActiveMixin.d.ts
import { LitElement } from 'lit';
declare type Constructor<T = {}> = new (...args: any[]) => T;
type Constructor<T = {}> = new (...args: any[]) => T;
export declare class ActiveMixinInterface {

@@ -4,0 +4,0 @@ active: boolean;

import { LitElement } from 'lit';
declare type Constructor<T = {}> = new (...args: any[]) => T;
declare type NativeFormControlElement = HTMLInputElement;
type Constructor<T = {}> = new (...args: any[]) => T;
type NativeFormControlElement = HTMLInputElement;
export declare abstract class FormControlMixinInterface extends LitElement {

@@ -26,3 +26,3 @@ formAssociated: boolean;

}
declare type FlagTypes = 'badInput' | 'customError' | 'patternMismatch' | 'rangeOverflow' | 'rangeUnderflow' | 'stepMismatch' | 'tooLong' | 'tooShort' | 'typeMismatch' | 'valueMissing' | 'badInput' | 'valid';
type FlagTypes = 'badInput' | 'customError' | 'patternMismatch' | 'rangeOverflow' | 'rangeUnderflow' | 'stepMismatch' | 'tooLong' | 'tooShort' | 'typeMismatch' | 'valueMissing' | 'badInput' | 'valid';
/**

@@ -29,0 +29,0 @@ * The mixin allows a custom element to participate in HTML forms.

import { LitElement, TemplateResult } from 'lit';
declare type Constructor<T = {}> = new (...args: any[]) => T;
type Constructor<T = {}> = new (...args: any[]) => T;
export declare class LabelMixinInterface {

@@ -4,0 +4,0 @@ label: string;

import { LitElement } from 'lit';
declare type Constructor<T = {}> = new (...args: any[]) => T;
type Constructor<T = {}> = new (...args: any[]) => T;
export declare class SelectableMixinInterface extends LitElement {

@@ -4,0 +4,0 @@ selectable: boolean;

import { SelectableMixinInterface } from './SelectableMixin';
declare type Constructor<T = {}> = new (...args: any[]) => T;
type Constructor<T = {}> = new (...args: any[]) => T;
export declare class SelectOnlyMixinInterface extends SelectableMixinInterface {

@@ -4,0 +4,0 @@ selectOnly: boolean;

export declare const InterfaceColorValues: Readonly<InterfaceColor[]>;
export declare type InterfaceColor = '' | 'default' | 'positive' | 'warning' | 'danger';
export type InterfaceColor = '' | 'default' | 'positive' | 'warning' | 'danger';
export declare const InterfaceLookValues: Readonly<InterfaceLook[]>;
export declare type InterfaceLook = '' | 'default' | 'primary' | 'secondary' | 'outline' | 'placeholder';
export type InterfaceLook = '' | 'default' | 'primary' | 'secondary' | 'outline' | 'placeholder';
export * from './Timer';
export * from './demandCustomElement';
export * from './drag';
export * from './math';

@@ -62,2 +62,39 @@ class Timer {

export { Timer, demandCustomElement };
const drag = (container, options) => {
function move(pointerEvent) {
const dims = container.getBoundingClientRect();
const defaultView = container.ownerDocument.defaultView;
const offsetX = dims.left + defaultView.pageXOffset;
const offsetY = dims.top + defaultView.pageYOffset;
const x = pointerEvent.pageX - offsetX;
const y = pointerEvent.pageY - offsetY;
if (options == null ? void 0 : options.onMove) {
options.onMove(x, y);
}
}
function stop() {
document.removeEventListener("pointermove", move);
document.removeEventListener("pointerup", stop);
if (options == null ? void 0 : options.onStop) {
options.onStop();
}
}
document.addEventListener("pointermove", move, { passive: true });
document.addEventListener("pointerup", stop);
if (options == null ? void 0 : options.initialEvent) {
move(options.initialEvent);
}
};
const clamp = (value, min, max) => {
return Math.min(Math.max(value, min), max);
};
const reverseNumberInRange = (num, min, max) => {
return max + min - num;
};
const toHex = (value) => {
const hex = Math.round(value).toString(16);
return hex.length === 1 ? `0${hex}` : hex;
};
export { Timer, clamp, demandCustomElement, drag, reverseNumberInRange, toHex };
{
"name": "@umbraco-ui/uui-base",
"version": "1.1.0",
"version": "1.2.0-rc.0",
"license": "MIT",

@@ -40,3 +40,3 @@ "keywords": [

"homepage": "https://uui.umbraco.com/?path=/story/uui-base",
"gitHead": "5159a81e353c893c30073cdbf2fdd94306477d6e"
"gitHead": "43f1b9a8bd1721af30ba7c145517ee665d874df3"
}
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