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

@posten-hedwig/dropdown

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@posten-hedwig/dropdown - npm Package Compare versions

Comparing version 1.0.6 to 2.0.0-alpha.0

dist/index.css

92

dist/index.js

@@ -1,13 +0,81 @@

"use strict";
require("./index.css");
var $8zHUo$reactjsxruntime = require("react/jsx-runtime");
require("react");
var $8zHUo$proptypes = require("prop-types");
require("@posten-hedwig/core");
require("@posten-hedwig/label");
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Dropdown", {
enumerable: true,
get: function get() {
return _Dropdown.default;
}
});
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "Dropdown", () => $abcdcc3bd963842c$export$2e2bcd8739ae039);
const $abcdcc3bd963842c$var$Dropdown = ({ label: label , name: name , variant: variant , id: id , selected: selected , onChange: onChange , options: options , errorMessage: errorMessage , ariaControls: ariaControls })=>{
let variation = variant ? "hw-dropdown--" + variant : "";
let labelVariation = variant === "line" ? "hw-label--line" : "";
if (errorMessage !== "") {
variation += " hw-input--error";
labelVariation += " hw-label--error";
}
var items = "";
if (options) items = options.map((item, index)=>/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("option", {
value: item.value,
children: [
" ",
item.label,
" "
]
}, index));
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("label", {
className: `hw-label ${labelVariation}`,
children: [
label,
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("select", {
name: name,
className: `hw-dropdown ${variation}`,
id: id,
value: selected,
"data-hw-dropdown": id,
onChange: onChange,
"aria-controls": ariaControls,
children: items
}),
errorMessage && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
className: "hw-error hw-error--align-left hw-error--indented",
children: errorMessage
})
]
});
};
$abcdcc3bd963842c$var$Dropdown.defaultProps = {
variant: "",
options: [],
errorMessage: ""
};
$abcdcc3bd963842c$var$Dropdown.propTypes = {
label: (0, ($parcel$interopDefault($8zHUo$proptypes))).string,
id: (0, ($parcel$interopDefault($8zHUo$proptypes))).string,
variant: (0, ($parcel$interopDefault($8zHUo$proptypes))).oneOf([
"",
"white",
"line"
]),
errorMessage: (0, ($parcel$interopDefault($8zHUo$proptypes))).string,
onChange: (0, ($parcel$interopDefault($8zHUo$proptypes))).func,
ariaControls: (0, ($parcel$interopDefault($8zHUo$proptypes))).string
};
var $abcdcc3bd963842c$export$2e2bcd8739ae039 = $abcdcc3bd963842c$var$Dropdown;
//# sourceMappingURL=index.js.map

19

package.json
{
"name": "@posten-hedwig/dropdown",
"version": "1.0.6",
"version": "2.0.0-alpha.0",
"publishConfig": {

@@ -15,3 +15,5 @@ "access": "public"

"license": "ISC",
"source": "src/index.ts",
"main": "dist/index.js",
"module": "dist/module.js",
"files": [

@@ -21,11 +23,14 @@ "dist"

"scripts": {
"prebuild": "rimraf dist && npm run sass",
"sass": "sass sass/dropdown.scss:dist/dropdown.scss --style compressed --no-source-map",
"build": "babel src -d dist --root-mode=upward --ignore '**/*.stories.js'"
"prebuild": "rimraf dist",
"build": "parcel build"
},
"dependencies": {
"@posten-hedwig/core": "^0.0.9",
"@posten-hedwig/label": "^1.0.3"
"@posten-hedwig/core": "^1.0.0-alpha.0",
"@posten-hedwig/label": "^2.0.0-alpha.0",
"prop-types": "^15.8.1"
},
"gitHead": "e213a5c314ea57a2f6e3a478cd2ac26c8c14a174"
"peerDependencies": {
"react": ">=16.14.x"
},
"gitHead": "71a1f0f193495659643eeb9ce1b788628e0140da"
}
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