New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ventura

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ventura - npm Package Compare versions

Comparing version 1.0.0-2 to 1.0.0

dist/components/Button/Button.test.d.ts

14

dist/components/Button/Button.d.ts

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

import React from 'react';
import React, { MouseEventHandler } from 'react';
export interface Props {
children: string;
type: 'primary' | 'secondary';
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
children: React.ReactNode;
type?: 'primary' | 'secondary';
onClick?: MouseEventHandler<HTMLButtonElement>;
className?: string;
isDisabled?: boolean;
isLoading?: boolean;
prefixIcon?: React.ReactElement;
suffixIcon?: React.ReactElement;
name?: string;
}
declare const Button: React.FC<Props>;
export default Button;
import React from 'react';
import classNames from 'classnames';
import Spinner from '../utils/Spinner/Spinner';
import styles from './Button.module.css';
var Button = function (_a) {
var children = _a.children, _b = _a.type, type = _b === void 0 ? 'primary' : _b, onClick = _a.onClick;
var getAppearanceClass = function (buttonType) {
if (buttonType === 'secondary') {
return styles.typeSecondary;
}
return styles.typePrimary;
};
var classNames = [styles.base];
classNames.push(getAppearanceClass(type));
return (React.createElement("button", { className: classNames.join(' '), type: "button", onClick: onClick }, children));
var _b, _c;
var children = _a.children, _d = _a.type, type = _d === void 0 ? 'primary' : _d, onClick = _a.onClick, className = _a.className, isDisabled = _a.isDisabled, isLoading = _a.isLoading, prefixIcon = _a.prefixIcon, suffixIcon = _a.suffixIcon, name = _a.name;
var buttonClassNames = classNames(styles.button, (_b = {},
_b[styles.typePrimary] = type === 'primary',
_b[styles.typeSecondary] = type === 'secondary',
_b), className);
var labelClassNames = classNames((_c = {},
_c[styles.labelWithPrefixIcon] = Boolean(prefixIcon) || isLoading,
_c[styles.labelWithSuffixIcon] = Boolean(suffixIcon),
_c));
return (React.createElement("button", { disabled: isDisabled || isLoading, className: buttonClassNames, type: "button", onClick: isLoading || suffixIcon ? undefined : onClick, "data-testid": "button-" + name },
isLoading ? React.createElement(Spinner, { className: styles.spinner }) : prefixIcon,
React.createElement("span", { className: labelClassNames }, children),
isLoading || suffixIcon));
};
export default Button;
//# sourceMappingURL=Button.js.map
import './index.css';
export { default as Button } from './components/Button/Button';
export { default as Anchor } from './components/Button/Button';
export * from 'react-feather';

@@ -1,5 +0,4 @@

// import 'modern-css-reset';
import './index.css';
export { default as Button } from './components/Button/Button';
export { default as Anchor } from './components/Button/Button';
export * from 'react-feather';
//# sourceMappingURL=index.js.map
{
"name": "ventura",
"version": "1.0.0-2",
"version": "1.0.0",
"repository": "git@github.com:kodiak-packages/ventura.git",

@@ -15,4 +15,8 @@ "author": "Kodiak",

"start": "docz dev",
"build": "rm -rf dist && tsc && cpx './src/**/*.css' 'dist'",
"test": "jest --detectOpenHandles --watchAll",
"document": "docz build",
"build": "rm -rf dist && tsc -b -v && cpx './src/**/*.css' 'dist'"
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "yarn lint --fix",
"release": "semantic-release"
},

@@ -24,2 +28,7 @@ "peerDependencies": {

"devDependencies": {
"@testing-library/jest-dom": "^5.5.0",
"@testing-library/react": "^10.0.3",
"@testing-library/user-event": "^10.1.0",
"@types/classnames": "^2.2.10",
"@types/jest": "^25.2.1",
"@types/react": "^16.9.34",

@@ -33,2 +42,3 @@ "@types/react-dom": "^16.9.6",

"eslint-config-prettier": "^6.9.0",
"eslint-config-react-app": "^5.2.1",
"eslint-import-resolver-typescript": "^2.0.0",

@@ -43,9 +53,14 @@ "eslint-plugin-ban": "1.4.0",

"firebase-tools": "^8.1.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^25.4.0",
"prettier": "^2.0.4",
"react": "^16",
"react-dom": "^16",
"semantic-release": "^17.0.7",
"ts-jest": "^25.4.0",
"typescript": "^3.8.3"
},
"dependencies": {
"modern-css-reset": "^1.1.0"
"classnames": "^2.2.6",
"react-feather": "^2.0.8"
},

@@ -57,4 +72,23 @@ "keywords": [

"ui",
"component",
"library"
]
],
"release": {
"branches": [
"master"
]
},
"jest": {
"preset": "ts-jest",
"roots": [
"<rootDir>/src"
],
"collectCoverageFrom": [
"src/**/*.{ts,tsx}",
"!src/**/*.d.ts"
],
"moduleNameMapper": {
"^.+\\.css$": "identity-obj-proxy"
}
}
}

@@ -1,13 +0,53 @@

# Venture component library
TODO: Display logo
## Development
# Ventura React component library
```sh
yarn start
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/kodiak-packages/ventura/Test%20and%20lint/master?label=CI%20test%2Flint) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/kodiak-packages/ventura/Build%20and%20release/master?label=CI%20build%2Frelease) ![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/kodiak-packages/ventura) ![npm](https://img.shields.io/npm/v/ventura) ![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)
A lightweight, themable react component library from 2020
- 📘 Typescript support
- 🎨 Theme with CSS variables
- 📎 All components support className and ref props
- 🐦 Icons from [Feather Icons](https://feathericons.com)
## Documentation
You can find examples of all of our components in the documentation.
[➡️ Go to full documentation](https://kodiak-packages.github.io/ventura)
This library is documented using [Docz](https://www.docz.site/).
## Getting started
```
yarn add ventura
```
## Generate documentation
```
npm install ventura
```
```sh
yarn document
```
### Usage
```jsx
import { Button } from 'ventura';
const MyComponent = () => {
return <Button>Click me</Button>;
};
```
## Theming
TODO
## Browser support
TODO
## Contributing
TODO

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