@mirohq/design-system-base-input
Advanced tools
Comparing version
@@ -5,4 +5,2 @@ 'use strict'; | ||
var designSystemUtils = require('@mirohq/design-system-utils'); | ||
const styles = { | ||
@@ -73,23 +71,3 @@ variants: { | ||
const keyboardEventHandler = (e) => { | ||
if (e.key !== "Tab") { | ||
e.preventDefault(); | ||
} | ||
}; | ||
const useAriaDisabled = (props, ariaDisabled) => { | ||
if (!designSystemUtils.booleanify(ariaDisabled)) { | ||
return props; | ||
} | ||
const formattedProps = designSystemUtils.removeEventProps(props, [ | ||
"onFocus", | ||
"onBlur", | ||
"onPointerMove" | ||
]); | ||
formattedProps.onKeyDown = keyboardEventHandler; | ||
formattedProps.onKeyUp = keyboardEventHandler; | ||
return formattedProps; | ||
}; | ||
exports.styles = styles; | ||
exports.useAriaDisabled = useAriaDisabled; | ||
//# sourceMappingURL=main.js.map |
@@ -1,3 +0,1 @@ | ||
import { booleanify, removeEventProps } from '@mirohq/design-system-utils'; | ||
const styles = { | ||
@@ -68,22 +66,3 @@ variants: { | ||
const keyboardEventHandler = (e) => { | ||
if (e.key !== "Tab") { | ||
e.preventDefault(); | ||
} | ||
}; | ||
const useAriaDisabled = (props, ariaDisabled) => { | ||
if (!booleanify(ariaDisabled)) { | ||
return props; | ||
} | ||
const formattedProps = removeEventProps(props, [ | ||
"onFocus", | ||
"onBlur", | ||
"onPointerMove" | ||
]); | ||
formattedProps.onKeyDown = keyboardEventHandler; | ||
formattedProps.onKeyUp = keyboardEventHandler; | ||
return formattedProps; | ||
}; | ||
export { styles, useAriaDisabled }; | ||
export { styles }; | ||
//# sourceMappingURL=module.js.map |
@@ -1,4 +0,1 @@ | ||
import { InputHTMLAttributes } from 'react'; | ||
import { Booleanish } from '@mirohq/design-system-types'; | ||
declare const styles: { | ||
@@ -69,4 +66,2 @@ variants: { | ||
declare const useAriaDisabled: <T extends HTMLElement>(props: InputHTMLAttributes<T>, ariaDisabled?: Booleanish) => InputHTMLAttributes<T>; | ||
export { styles, useAriaDisabled }; | ||
export { styles }; |
{ | ||
"name": "@mirohq/design-system-base-input", | ||
"version": "0.0.3-forms.0", | ||
"version": "0.0.3-forms.3", | ||
"description": "", | ||
@@ -28,6 +28,2 @@ "author": "Miro", | ||
}, | ||
"dependencies": { | ||
"@mirohq/design-system-types": "^0.6.2", | ||
"@mirohq/design-system-utils": "^0.15.0-forms.0" | ||
}, | ||
"scripts": { | ||
@@ -34,0 +30,0 @@ "build": "rollup -c ../../../../rollup.config.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2
-50%11005
-27.55%199
-17.43%- Removed
- Removed
- Removed