@semcore/dropdown
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -5,6 +5,14 @@ # Changelog | ||
## [1.2.1] - 2019-09-30 | ||
## [1.2.2] - 2019-10-10 | ||
### Change | ||
- Обнавлены зависимости `popper`/`flex-box`/`utils` | ||
- Исправлен дефолтный триггер | ||
## [1.2.1] - 2019-09-30 | ||
### Changed | ||
- Нужные зависимости перенесены в `utils`, размер должен стать меньше | ||
@@ -11,0 +19,0 @@ |
import React, { PureComponent } from 'react'; | ||
import { IPopperPopperProps, IPopperProps, IPopperTriggerProps, Modifiers, Placement, PortalProvider } from '@semcore/popper'; | ||
import { IPopperPopperProps, IPopperProps, Modifiers, Placement, PortalProvider } from '@semcore/popper'; | ||
import { IBoxProps } from '@semcore/flex-box'; | ||
declare class DropdownTrigger extends React.PureComponent<IPopperTriggerProps & React.HTMLAttributes<any>> { | ||
export interface IDropdownTriggerProps extends IBoxProps, IPopperPopperProps { | ||
} | ||
declare class DropdownTrigger extends React.PureComponent<IDropdownTriggerProps & React.HTMLAttributes<any>> { | ||
render(): JSX.Element; | ||
} | ||
export interface IDropdownPopperProps extends IPopperPopperProps, IBoxProps { | ||
export interface IDropdownPopperProps extends IBoxProps, IPopperPopperProps { | ||
} | ||
@@ -9,0 +11,0 @@ declare class DropdownPopper extends React.PureComponent<IDropdownPopperProps & React.HTMLAttributes<HTMLDivElement>> { |
@@ -19,11 +19,2 @@ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized'; | ||
var data = { | ||
"block": { | ||
"block": "_dropdown_ovgf4_3", | ||
"out-of-boundaries": { | ||
"block": "_dropdown--out-of-boundaries_ovgf4_12" | ||
} | ||
} | ||
}; | ||
(function cssModulesFnInject(_path) { | ||
@@ -33,9 +24,10 @@ if (_path && typeof window !== 'undefined') { | ||
var prevStyle = head.querySelector('._css-style'); | ||
var css = "._dropdown_r85t8_3{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)}._dropdown--out-of-boundaries_r85t8_12{display:none}"; | ||
if (prevStyle && prevStyle.insertAdjacentText) { | ||
prevStyle.insertAdjacentText("beforeend", "._dropdown_ovgf4_3{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)}._dropdown--out-of-boundaries_ovgf4_12{display:none}"); | ||
prevStyle.insertAdjacentText("beforeend", css); | ||
} else { | ||
var style = window.document.createElement("style"); | ||
style.classList.add('_css-style'); | ||
style.innerHTML = "._dropdown_ovgf4_3{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)}._dropdown--out-of-boundaries_ovgf4_12{display:none}"; | ||
style.innerHTML = css; | ||
head.appendChild(style); | ||
@@ -47,8 +39,7 @@ } | ||
function block() { | ||
return data['block']['block']; | ||
return '_dropdown_r85t8_3'; | ||
} | ||
block['outOfBoundaries'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['out-of-boundaries'][value]; | ||
block['outOfBoundaries'] = function (value) { | ||
return "_dropdown--out-of-boundaries_r85t8_12"; | ||
}; | ||
@@ -99,3 +90,5 @@ | ||
return React.createElement(Popper.Trigger, Object.assign({ | ||
consumer: Consumer | ||
consumer: Consumer, | ||
tag: Box, | ||
inline: true | ||
}, this.props)); | ||
@@ -102,0 +95,0 @@ } |
@@ -26,11 +26,2 @@ 'use strict'; | ||
var data = { | ||
"block": { | ||
"block": "_dropdown_ovgf4_3", | ||
"out-of-boundaries": { | ||
"block": "_dropdown--out-of-boundaries_ovgf4_12" | ||
} | ||
} | ||
}; | ||
(function cssModulesFnInject(_path) { | ||
@@ -40,9 +31,10 @@ if (_path && typeof window !== 'undefined') { | ||
var prevStyle = head.querySelector('._css-style'); | ||
var css = "._dropdown_r85t8_3{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)}._dropdown--out-of-boundaries_r85t8_12{display:none}"; | ||
if (prevStyle && prevStyle.insertAdjacentText) { | ||
prevStyle.insertAdjacentText("beforeend", "._dropdown_ovgf4_3{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)}._dropdown--out-of-boundaries_ovgf4_12{display:none}"); | ||
prevStyle.insertAdjacentText("beforeend", css); | ||
} else { | ||
var style = window.document.createElement("style"); | ||
style.classList.add('_css-style'); | ||
style.innerHTML = "._dropdown_ovgf4_3{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)}._dropdown--out-of-boundaries_ovgf4_12{display:none}"; | ||
style.innerHTML = css; | ||
head.appendChild(style); | ||
@@ -54,8 +46,7 @@ } | ||
function block() { | ||
return data['block']['block']; | ||
return '_dropdown_r85t8_3'; | ||
} | ||
block['outOfBoundaries'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['out-of-boundaries'][value]; | ||
block['outOfBoundaries'] = function (value) { | ||
return "_dropdown--out-of-boundaries_r85t8_12"; | ||
}; | ||
@@ -106,3 +97,5 @@ | ||
return React__default.createElement(Popper__default.Trigger, Object.assign({ | ||
consumer: Consumer | ||
consumer: Consumer, | ||
tag: flexBox.Box, | ||
inline: true | ||
}, this.props)); | ||
@@ -109,0 +102,0 @@ } |
{ | ||
"name": "@semcore/dropdown", | ||
"description": "SEMRush Dropdown Component", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"main": "lib/index.js", | ||
@@ -12,8 +12,8 @@ "module": "lib/index.es.js", | ||
"build": "rollup --config=node:rollup-config-ts", | ||
"test": "jest --no-cache" | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"@semcore/flex-box": "^3.1", | ||
"@semcore/popper": "^3.3", | ||
"@semcore/utils": "^3.1" | ||
"@semcore/utils": "^3.2", | ||
"@semcore/flex-box": "^3.2", | ||
"@semcore/popper": "^3.5" | ||
}, | ||
@@ -20,0 +20,0 @@ "jest": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41802
661
Updated@semcore/flex-box@^3.2
Updated@semcore/popper@^3.5
Updated@semcore/utils@^3.2