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

@rakuten-rex/form-input-label

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rakuten-rex/form-input-label - npm Package Compare versions

Comparing version

to
1.0.0

create.js

8

index.js
'use strict';
if (process.env.NODE_ENV === 'production') {
require('./index.production.min.css');
module.exports = require('./index.production.min.js');
} else {
require('./index.development.css');
module.exports = require('./index.development.js');
}
module.exports = require('./FormInputLabel/index.js');
{
"name": "@rakuten-rex/form-input-label",
"version": "0.0.3",
"description": "ReX React UI Component",
"main": "src/index.jsx",
"version": "1.0.0",
"description": "FormInputLabel component",
"main": "index.js",
"bin": {
"create": "./create.js"
},
"repository": {

@@ -42,9 +45,5 @@ "type": "git",

"peerDependencies": {
"react": "^16.8.3",
"react-dom": "^16.8.3"
},
"devDependencies": {
"react": "^16.8.3",
"react-dom": "^16.8.3"
"react": "^16.12.0",
"react-dom": "^16.12.0"
}
}

@@ -1,24 +0,19 @@

# ReX React UI Components Library
## ReX React UI Component: form-input-label
# ReX React UI Component: form-input-label
This project is part of ReX Design Language and it can be used to create React UI Components.
For more information visit:
This project is part of ReX Design System and it can be used to create UI Components compatible with:
Github
https://github.com/rakuten-rex
React, HTML/CSS and Vue.js
NPM
https://www.npmjs.com/org/rakuten-rex
# How to install
How it was built:
<img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/npm.svg?sanitize=true" height="16" />
1. webpack 4 (static module bundler)
1. HTML5
1. CSS3 & Sass (Normalize.css + Fork of Bootstrap project + ReX custom styles)
1. JavaScript ES6 Modules & Components based on React
```
npm install @rakuten-rex/form-input-label@1.0.0 --save
```
# How to install
<img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/yarn.svg?sanitize=true" height="16" />
```
npm install @rakuten-rex/form-input-label@0.0.3 --save
yarn add @rakuten-rex/form-input-label@1.0.0
```

@@ -28,108 +23,224 @@

## 1) Storybook Live examples
## Storybook Live examples
For a complete guide of properties for React and HTML classes please visit the Storybook site:
For a complete guide of properties for React and HTML classes please visit our Storybook page:
https://rakuten-rex.github.io/form-input-label/
[<img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/storybook.svg?sanitize=true" height="16" />](https://rakuten-rex.github.io/form-input-label/)
## 2) Choose the distribution builds
https://rakuten-rex.github.io/form-input-label/
### ReX Component + ReX Core (with ReX Fonts)
For projects with full ReX implementation.
**Storybook features**
- [x] Stories by component types
- [x] HTML raw output
- [x] JSX output
- [x] Stories source code
- [x] Knobs with multiple options
```js
import RexComponent from '@rakuten-rex/form-input-label';
# How to integrate ReX in your project
## A) JavaScript modules
### <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/react.svg?sanitize=true" height="16" /> React component (JavaScript + CSS Styles)
For plug and play components integration.
Example:
`my-component.jsx`
```jsx
import MyComponent from '@rakuten-rex/form-input-label';
function MyCustomComponent() {
return (
<MyComponent />
);
}
```
### ReX Component + ReX Core (without ReX Fonts)
For integration projects.
[Click here](https://rakuten-rex.github.io/form-input-label/) to see all working examples in Storybook.
```js
import RexComponent from '@rakuten-rex/form-input-label/without-fonts.js';
### <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/css-3.svg?sanitize=true" height="16" /> CSS Styles only
For your own JavaScript integration (React, Vue, Angular, etc.) or Static HTML.
#### Using CSS Variables (Modern Websites and WebApps)
Example:
`my-component.jsx`
```jsx
import '@rakuten-rex/form-input-label/MyComponent/css';
function MyCustomComponent() {
return (
<div class="rex-my-component" role="presentation">
<img src="static/media/Image.jpg" alt="Basic example" style="width:100%" />
<h3>Hello World</h3>
<p>This is a basic example for ReX React Components Starter Kit</p>
</div>
);
}
```
### ReX Component Only (without ReX Core)
#### Using Static CSS (Legacy Websites)
For integration projects using Static HTML or if you use a build tools without duplicated CSS classes removal.
Example:
Note: Requires global import of ReX Core.
`my-component.jsx`
```js
import RexComponent from '@rakuten-rex/form-input-label/without-core.js';
```jsx
import '@rakuten-rex/form-input-label/MyComponent/css/static';
function MyCustomComponent() {
return (
<div class="rex-my-component" role="presentation">
<img src="static/media/Image.jpg" alt="Basic example" style="width:100%" />
<h3>Hello World</h3>
<p>This is a basic example for ReX React Components Starter Kit</p>
</div>
);
}
```
# How to integrate ReX in your project
## A) JavaScript modules
[Click here](https://rakuten-rex.github.io/form-input-label/) to see all working examples in Storybook.
### React component (JavaScript + CSS Styles)
For plug and play components integration.
### <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/sass.svg?sanitize=true" height="16" /> Sass mixins
For your own customization of styles (React, Vue, Angular, etc.) or Static HTML.
Example:
```js
import RexComponent from '@rakuten-rex/form-input-label';
`my-styles.scss`
function MyComponent() {
return <RexComponent>Hello World</RexComponent>;
```scss
@import '@rakuten-rex/form-input-label/MyComponent/sass/styles.mixin';
.my-component-with-rex-styles {
@include rex-my-component();
}
```
### CSS Styles only
### <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/vue.svg?sanitize=true" height="16" /> Vue.js
For your own JavaScript integration (React, Vue, Angular, etc.) or Static HTML.
A basic implementation based on HTML structure and import CSS styles into your component.
Example:
```js
import '@rakuten-rex/form-input-label/css';
`my-component.vue`
function MyComponent() {
return <h1 className="rex-core-h1 rex-h1">Hello World</h1>;
```vue
<template>
<div class="rex-my-component" role="presentation">
<img src="static/media/Image.jpg" alt="Basic example" style="width:100%" />
<h3>Hello World</h3>
<p>This is a basic example for ReX React Components Starter Kit</p>
</div>
</template>
<script>
export default {
name: 'MyComponent',
}
</script>
<style scoped>
@import "~@rakuten-rex/form-input-label/css";
</style>
```
## B) Static HTML
Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.
Copy-paste the stylesheet `<link>` into your `<head>` tag to load our CSS styles.
You can choose between `development` (dev comments and unminified) or `production` (without dev comments and minified) mode.
### Using CSS Variables (Modern Websites and WebApps)
**Production mode URL** (recommended for Static HTML projects):
```
https://unpkg.com/@rakuten-rex/form-input-label@1.0.0/MyComponent/MyComponent.production.min.css
```
We recommend to use `production` mode if your build process doesn't support to switch between both.
Development mode URL:
`https://r.r10s.jp/com/rex/form-input-label/0.0.3/form-input-label.development.css`
Development mode URL (for local testing):
Production mode URL:
`https://r.r10s.jp/com/rex/form-input-label/0.0.3/form-input-label.production.min.css`
```
https://unpkg.com/@rakuten-rex/form-input-label@1.0.0/MyComponent/MyComponent.development.css
```
### Single component integration
Add it from our CDN into your HTML template or HTML static page.
```markdown
<!-- ReX form-input-label -->
<link href="https://r.r10s.jp/com/rex/form-input-label/0.0.3/form-input-label.production.min.css" rel="stylesheet">
### Using Static CSS (Legacy Websites)
```
https://unpkg.com/@rakuten-rex/form-input-label@1.0.0/MyComponent/MyComponent.static.css
```
### Multiple component integration
### <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/html-5.svg?sanitize=true" height="16" /> Single component integration
Add it from unpkg.com CDN (NPM) into your HTML template or HTML static page.
Note: use `form-input-label-without-core.min.css` version to avoid duplicated code from ReX Core.
Example:
```markdown
<!-- ReX Core -->
<link href="https://r.r10s.jp/com/rex/core/2.3.1/full-version.production.min.css" rel="stylesheet">
`my-page.html`
<!-- ReX form-input-label -->
<link href="https://r.r10s.jp/com/rex/form-input-label/0.0.3/form-input-label-without-core.production.min.css" rel="stylesheet">
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>My Page</title>
<!-- ReX form-input-label -->
<link href="https://unpkg.com/@rakuten-rex/form-input-label@1.0.0/MyComponent/MyComponent.production.min.css" rel="stylesheet">
</head>
<body>
<div class="rex-my-component" role="presentation">
<img src="static/media/Image.jpg" alt="Basic example" style="width:100%" />
<h3>Hello World</h3>
<p>This is a basic example for ReX React Components Starter Kit</p>
</div>
</body>
</html>
```
Example:
## Documentation, source code and distribution
```markdown
<div class="rex-form-input-label">
<h1 class="rex-core-h1 rex-h1">Welcome to React</h1>
</div>
```
|| Site | URL |
|-------------| ------------- | ------------- |
|<img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/github-icon.svg?sanitize=true" height="16" />| Github (Source Code) | https://github.com/rakuten-rex |
|<img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/npm.svg?sanitize=true" height="16" />| NPM (Package distribution) | https://www.npmjs.com/org/rakuten-rex |
|<img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/zh_logo.svg?sanitize=true" height="16" />| ZeroHeight (Documentation) | https://zeroheight.com/390c074f3 |
## Project Stack
| Front-end |
|-------------|
| <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/html-5.svg?sanitize=true" height="16" /> HTML5 <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/css-3.svg?sanitize=true" height="16" /> CSS3 & Sass <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/javascript.svg?sanitize=true" height="16" /> JavaScript ES6 <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/react.svg?sanitize=true" height="16" /> React |
| Tools |
|-------------|
| <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/webpack.svg?sanitize=true" height="16" /> webpack <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/storybook-icon.svg?sanitize=true" height="16" /> Storybook <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/babel.svg?sanitize=true" height="16" /> Babel <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/eslint.svg?sanitize=true" height="16" /> ESLint <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/logos/prettier.svg?sanitize=true" height="16" /> Prettier |
## Features
| Styles features | JavaScript features |
|-------------|-------------|
| Theme support via CSS variables | React components splitted by type |
| Static CSS styles available for HTML/VueJS/AngularJS | Universal Module Definition support |
| Sass mixins for custom builds |
| Reset CSS styles already bundled by HTML tags |
| Removed duplicated CSS props |
| CSS classes prefix `rex-` |
## Browser Support
| PC | Mobile
|-------------|-------------|
| <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/browsers/chrome.svg?sanitize=true" height="14" /> Chrome 49+ | <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/browsers/apple.svg?sanitize=true" height="14" /> iOS 9+ (Safari 9.3+, Chrome 78+) |
| <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/browsers/safari.svg?sanitize=true" height="14" /> Safari 9.1+ | <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/browsers/android-icon.svg?sanitize=true" height="14" /> Android 6+ (Chrome 78+, Android Browser 76+) |
| <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/browsers/firefox.svg?sanitize=true" height="14" /> Firefox 31+ | |
| <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/browsers/microsoft-edge.svg?sanitize=true" height="14" /> MS Edge 15+ | |
| <img src="https://raw.githubusercontent.com/rakuten-rex/form-input-label/master/project-scripts/webpack/markdown/browsers/internetexplorer.svg?sanitize=true" height="14" /> IE 11+ | |