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

@entur/form

Package Overview
Dependencies
Maintainers
13
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/form - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

7

CHANGELOG.md

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

## [1.2.1](https://bitbucket.org/enturas/design-system/compare/@entur/form@1.2.0...@entur/form@1.2.1) (2019-11-25)
### Bug Fixes
- **Dropdown:** ensure color is set correctly for option items on Windows ([f2a8fce](https://bitbucket.org/enturas/design-system/commits/f2a8fceaf47e34c60ff66a0c36551bddfe196e2e))
- **Dropdown:** increase the click target size of dropdowns ([b5aa231](https://bitbucket.org/enturas/design-system/commits/b5aa231c359752c92e794bbbeda4d45665ed13b0))
# [1.2.0](https://bitbucket.org/enturas/design-system/compare/@entur/form@1.1.0...@entur/form@1.2.0) (2019-11-22)

@@ -8,0 +15,0 @@

2

dist/form.cjs.development.js

@@ -185,3 +185,3 @@ 'use strict';

"aria-invalid": variant === 'error',
className: "eds-form-control",
className: "eds-form-control eds-dropdown",
disabled: disabled || readOnly

@@ -188,0 +188,0 @@ }, rest), children));

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var a=e(require("@babel/runtime/helpers/objectWithoutProperties")),r=e(require("react")),n=e(require("classnames")),t=require("@entur/icons"),l=require("@entur/typography"),s=r.createContext(null);function c(){return r.useContext(s)}var o=function(e){var a=e.level,n="eds-input-group__icon eds-input-group__icon--".concat(a);switch(a){case"success":return r.createElement(t.ValidationCheckIcon,{className:n});case"error":return r.createElement(t.ValidationErrorIcon,{className:n});case"info":return r.createElement(t.ValidationInfoIcon,{className:n});case"warning":return r.createElement(t.ValidationExclamationIcon,{className:n});default:return null}},d=function(e){var t=e.children,l=e.className,s=e.dark,o=void 0!==s&&s,d=e.disabled,i=void 0!==d&&d,m=e.readOnly,p=void 0!==m&&m,u=e.variant,f=e.prepend,v=e.append,b=a(e,["children","className","dark","disabled","readOnly","variant","prepend","append"]),E=c(),N=u||E;return r.createElement("div",Object.assign({className:n("eds-form-control-wrapper",l,{"eds-form-control-wrapper--success":"success"===N,"eds-form-control-wrapper--error":"error"===N,"eds-form-control-wrapper--dark":o,"eds-form-control-wrapper--disabled":i,"eds-form-control-wrapper--readonly":p})},b),f&&r.createElement("div",{className:"eds-form-control__prepend"},f),t,v&&r.createElement("div",{className:"eds-form-control__append"},v))},i=r.forwardRef((function(e,n){var t=e.prepend,l=e.append,s=e.variant,c=e.disabled,o=void 0!==c&&c,i=e.readOnly,m=void 0!==i&&i,p=e.className,u=e.style,f=a(e,["prepend","append","variant","disabled","readOnly","className","style"]);return r.createElement(d,{disabled:o,readOnly:m,variant:s,prepend:t,append:l,className:p,style:u},r.createElement("input",Object.assign({"aria-invalid":"error"===s,className:"eds-form-control",disabled:o,readOnly:m,ref:n},f)))})),m=r.forwardRef((function(e,n){var t=e.variant,l=e.disabled,s=void 0!==l&&l,c=e.readOnly,o=void 0!==c&&c,i=e.className,m=e.style,p=a(e,["variant","disabled","readOnly","className","style"]);return r.createElement(d,{className:i,disabled:s,readOnly:o,variant:t,style:m},r.createElement("textarea",Object.assign({className:"eds-form-control eds-textarea",ref:n,readOnly:o},p)))})),p=function(e){var t=e.children,s=e.className,c=e.label,o=a(e,["children","className","label"]);return r.createElement("fieldset",Object.assign({className:n("eds-fieldset",s)},o),c&&r.createElement(l.Heading4,{as:"legend",className:"eds-legend"},c),t)},u=r.forwardRef((function(e,s){var c=e.className,o=e.children,d=a(e,["className","width","children"]);return r.createElement("label",{className:n("eds-form-component--checkbox__container",c)},r.createElement("input",Object.assign({type:"checkbox",ref:s},d)),r.createElement("span",{className:"eds-form-component--checkbox__icon"},r.createElement(t.CheckIcon,null)),o&&r.createElement(l.Label,{as:"span"},o))})),f=r.createContext(null),v=f.Provider,b=r.forwardRef((function(e,t){var s=e.className,c=e.children,o=e.value,d=a(e,["className","children","value"]),i=n(s,"eds-form-component--radio__radio"),m=function(){var e=r.useContext(f);if(!e)throw new Error("You need to wrap your RadioButtons in a RadioGroup component");return e}();return r.createElement("label",{className:"eds-form-component--radio__container"},r.createElement("input",Object.assign({type:"radio",name:m.name,ref:t,value:o,checked:m.value===o,onChange:m.onChange},d)),r.createElement("span",{className:i},r.createElement("span",{className:"eds-form-component--radio__circle"})),c&&r.createElement(l.Label,{as:"span"},c))}));exports.Checkbox=u,exports.Dropdown=function(e){var n=e.className,l=e.variant,s=e.disabled,c=void 0!==s&&s,o=e.readOnly,i=void 0!==o&&o,m=e.children,p=e.prepend,u=e.style,f=a(e,["className","variant","disabled","readOnly","children","prepend","style"]);return r.createElement(d,{dark:!0,disabled:c,readOnly:i,prepend:p,append:c||i?null:r.createElement(t.DownArrowIcon,{inline:!0}),variant:l,className:n,style:u},r.createElement("select",Object.assign({"aria-invalid":"error"===l,className:"eds-form-control",disabled:c||i},f),m))},exports.DropdownItem=function(e){var n=e.children,t=a(e,["children"]);return r.createElement("option",Object.assign({},t),n)},exports.Fieldset=p,exports.InputGroup=function(e){var a=e.feedback,n=e.variant,t=void 0===n?null:n,c=e.children;return r.createElement(s.Provider,{value:t},r.createElement("div",{className:"eds-input-group"},r.createElement(l.Label,{style:{display:"block"}},r.createElement("span",{className:"eds-input-group__label"},e.label),c),a&&t&&r.createElement(l.SmallText,{className:"eds-input-group__feedback-wrapper"},r.createElement(o,{level:t}),r.createElement("span",{className:"eds-input-group__feedback"},a))))},exports.Radio=b,exports.RadioGroup=function(e){var n=e.name,t=e.value,l=e.children,s=e.onChange,c=a(e,["name","value","children","onChange"]),o=r.useMemo((function(){return{name:n,value:t,onChange:s}}),[n,t,s]);return r.createElement(v,{value:o},r.createElement(p,Object.assign({},c),l))},exports.TextArea=m,exports.TextField=i,exports.useVariant=c;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var a=e(require("@babel/runtime/helpers/objectWithoutProperties")),r=e(require("react")),n=e(require("classnames")),t=require("@entur/icons"),l=require("@entur/typography"),s=r.createContext(null);function c(){return r.useContext(s)}var o=function(e){var a=e.level,n="eds-input-group__icon eds-input-group__icon--".concat(a);switch(a){case"success":return r.createElement(t.ValidationCheckIcon,{className:n});case"error":return r.createElement(t.ValidationErrorIcon,{className:n});case"info":return r.createElement(t.ValidationInfoIcon,{className:n});case"warning":return r.createElement(t.ValidationExclamationIcon,{className:n});default:return null}},d=function(e){var t=e.children,l=e.className,s=e.dark,o=void 0!==s&&s,d=e.disabled,i=void 0!==d&&d,m=e.readOnly,p=void 0!==m&&m,u=e.variant,f=e.prepend,v=e.append,b=a(e,["children","className","dark","disabled","readOnly","variant","prepend","append"]),E=c(),N=u||E;return r.createElement("div",Object.assign({className:n("eds-form-control-wrapper",l,{"eds-form-control-wrapper--success":"success"===N,"eds-form-control-wrapper--error":"error"===N,"eds-form-control-wrapper--dark":o,"eds-form-control-wrapper--disabled":i,"eds-form-control-wrapper--readonly":p})},b),f&&r.createElement("div",{className:"eds-form-control__prepend"},f),t,v&&r.createElement("div",{className:"eds-form-control__append"},v))},i=r.forwardRef((function(e,n){var t=e.prepend,l=e.append,s=e.variant,c=e.disabled,o=void 0!==c&&c,i=e.readOnly,m=void 0!==i&&i,p=e.className,u=e.style,f=a(e,["prepend","append","variant","disabled","readOnly","className","style"]);return r.createElement(d,{disabled:o,readOnly:m,variant:s,prepend:t,append:l,className:p,style:u},r.createElement("input",Object.assign({"aria-invalid":"error"===s,className:"eds-form-control",disabled:o,readOnly:m,ref:n},f)))})),m=r.forwardRef((function(e,n){var t=e.variant,l=e.disabled,s=void 0!==l&&l,c=e.readOnly,o=void 0!==c&&c,i=e.className,m=e.style,p=a(e,["variant","disabled","readOnly","className","style"]);return r.createElement(d,{className:i,disabled:s,readOnly:o,variant:t,style:m},r.createElement("textarea",Object.assign({className:"eds-form-control eds-textarea",ref:n,readOnly:o},p)))})),p=function(e){var t=e.children,s=e.className,c=e.label,o=a(e,["children","className","label"]);return r.createElement("fieldset",Object.assign({className:n("eds-fieldset",s)},o),c&&r.createElement(l.Heading4,{as:"legend",className:"eds-legend"},c),t)},u=r.forwardRef((function(e,s){var c=e.className,o=e.children,d=a(e,["className","width","children"]);return r.createElement("label",{className:n("eds-form-component--checkbox__container",c)},r.createElement("input",Object.assign({type:"checkbox",ref:s},d)),r.createElement("span",{className:"eds-form-component--checkbox__icon"},r.createElement(t.CheckIcon,null)),o&&r.createElement(l.Label,{as:"span"},o))})),f=r.createContext(null),v=f.Provider,b=r.forwardRef((function(e,t){var s=e.className,c=e.children,o=e.value,d=a(e,["className","children","value"]),i=n(s,"eds-form-component--radio__radio"),m=function(){var e=r.useContext(f);if(!e)throw new Error("You need to wrap your RadioButtons in a RadioGroup component");return e}();return r.createElement("label",{className:"eds-form-component--radio__container"},r.createElement("input",Object.assign({type:"radio",name:m.name,ref:t,value:o,checked:m.value===o,onChange:m.onChange},d)),r.createElement("span",{className:i},r.createElement("span",{className:"eds-form-component--radio__circle"})),c&&r.createElement(l.Label,{as:"span"},c))}));exports.Checkbox=u,exports.Dropdown=function(e){var n=e.className,l=e.variant,s=e.disabled,c=void 0!==s&&s,o=e.readOnly,i=void 0!==o&&o,m=e.children,p=e.prepend,u=e.style,f=a(e,["className","variant","disabled","readOnly","children","prepend","style"]);return r.createElement(d,{dark:!0,disabled:c,readOnly:i,prepend:p,append:c||i?null:r.createElement(t.DownArrowIcon,{inline:!0}),variant:l,className:n,style:u},r.createElement("select",Object.assign({"aria-invalid":"error"===l,className:"eds-form-control eds-dropdown",disabled:c||i},f),m))},exports.DropdownItem=function(e){var n=e.children,t=a(e,["children"]);return r.createElement("option",Object.assign({},t),n)},exports.Fieldset=p,exports.InputGroup=function(e){var a=e.feedback,n=e.variant,t=void 0===n?null:n,c=e.children;return r.createElement(s.Provider,{value:t},r.createElement("div",{className:"eds-input-group"},r.createElement(l.Label,{style:{display:"block"}},r.createElement("span",{className:"eds-input-group__label"},e.label),c),a&&t&&r.createElement(l.SmallText,{className:"eds-input-group__feedback-wrapper"},r.createElement(o,{level:t}),r.createElement("span",{className:"eds-input-group__feedback"},a))))},exports.Radio=b,exports.RadioGroup=function(e){var n=e.name,t=e.value,l=e.children,s=e.onChange,c=a(e,["name","value","children","onChange"]),o=r.useMemo((function(){return{name:n,value:t,onChange:s}}),[n,t,s]);return r.createElement(v,{value:o},r.createElement(p,Object.assign({},c),l))},exports.TextArea=m,exports.TextField=i,exports.useVariant=c;
//# sourceMappingURL=form.cjs.production.min.js.map

@@ -181,3 +181,3 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';

"aria-invalid": variant === 'error',
className: "eds-form-control",
className: "eds-form-control eds-dropdown",
disabled: disabled || readOnly

@@ -184,0 +184,0 @@ }, rest), children));

{
"name": "@entur/form",
"version": "1.2.0",
"version": "1.2.1",
"license": "EUPL-1.2",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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