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

@semcore/dropdown

Package Overview
Dependencies
Maintainers
1
Versions
312
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semcore/dropdown - npm Package Compare versions

Comparing version 2.0.1 to 2.0.6

lib/es6/es6/Dropdown.js

31

CHANGELOG.md

@@ -5,2 +5,33 @@ # Changelog

## [2.0.6] - 2020-09-30
### Fixed
- Add missing TS type properties in context
## [2.0.5] - 2020-09-08
### Fixed
- Fixed possible styles collisions between components with different versions, but same styles
## [2.0.4] - 2020-07-22
### Fixed
- Исправли проблему неправильного позиционирование `Dropdown.Popper` относительно триггера с заданным значением
`stretch` для `Dropdown`.
## [2.0.3] - 2020-07-06
### Changed
- Обновлена версия зависимости `@semcore/popper`
## [2.0.2] - 2020-06-10
### Fixed
- Исправлены TS типы
## [2.0.1] - 2020-06-08

@@ -7,0 +38,0 @@

21

lib/cjs/Dropdown.js

@@ -26,2 +26,4 @@ "use strict";

var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));

@@ -31,4 +33,2 @@

var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

@@ -48,3 +48,3 @@

function _createSuper(Derived) { return function () { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }

@@ -58,8 +58,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

/*__inner_css_start__*/
".___SDropdownPopper_1wedw_gg_{position:relative;background-color:#fff;border-radius:3px;border:1px solid #bdc4c6;box-sizing:border-box;box-shadow:0 2px 5px 0 rgba(0,0,0,.25),0 -2px 5px -2px rgba(0,0,0,.25);white-space:normal}"
".___SDropdownPopper_1q6et_gg_{position:relative;background-color:#fff;border-radius:3px;border:1px solid #bdc4c6;box-sizing:border-box;box-shadow:0 2px 5px 0 rgba(0,0,0,.25),0 -2px 5px -2px rgba(0,0,0,.25);white-space:normal}"
/*__inner_css_end__*/
, "yhlli1")
, "4haixu")
/*__reshadow_css_end__*/
, {
"__SDropdownPopper": "___SDropdownPopper_1wedw_gg_"
"__SDropdownPopper": "___SDropdownPopper_1q6et_gg_"
}),

@@ -88,4 +88,3 @@ style = (0, _extends2["default"])({}, _ref);

name: 'stretch',
phase: 'beforeWrite',
requires: ['computeStyles'],
phase: 'beforeRead',
enabled: true,

@@ -105,7 +104,9 @@ fn: function fn(_ref2) {

if (options.stretch === 'min') {
state.styles.popper["min".concat((0, _capitalizeFirstLetter["default"])(len))] = "".concat(referenceLen, "px");
state.rects.popper.width = Math.max(state.rects.popper.width, referenceLen);
state.elements.popper.style["min".concat((0, _capitalizeFirstLetter["default"])(len))] = "".concat(referenceLen, "px");
}
if (options.stretch === 'fixed') {
state.styles.popper[len] = "".concat(referenceLen, "px");
state.rects.popper.width = referenceLen;
state.elements.popper.style[len] = "".concat(referenceLen, "px");
}

@@ -112,0 +113,0 @@ }

@@ -1,21 +0,6 @@

import { IPopperContext } from '@semcore/popper/src';
import Popper, { IPopperProps } from '@semcore/popper';
import { ComponentProps } from 'react';
import { Merge } from '@semcore/core';
import Popper, { IPopperProps, IPopperContext } from '@semcore/popper';
export interface IDropdownProps extends IPopperProps {
/**
* Задержка для show/hide
* @default { show: 100, hide: 50 }
*/
/**
* События, переключающие состояние дропдауна
* @default { show: ['onClick'], hide: ['onClick'] }
*/
/**
* Расположение Dropdown.Popper
* @default bottom-start
*/
/**
* Отступ popper от trigger
* @default 4
*/
/**
* Модификатор отвечающие за размер всплывающего окна

@@ -36,5 +21,7 @@ * `fixed` - всплывающие окно такого же размера как триггер

declare const _default: import("@semcore/core").ComponentType<IDropdownProps, {
Trigger: typeof Popper.Trigger;
Popper: typeof Popper.Popper;
}, IDropdownContext>;
Trigger: ComponentProps<typeof Popper.Trigger>;
Popper: ComponentProps<typeof Popper.Popper>;
}, Merge<IDropdownContext, IDropdownProps>, {
[key: string]: (arg: unknown) => void;
}, null>;
export default _default;
{
"name": "@semcore/dropdown",
"description": "SEMRush Dropdown Component",
"version": "2.0.1",
"version": "2.0.6",
"main": "lib/cjs/index.js",

@@ -6,0 +6,0 @@ "module": "lib/es6/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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