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

@entur/dropdown

Package Overview
Dependencies
Maintainers
13
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/dropdown - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [0.4.2](https://bitbucket.org/enturas/design-system/compare/@entur/dropdown@0.4.1...@entur/dropdown@0.4.2) (2020-01-08)
### Bug Fixes
- warn in development if the developer have forgotten the CSS ([e5c30fc](https://bitbucket.org/enturas/design-system/commits/e5c30fc08624ef22c02773892778abd92205c6b0))
## [0.4.1](https://bitbucket.org/enturas/design-system/compare/@entur/dropdown@0.4.0...@entur/dropdown@0.4.1) (2020-01-06)

@@ -8,0 +14,0 @@

3

dist/dropdown.cjs.development.js

@@ -5,2 +5,3 @@ 'use strict';

var utils = require('@entur/utils');
var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties'));

@@ -650,4 +651,6 @@ var React = _interopDefault(require('react'));

utils.warnAboutMissingStyles('dropdown', 'form', 'a11y');
exports.Dropdown = Dropdown;
exports.NativeDropdown = NativeDropdown;
//# sourceMappingURL=dropdown.cjs.development.js.map

2

dist/dropdown.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@babel/runtime/helpers/objectWithoutProperties")),n=e(require("react")),r=e(require("downshift")),a=e(require("@babel/runtime/helpers/defineProperty")),o=require("@entur/form"),i=e(require("classnames")),l=require("@entur/icons"),c=require("@entur/a11y"),s=require("@entur/typography"),u=e(require("@babel/runtime/regenerator")),d=e(require("@babel/runtime/helpers/asyncToGenerator")),p=e(require("@babel/runtime/helpers/slicedToArray")),b=n.createContext(null),f=function(e){var a=e.children,o=e.onChange,i=void 0===o?function(){}:o,l=e.onInputValueChange,c=void 0===l?function(){}:l,s=t(e,["children","onChange","onInputValueChange"]);return n.createElement(r,Object.assign({itemToString:function(e){return e?e.label:""},onStateChange:function(e,t){"selectedItem"in e?i(e.selectedItem,t):"inputValue"in e&&c(e.inputValue)}},s),(function(e){return n.createElement("div",{className:"eds-input-group"},n.createElement(b.Provider,{value:e},a))}))},m=function(){var e=n.useContext(b);if(!e)throw new Error("You need to wrap your component in a DownshiftProvider");return e};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var O=function(e){var r=e.items,o=t(e,["items"]),l=m(),c=l.highlightedIndex,s=l.isOpen,u=l.selectedItem,d=l.getItemProps,p=l.getMenuProps;return n.createElement("ul",Object.assign({className:i("eds-dropdown-list",{"eds-dropdown-list--open":s})},p(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o))),s?r.map((function(e,t){return n.createElement("li",Object.assign({className:i("eds-dropdown-list__item",{"eds-dropdown-list__item--highlighted":c===t,"eds-dropdown-list__item--selected":u===e})},d({key:e.value,item:e,index:t})),n.createElement("span",null,e.label),e.icons&&n.createElement("span",null,e.icons.map((function(e,t){return n.createElement(e,{key:t,inline:!0,className:"eds-dropdown-list__item-icon"})}))))})):null)},y=function(){var e=m();return n.createElement("button",Object.assign({},(0,e.getToggleButtonProps)({className:i("eds-dropdown__toggle-button",{"eds-dropdown__toggle-button--open":e.isOpen})}),{tabIndex:"-1"}),n.createElement(l.DownArrowIcon,{inline:!0}))},v=function(e){var r=e.children,a=t(e,["className","children"]);return n.createElement("div",Object.assign({className:i("eds-inline-spinner",i)},a),n.createElement("span",{className:"eds-inline-spinner__twirly-part"}),n.createElement(c.VisuallyHidden,null,r))};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e){var r=e.children,a=e.className,i=e.items,l=e.loading,c=e.loadingText,s=void 0===c?"Loading...":c,u=e.style,d=t(e,["children","className","items","loading","loadingText","placeholder","style"]);return n.createElement("div",{className:"eds-dropdown-wrapper"},n.createElement(o.BaseFormControl,Object.assign({append:l?n.createElement(v,null,s):n.createElement(y,null),className:a,dark:!0},d),r),n.createElement(O,Object.assign({items:i,style:j({position:"absolute",top:"100%"},u)},d)))},E=function(e){var r=e.disabled,a=e.placeholder,o=void 0===a?"Vennligst velg":a,i=e.selectOnTab,l=void 0!==i&&i,c=e.openOnFocus,s=void 0!==c&&c,u=t(e,["disabled","placeholder","selectOnTab","openOnFocus"]),d=m(),p=d.getToggleButtonProps,b=d.selectedItem,f=d.selectHighlightedItem,g=d.openMenu;return n.createElement(w,Object.assign({disabled:r},u),n.createElement("button",Object.assign({},p({className:"eds-form-control",style:{textAlign:"left"},disabled:r,type:"button",onKeyDown:function(e){l&&"Tab"===e.key&&f()},onFocus:function(){s&&g()}})),b?b.label:o))};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var T=function(e){var r=e.disabled,o=void 0!==r&&r,i=e.className,l=e.items,c=e.loading,s=e.loadingText,u=e.readOnly,d=void 0!==u&&u,p=e.prepend,b=e.selectOnTab,f=void 0!==b&&b,g=e.openOnFocus,O=void 0!==g&&g,y=t(e,["disabled","className","items","loading","loadingText","readOnly","prepend","selectOnTab","openOnFocus"]),v=m(),h=v.getInputProps,j=v.inputValue,E=v.selectHighlightedItem,T=v.openMenu,k=n.useMemo((function(){if(!j)return l;var e=new RegExp(j,"i");return l.filter((function(t){return e.test(t.label)}))}),[j,l]);return n.createElement(w,{items:k,disabled:o,readOnly:d,className:i,loading:c,loadingText:s,prepend:p},n.createElement("input",Object.assign({},h(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({disabled:o,readOnly:d,className:"eds-form-control eds-dropdown__input",onKeyDown:function(e){f&&"Tab"===e.key&&E()},onFocus:function(){O&&T()}},y)))))},k=function(e){var t=e.children,r=e.label,a=e.feedback,i=e.variant,l=m();return n.createElement(o.VariantProvider,{variant:i},r&&n.createElement(s.Label,Object.assign({},(0,l.getLabelProps)(),{style:{display:"block"}}),r),t,a&&i&&n.createElement(o.FeedbackText,{variant:i},a))};function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var D=function(e){return n.useMemo((function(){return e.map((function(e){return"string"==typeof e?{value:e,label:e}:"value"in e?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{value:e.label})}))}),[e])};function N(e,t){var n;return function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,a)}),t)}}var I=function(){var e=n.useRef(!0);return n.useEffect((function(){return function(){e.current=!1}}),[]),e.current},_=function(e,t){switch(t.type){case"request results":return{items:[],loading:!0};case"received results":return{items:t.payload,loading:!1}}},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,r="function"==typeof e,a=n.useMemo((function(){return r?e:function(){return Promise.resolve(e)}}),[e,r]),o=n.useReducer(_,{items:r?[]:e,loading:!1}),i=p(o,2),l=i[0],c=l.items,s=l.loading,b=i[1],f=I(),m=n.useCallback(function(){var e=d(u.mark((function e(t){var n;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f){e.next=2;break}return e.abrupt("return");case 2:return b({type:"request results"}),e.next=5,a(t);case 5:n=e.sent,f&&b({type:"received results",payload:n});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[a,f]),g=D(c);return n.useEffect((function(){r&&m("")}),[r,m]),{items:g,loading:!!r&&s,fetchItems:N(m,t)}};exports.Dropdown=function(e){var r=e.debounceTimeout,a=e.disabled,o=e.feedback,i=e.items,l=e.label,c=e.loadingText,s=e.onChange,u=void 0===s?function(){}:s,d=e.placeholder,p=e.prepend,b=e.readOnly,m=e.searchable,g=e.selectOnTab,O=e.openOnFocus,y=e.variant,v=e.value,h=t(e,["debounceTimeout","disabled","feedback","items","label","loadingText","onChange","placeholder","prepend","readOnly","searchable","selectOnTab","openOnFocus","variant","value"]),j=q(i,r),w=j.items,P=j.loading,x=j.fetchItems,D=w.find((function(e){return v===e.value})),N=m?T:E;return n.createElement(f,Object.assign({initialSelectedItem:D,onInputValueChange:x,onChange:u},h),n.createElement(k,{label:l,feedback:o,variant:y},n.createElement(N,{items:w,loading:P,loadingText:c,disabled:a,readOnly:b,placeholder:d,prepend:p,selectOnTab:g,openOnFocus:O})))},exports.NativeDropdown=function(e){var r=e.className,a=e.disabled,i=void 0!==a&&a,c=e.readOnly,s=void 0!==c&&c,u=e.items,d=e.loadingText,p=e.prepend,b=e.style,f=e.label,m=e.variant,g=e.feedback,O=t(e,["className","disabled","readOnly","items","loadingText","prepend","style","label","variant","feedback"]),y=q(u),h=y.items,j=y.loading,w=n.createElement(l.DownArrowIcon,{inline:!0});return i||s?w=null:j&&(w=n.createElement(v,null,d)),n.createElement(o.InputGroup,{label:f,feedback:g,variant:m},n.createElement(o.BaseFormControl,{dark:!0,disabled:i,readOnly:s,prepend:p,append:w,className:r,style:b},n.createElement("select",Object.assign({"aria-invalid":"error"===m,className:"eds-form-control eds-dropdown",disabled:i||s},O),h.map((function(e){return n.createElement("option",{key:e.value,value:e.value},e.label)})))))};
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("@entur/utils"),n=e(require("@babel/runtime/helpers/objectWithoutProperties")),r=e(require("react")),a=e(require("downshift")),o=e(require("@babel/runtime/helpers/defineProperty")),i=require("@entur/form"),l=e(require("classnames")),c=require("@entur/icons"),s=require("@entur/a11y"),u=require("@entur/typography"),d=e(require("@babel/runtime/regenerator")),p=e(require("@babel/runtime/helpers/asyncToGenerator")),b=e(require("@babel/runtime/helpers/slicedToArray")),f=r.createContext(null),m=function(e){var t=e.children,o=e.onChange,i=void 0===o?function(){}:o,l=e.onInputValueChange,c=void 0===l?function(){}:l,s=n(e,["children","onChange","onInputValueChange"]);return r.createElement(a,Object.assign({itemToString:function(e){return e?e.label:""},onStateChange:function(e,t){"selectedItem"in e?i(e.selectedItem,t):"inputValue"in e&&c(e.inputValue)}},s),(function(e){return r.createElement("div",{className:"eds-input-group"},r.createElement(f.Provider,{value:e},t))}))},g=function(){var e=r.useContext(f);if(!e)throw new Error("You need to wrap your component in a DownshiftProvider");return e};function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var y=function(e){var t=e.items,a=n(e,["items"]),i=g(),c=i.highlightedIndex,s=i.isOpen,u=i.selectedItem,d=i.getItemProps,p=i.getMenuProps;return r.createElement("ul",Object.assign({className:l("eds-dropdown-list",{"eds-dropdown-list--open":s})},p(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a))),s?t.map((function(e,t){return r.createElement("li",Object.assign({className:l("eds-dropdown-list__item",{"eds-dropdown-list__item--highlighted":c===t,"eds-dropdown-list__item--selected":u===e})},d({key:e.value,item:e,index:t})),r.createElement("span",null,e.label),e.icons&&r.createElement("span",null,e.icons.map((function(e,t){return r.createElement(e,{key:t,inline:!0,className:"eds-dropdown-list__item-icon"})}))))})):null)},v=function(){var e=g();return r.createElement("button",Object.assign({},(0,e.getToggleButtonProps)({className:l("eds-dropdown__toggle-button",{"eds-dropdown__toggle-button--open":e.isOpen})}),{tabIndex:"-1"}),r.createElement(c.DownArrowIcon,{inline:!0}))},h=function(e){var t=e.children,a=n(e,["className","children"]);return r.createElement("div",Object.assign({className:l("eds-inline-spinner",l)},a),r.createElement("span",{className:"eds-inline-spinner__twirly-part"}),r.createElement(s.VisuallyHidden,null,t))};function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=function(e){var t=e.children,a=e.className,o=e.items,l=e.loading,c=e.loadingText,s=void 0===c?"Loading...":c,u=e.style,d=n(e,["children","className","items","loading","loadingText","placeholder","style"]);return r.createElement("div",{className:"eds-dropdown-wrapper"},r.createElement(i.BaseFormControl,Object.assign({append:l?r.createElement(h,null,s):r.createElement(v,null),className:a,dark:!0},d),t),r.createElement(y,Object.assign({items:o,style:w({position:"absolute",top:"100%"},u)},d)))},P=function(e){var t=e.disabled,a=e.placeholder,o=void 0===a?"Vennligst velg":a,i=e.selectOnTab,l=void 0!==i&&i,c=e.openOnFocus,s=void 0!==c&&c,u=n(e,["disabled","placeholder","selectOnTab","openOnFocus"]),d=g(),p=d.getToggleButtonProps,b=d.selectedItem,f=d.selectHighlightedItem,m=d.openMenu;return r.createElement(E,Object.assign({disabled:t},u),r.createElement("button",Object.assign({},p({className:"eds-form-control",style:{textAlign:"left"},disabled:t,type:"button",onKeyDown:function(e){l&&"Tab"===e.key&&f()},onFocus:function(){s&&m()}})),b?b.label:o))};function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var k=function(e){var t=e.disabled,a=void 0!==t&&t,i=e.className,l=e.items,c=e.loading,s=e.loadingText,u=e.readOnly,d=void 0!==u&&u,p=e.prepend,b=e.selectOnTab,f=void 0!==b&&b,m=e.openOnFocus,O=void 0!==m&&m,y=n(e,["disabled","className","items","loading","loadingText","readOnly","prepend","selectOnTab","openOnFocus"]),v=g(),h=v.getInputProps,j=v.inputValue,w=v.selectHighlightedItem,P=v.openMenu,k=r.useMemo((function(){if(!j)return l;var e=new RegExp(j,"i");return l.filter((function(t){return e.test(t.label)}))}),[j,l]);return r.createElement(E,{items:k,disabled:a,readOnly:d,className:i,loading:c,loadingText:s,prepend:p},r.createElement("input",Object.assign({},h(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({disabled:a,readOnly:d,className:"eds-form-control eds-dropdown__input",onKeyDown:function(e){f&&"Tab"===e.key&&w()},onFocus:function(){O&&P()}},y)))))},x=function(e){var t=e.children,n=e.label,a=e.feedback,o=e.variant,l=g();return r.createElement(i.VariantProvider,{variant:o},n&&r.createElement(u.Label,Object.assign({},(0,l.getLabelProps)(),{style:{display:"block"}}),n),t,a&&o&&r.createElement(i.FeedbackText,{variant:o},a))};function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var N=function(e){return r.useMemo((function(){return e.map((function(e){return"string"==typeof e?{value:e,label:e}:"value"in e?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{value:e.label})}))}),[e])};function I(e,t){var n;return function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,a)}),t)}}var _=function(){var e=r.useRef(!0);return r.useEffect((function(){return function(){e.current=!1}}),[]),e.current},q=function(e,t){switch(t.type){case"request results":return{items:[],loading:!0};case"received results":return{items:t.payload,loading:!1}}},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,n="function"==typeof e,a=r.useMemo((function(){return n?e:function(){return Promise.resolve(e)}}),[e,n]),o=r.useReducer(q,{items:n?[]:e,loading:!1}),i=b(o,2),l=i[0],c=l.items,s=l.loading,u=i[1],f=_(),m=r.useCallback(function(){var e=p(d.mark((function e(t){var n;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f){e.next=2;break}return e.abrupt("return");case 2:return u({type:"request results"}),e.next=5,a(t);case 5:n=e.sent,f&&u({type:"received results",payload:n});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[a,f]),g=N(c);return r.useEffect((function(){n&&m("")}),[n,m]),{items:g,loading:!!n&&s,fetchItems:I(m,t)}};t.warnAboutMissingStyles("dropdown","form","a11y"),exports.Dropdown=function(e){var t=e.debounceTimeout,a=e.disabled,o=e.feedback,i=e.items,l=e.label,c=e.loadingText,s=e.onChange,u=void 0===s?function(){}:s,d=e.placeholder,p=e.prepend,b=e.readOnly,f=e.searchable,g=e.selectOnTab,O=e.openOnFocus,y=e.variant,v=e.value,h=n(e,["debounceTimeout","disabled","feedback","items","label","loadingText","onChange","placeholder","prepend","readOnly","searchable","selectOnTab","openOnFocus","variant","value"]),j=C(i,t),w=j.items,E=j.loading,T=j.fetchItems,D=w.find((function(e){return v===e.value})),N=f?k:P;return r.createElement(m,Object.assign({initialSelectedItem:D,onInputValueChange:T,onChange:u},h),r.createElement(x,{label:l,feedback:o,variant:y},r.createElement(N,{items:w,loading:E,loadingText:c,disabled:a,readOnly:b,placeholder:d,prepend:p,selectOnTab:g,openOnFocus:O})))},exports.NativeDropdown=function(e){var t=e.className,a=e.disabled,o=void 0!==a&&a,l=e.readOnly,s=void 0!==l&&l,u=e.items,d=e.loadingText,p=e.prepend,b=e.style,f=e.label,m=e.variant,g=e.feedback,O=n(e,["className","disabled","readOnly","items","loadingText","prepend","style","label","variant","feedback"]),y=C(u),v=y.items,j=y.loading,w=r.createElement(c.DownArrowIcon,{inline:!0});return o||s?w=null:j&&(w=r.createElement(h,null,d)),r.createElement(i.InputGroup,{label:f,feedback:g,variant:m},r.createElement(i.BaseFormControl,{dark:!0,disabled:o,readOnly:s,prepend:p,append:w,className:t,style:b},r.createElement("select",Object.assign({"aria-invalid":"error"===m,className:"eds-form-control eds-dropdown",disabled:o||s},O),v.map((function(e){return r.createElement("option",{key:e.value,value:e.value},e.label)})))))};
//# sourceMappingURL=dropdown.cjs.production.min.js.map

@@ -0,1 +1,2 @@

import { warnAboutMissingStyles } from '@entur/utils';
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';

@@ -645,3 +646,5 @@ import React from 'react';

warnAboutMissingStyles('dropdown', 'form', 'a11y');
export { Dropdown, NativeDropdown };
//# sourceMappingURL=dropdown.esm.js.map
{
"name": "@entur/dropdown",
"version": "0.4.1",
"version": "0.4.2",
"license": "EUPL-1.2",

@@ -30,9 +30,10 @@ "main": "dist/index.js",

"dependencies": {
"@entur/a11y": "^0.2.5",
"@entur/form": "^2.1.0",
"@entur/a11y": "^0.2.6",
"@entur/form": "^2.1.1",
"@entur/tokens": "^1.1.1",
"@entur/utils": "^0.2.0",
"classnames": "^2.2.6",
"downshift": "^4.0.1"
},
"gitHead": "1755d311b4cb5121c90a6abf85c17a9dfc530abe"
"gitHead": "a3e6403fb40b6400fe24cf22b47c00495740a940"
}

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

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