@onfido/castor
Advanced tools
Comparing version 1.1.2 to 1.2.0
export * from './button/button'; | ||
export * from './checkbox/checkbox'; | ||
export * from './field/field'; | ||
export * from './form/form'; | ||
export * from './helper-text/helper-text'; | ||
@@ -7,4 +9,5 @@ export * from './icon/icon'; | ||
export * from './radio/radio'; | ||
export * from './spinner/spinner'; | ||
export * from './textarea/textarea'; | ||
export * from './validation/validation'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@onfido/castor", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Onfido's design system.", | ||
@@ -5,0 +5,0 @@ "author": "Onfido", |
@@ -94,2 +94,16 @@ # Castor · [![npm version](https://img.shields.io/npm/v/@onfido/castor.svg?style=flat-square)](https://www.npmjs.com/package/@onfido/castor) | ||
### Testing with (JS) Jest | ||
Castor (and its additions) are exported as [ECMAScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) targeting ECMAScript 2019. Jest will not understand the code in these modules, resulting in syntax errors. | ||
Jest uses Babel to transpile code before running tests. However, it does not include any files from the `node_modules` directory. | ||
You will need to adjust the [`transformIgnorePatterns` setting](https://jestjs.io/docs/en/configuration.html#transformignorepatterns-arraystring) to make sure Castor code does not get excluded when transpiling: | ||
```json | ||
"transformIgnorePatterns": ["node_modules/(?!@onfido/castor)"] | ||
``` | ||
Please note that due to an [existing issue](https://github.com/facebook/jest/issues/10256) Jest will only support your Babel configuration named as `babel.config.js`. | ||
## Switch theme | ||
@@ -96,0 +110,0 @@ |
export interface ButtonProps { | ||
disabled?: boolean; | ||
kind?: 'action' | 'destructive'; | ||
variant?: 'primary' | 'secondary' | 'tertiary'; | ||
} |
export * from './button/button'; | ||
export * from './checkbox/checkbox'; | ||
export * from './field/field'; | ||
export * from './form/form'; | ||
export * from './helper-text/helper-text'; | ||
@@ -7,3 +9,4 @@ export * from './icon/icon'; | ||
export * from './radio/radio'; | ||
export * from './spinner/spinner'; | ||
export * from './textarea/textarea'; | ||
export * from './validation/validation'; |
export interface InputProps { | ||
disabled?: boolean; | ||
invalid?: boolean; | ||
type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search'; | ||
invalid?: boolean; | ||
} |
export interface TextareaProps { | ||
disabled?: boolean; | ||
invalid?: boolean; | ||
resize?: 'vertical' | 'horizontal' | 'both' | 'none'; | ||
invalid?: boolean; | ||
} |
export interface ValidationProps { | ||
if?: Exclude<keyof ValidityState, 'valid'> | 'invalid'; | ||
state: 'error'; | ||
} |
@@ -100,2 +100,3 @@ /** | ||
| 'content-info' | ||
| 'content-spinner' | ||
| 'content-logo' | ||
@@ -132,2 +133,3 @@ | 'content-inverse-main' | ||
| 'background-input-selected' | ||
| 'background-spinner' | ||
| 'background-overlay' | ||
@@ -134,0 +136,0 @@ | 'background-overlay-subtle' |
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
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
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
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
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
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
140583
139
1618
199