@elvia/elvis-dropdown
Advanced tools
Comparing version 1.0.7 to 1.0.8
# Elvia Dropdown | ||
## 1.0.8 (28.09.21) | ||
### Patches | ||
Added type declaration support for dropdown komponent | ||
## 1.0.7 (28.09.21) | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,1 @@ | ||
declare module '*.css'; | ||
declare module '*.scss'; | ||
declare module '*'; |
@@ -21,4 +21,6 @@ /* | ||
selectedOptions[0] = `${optionsCount} valgte`; | ||
} | ||
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
return /*#__PURE__*/React.createElement(components.ValueContainer, props, selectedOptions); | ||
@@ -212,7 +214,12 @@ }; | ||
}) => { | ||
return /*#__PURE__*/React.createElement(components.DropdownIndicator, props, /*#__PURE__*/React.createElement(StyledDropdown.DropdownIndicatorIcon, { | ||
isDisabled: isDisabled, | ||
isCompact: isCompact, | ||
menuIsOpen: menuIsOpen | ||
})); | ||
return ( | ||
/*#__PURE__*/ | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
React.createElement(components.DropdownIndicator, props, /*#__PURE__*/React.createElement(StyledDropdown.DropdownIndicatorIcon, { | ||
isDisabled: isDisabled, | ||
isCompact: isCompact, | ||
menuIsOpen: menuIsOpen | ||
})) | ||
); | ||
}; | ||
@@ -223,12 +230,19 @@ | ||
if (!isMulti) { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
return /*#__PURE__*/React.createElement(components.Option, props, props.children); | ||
} | ||
return /*#__PURE__*/React.createElement(components.Option, props, /*#__PURE__*/React.createElement(StyledDropdown.DropdownCheckbox, null, /*#__PURE__*/React.createElement(StyledDropdown.DropdownCheckboxMark, { | ||
id: "ewc-dropdown-checkbox__mark", | ||
isSelected: props.isSelected, | ||
isCompact: isCompact | ||
}), /*#__PURE__*/React.createElement(StyledDropdown.DropdownCheckboxLabel, { | ||
isCompact: isCompact | ||
}, props.children))); | ||
return ( | ||
/*#__PURE__*/ | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
React.createElement(components.Option, props, /*#__PURE__*/React.createElement(StyledDropdown.DropdownCheckbox, null, /*#__PURE__*/React.createElement(StyledDropdown.DropdownCheckboxMark, { | ||
id: "ewc-dropdown-checkbox__mark", | ||
isSelected: props.isSelected, | ||
isCompact: isCompact | ||
}), /*#__PURE__*/React.createElement(StyledDropdown.DropdownCheckboxLabel, { | ||
isCompact: isCompact | ||
}, props.children))) | ||
); | ||
}; | ||
@@ -253,6 +267,11 @@ | ||
// Start outline listener | ||
toolbox.outlineListener(dropdownRef.current); | ||
if (dropdownRef && dropdownRef.current) { | ||
toolbox.outlineListener(dropdownRef.current); | ||
} | ||
return () => { | ||
// Remove outline listener | ||
toolbox.outlineListener(dropdownRef.current, true); | ||
if (dropdownRef && dropdownRef.current) { | ||
toolbox.outlineListener(dropdownRef.current, true); | ||
} | ||
}; | ||
@@ -324,3 +343,5 @@ }, []); // Needed for webcomponent -> To update the default value | ||
placeholder: placeholder, | ||
value: currentVal, | ||
value: currentVal // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
, | ||
styles: customElviaStyles | ||
@@ -327,0 +348,0 @@ }), isError ? /*#__PURE__*/React.createElement(ElviaError, { |
@@ -99,2 +99,4 @@ /* | ||
} | ||
return ''; | ||
}; | ||
@@ -101,0 +103,0 @@ |
@@ -65,3 +65,4 @@ /* | ||
"reactName": "Dropdown", | ||
"useWrapper": false | ||
"useWrapper": false, | ||
"reactTypescriptDeclaration": true | ||
}; | ||
@@ -68,0 +69,0 @@ } |
{ | ||
"name": "@elvia/elvis-dropdown", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "web_component.js", |
@@ -1,2 +0,1 @@ | ||
declare module '*.css'; | ||
declare module '*.scss'; | ||
declare module '*'; |
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
44515
15
1243