@bsonntag/react-listbox
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -8,8 +8,5 @@ "use strict"; | ||
}); | ||
exports.Listbox = Listbox; | ||
exports.ListboxButton = ListboxButton; | ||
exports.useListboxButtonLabel = useListboxButtonLabel; | ||
exports.ListboxButtonLabel = ListboxButtonLabel; | ||
exports.ListboxList = ListboxList; | ||
exports.ListboxOption = void 0; | ||
exports.ListboxOption = exports.ListboxList = exports.ListboxButton = exports.Listbox = void 0; | ||
@@ -20,2 +17,4 @@ var React = _interopRequireWildcard(require("react")); | ||
var _refs = require("./refs"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
@@ -95,3 +94,3 @@ | ||
function Listbox(_ref) { | ||
var Listbox = React.forwardRef(function Listbox(_ref, forwardedRef) { | ||
var children = _ref.children, | ||
@@ -139,3 +138,3 @@ value = _ref.value, | ||
return /*#__PURE__*/React.createElement("div", _extends({}, rest, { | ||
ref: ref | ||
ref: (0, _refs.refSetter)(ref, forwardedRef) | ||
}), /*#__PURE__*/React.createElement(ButtonFocusSignal.Provider, null, /*#__PURE__*/React.createElement(ExpandedContext.Provider, { | ||
@@ -150,5 +149,5 @@ value: expandedContextValue | ||
}, children)))))); | ||
} | ||
function ListboxButton(_ref2) { | ||
}); | ||
exports.Listbox = Listbox; | ||
var ListboxButton = React.forwardRef(function ListboxButton(_ref2, forwardedRef) { | ||
var children = _ref2.children, | ||
@@ -166,3 +165,3 @@ rest = _objectWithoutProperties(_ref2, ["children"]); | ||
return /*#__PURE__*/React.createElement("button", _extends({}, rest, { | ||
ref: ref, | ||
ref: (0, _refs.refSetter)(ref, forwardedRef), | ||
"aria-haspopup": 'listbox', | ||
@@ -177,3 +176,4 @@ "aria-expanded": isExpanded, | ||
}), children); | ||
} | ||
}); | ||
exports.ListboxButton = ListboxButton; | ||
@@ -191,3 +191,3 @@ function useListboxButtonLabel() { | ||
function ListboxList(_ref3) { | ||
var ListboxList = React.forwardRef(function ListboxList(_ref3, forwardedRef) { | ||
var children = _ref3.children, | ||
@@ -233,3 +233,3 @@ autoSelect = _ref3.autoSelect, | ||
return /*#__PURE__*/React.createElement("ul", _extends({}, rest, { | ||
ref: ref, | ||
ref: (0, _refs.refSetter)(ref, forwardedRef), | ||
role: "listbox", | ||
@@ -258,4 +258,4 @@ tabIndex: -1, | ||
})); | ||
} | ||
}); | ||
exports.ListboxList = ListboxList; | ||
var ListboxOption = React.forwardRef(function Option(_ref4, ref) { | ||
@@ -262,0 +262,0 @@ var children = _ref4.children, |
{ | ||
"name": "@bsonntag/react-listbox", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "A customizable, accessible and controllable listbox component for React.", | ||
@@ -24,3 +24,3 @@ "keywords": [ | ||
"format": "prettier --write \"./**/*.{js,json}\"", | ||
"lint": "eslint .", | ||
"lint": "eslint . && prettier --check \"./**/*.{js,json}\"", | ||
"storybook": "start-storybook", | ||
@@ -39,3 +39,3 @@ "test": "jest", | ||
"@babel/preset-react": "^7.9.4", | ||
"@bsonntag/eslint-config": "^0.6.0", | ||
"@bsonntag/eslint-config": "^0.7.0", | ||
"@storybook/addon-knobs": "^5.3.18", | ||
@@ -46,3 +46,3 @@ "@storybook/react": "^5.3.18", | ||
"babel-loader": "^8.1.0", | ||
"eslint": "^6.8.0", | ||
"eslint": "^7.21.0", | ||
"husky": "^4.2.5", | ||
@@ -52,9 +52,9 @@ "jest": "^25.5.4", | ||
"prettier": "^2.0.5", | ||
"react": "^16.13.1", | ||
"react-dom": "^16.13.1", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"styled-components": "^5.1.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0" | ||
"react": "^16.8.0 || ^17.0.0" | ||
} | ||
} |
# react-listbox | ||
[![CircleCI build](https://circleci.com/gh/bsonntag/react-listbox.svg?style=svg)](https://circleci.com/gh/bsonntag/react-listbox) | ||
A customizable, accessible and controllable listbox component for React. | ||
@@ -4,0 +6,0 @@ |
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
17347
5
288
58