From 879ef900755c03982d11454014cc264a03516c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Sim=C3=A3o?= Date: Fri, 15 Sep 2023 10:32:38 +0100 Subject: [PATCH] chore: add documenation --- .commitlintrc.cjs | 18 +++---- CONTRIBUTING.MD | 4 +- README.md | 66 ++++++++++++++++++++++++-- packages/components/README.md | 11 +++++ packages/components/package.json | 57 +++++++++++++++------- packages/components/src/index.ts | 1 + packages/core/system/README.md | 21 ++++++++ packages/core/system/package.json | 35 ++++++++++---- packages/core/theme/README.md | 21 ++++++++ packages/core/theme/package.json | 38 +++++++++++++-- packages/hooks/README.md | 21 ++++++++ packages/hooks/package.json | 33 ++++++++++--- packages/icons/coin-icons/README.md | 13 +++++ packages/icons/coin-icons/package.json | 30 ++++++++++-- packages/icons/common/CHANGELOG.md | 62 ++++++++++++++++++++++++ packages/icons/common/README.md | 21 ++++++++ packages/icons/common/package.json | 28 +++++++++-- packages/icons/icon/README.md | 13 +++++ packages/icons/icon/package.json | 36 +++++++++++--- pnpm-lock.yaml | 3 ++ 20 files changed, 462 insertions(+), 70 deletions(-) create mode 100644 packages/components/README.md create mode 100644 packages/core/system/README.md create mode 100644 packages/core/theme/README.md create mode 100644 packages/hooks/README.md create mode 100644 packages/icons/coin-icons/README.md create mode 100644 packages/icons/common/CHANGELOG.md create mode 100644 packages/icons/common/README.md create mode 100644 packages/icons/icon/README.md diff --git a/.commitlintrc.cjs b/.commitlintrc.cjs index ad3992241..06f918937 100644 --- a/.commitlintrc.cjs +++ b/.commitlintrc.cjs @@ -1,16 +1,12 @@ -const conventional = require("@commitlint/config-conventional"); +const conventional = require('@commitlint/config-conventional'); module.exports = { - extends: ["@commitlint/config-conventional"], - plugins: ["commitlint-plugin-function-rules"], - helpUrl: "https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.MD#commit-convention", + extends: ['@commitlint/config-conventional'], + plugins: ['commitlint-plugin-function-rules'], + helpUrl: 'https://github.com/interlay/ui/blob/main/CONTRIBUTING.MD#commit-convention', rules: { ...conventional.rules, - "type-enum": [ - 2, - "always", - ["feat", "feature", "fix", "refactor", "docs", "build", "test", "ci", "chore"], - ], - "function-rules/header-max-length": [0], - }, + 'type-enum': [2, 'always', ['feat', 'feature', 'fix', 'refactor', 'docs', 'build', 'test', 'ci', 'chore']], + 'function-rules/header-max-length': [0] + } }; diff --git a/CONTRIBUTING.MD b/CONTRIBUTING.MD index c14345e1c..b9c19bdc1 100644 --- a/CONTRIBUTING.MD +++ b/CONTRIBUTING.MD @@ -1,6 +1,6 @@ -# Next UI Contributing Guide +# Interlay UI Contributing Guide -Hello!, I am very excited that you are interested in contributing with Next UI. However, before submitting your contribution, be sure to take a moment and read the following guidelines. +Hello!, I am very excited that you are interested in contributing with Interlay UI. However, before submitting your contribution, be sure to take a moment and read the following guidelines. - [Extraction request guidelines](#pull-request-guidelines) - [Development Setup](#development-setup) diff --git a/README.md b/README.md index eb4b9f6a3..3c22d30b2 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,71 @@

-

InterlayUI

+

Interlay UI


-## Getting Started +Interlay IU is library of accessible, reusable, and composable React components built +around a crypto business model -[TODO] +## Table of contents -### Community +- 🚀 [Features](#features) +- 📦 [Installation](#installation) +- 💻 [Usage](#usage) +- 📝 [Contributing](#contributing) +- ⚖️ [License](#license) -[TODO] +## Features + +- Ease of Styling: style your component simply by passing props +- Flexible & composable: Interlay UI components are built on top of a React UI + Primitive for endless composability. +- Accessible. Interlay UI components follow the WAI-ARIA guidelines specifications + and have the right `aria-*` attributes by using `react-aria` as foundation. + +## Installation + +To use Interlay UI components, all you need to do is install the +`@interlay/ui` package and its peer dependencies: + +```sh +# with Yarn +$ yarn add @interlay/ui styled-components + +# with npm +$ npm i @interlay/ui styled-components + +# with pnpm +$ pnpm add @interlay/ui styled-components + +# with Bun +$ bun add @interlay/ui styled-components +``` + +## Usage + +To start using the components, please follow these steps: + +1. Wrap your application with the `InterlayUIProvider` provided by + **@interlay/ui**. + +```jsx +import { InterlayUIProvider } from '@interlay/ui'; + +// Do this at the root of your application +function App({ children }) { + return {children}; +} +``` + +2. Now you can start using components like so!: + +```jsx +import { CTA } from '@interlay/ui'; + +function Example() { + return I am using Interlay UI; +} +``` ## Contributing diff --git a/packages/components/README.md b/packages/components/README.md new file mode 100644 index 000000000..2bffc4d8c --- /dev/null +++ b/packages/components/README.md @@ -0,0 +1,11 @@ +

+

Interlay UI

+

+
+ +Interlay IU is library of accessible, reusable, and composable React components built +around a crypto business model + +## More infomation + +See [README.md](https://github.com/interlay/ui/blob/master/README.md). diff --git a/packages/components/package.json b/packages/components/package.json index b4b5a961b..e1e8daf1f 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,35 +1,42 @@ { - "name": "@just_testing13/components", + "name": "@just_testing13/ui", "version": "0.1.4", + "description": "Interlay UI library.", + "homepage": "https://github.com/interlay/ui#readme", + "license": "MIT", + "keywords": [ + "interlay", + "interlay ui", + "components", + "modern components", + "react components", + "react ui" + ], "main": "src/index.ts", "files": [ "dist" ], - "license": "MIT", "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/interlay/ui.git", + "directory": "packages/components" + }, + "bugs": { + "url": "https://github.com/interlay/ui/issues" + }, "scripts": { "lint": "eslint .", "lint:fix": "eslint . --ext ts,tsx --fix", + "clean": "rimraf dist .turbo", "typecheck": "tsc --noEmit", "build": "tsup src/index.ts --dts", "prepack": "clean-package", "postpack": "clean-package restore" }, - "devDependencies": { - "@react-types/grid": "^3.2.0", - "@react-types/shared": "^3.19.0", - "@types/react-transition-group": "^4.4.6", - "@types/styled-components": "^5.1.26", - "clean-package": "^2.2.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "styled-components": "^6.0.7" - }, - "peerDependencies": { - "react": ">=18", - "react-dom": ">=18", - "styled-components": ">=6.0.0" - }, "dependencies": { "@just_testing13/hooks": "workspace:*", "@just_testing13/icons": "workspace:*", @@ -37,6 +44,7 @@ "@just_testing13/theme": "workspace:*", "@just_testing13/test-utils": "workspace:*", "@just_testing13/icon": "workspace:*", + "@just_testing13/system": "workspace:*", "@react-aria/accordion": "3.0.0-alpha.20", "@react-aria/breadcrumbs": "^3.5.4", "@react-aria/button": "^3.8.1", @@ -73,5 +81,20 @@ "@react-types/meter": "^3.3.3", "react-transition-group": "^4.4.5" }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18", + "styled-components": ">=6.0.0" + }, + "devDependencies": { + "@react-types/grid": "^3.2.0", + "@react-types/shared": "^3.19.0", + "@types/react-transition-group": "^4.4.6", + "@types/styled-components": "^5.1.26", + "clean-package": "^2.2.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "styled-components": "^6.0.7" + }, "clean-package": "../../clean-package.config.json" } diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 3640506f0..36ccbcb01 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -67,3 +67,4 @@ export type { TooltipProps } from './Tooltip'; export { Tooltip } from './Tooltip'; export { Icon } from '@just_testing13/icon'; export type { IconProps, IconSize } from '@just_testing13/icon'; +export * from '@just_testing13/system'; diff --git a/packages/core/system/README.md b/packages/core/system/README.md new file mode 100644 index 000000000..6216e44c2 --- /dev/null +++ b/packages/core/system/README.md @@ -0,0 +1,21 @@ +# @interlay/system + +Interlay UI system primitives, `InterlayUIProvider` and some other utilities. + +## Installation + +```sh +yarn add @interlay/system +# or +npm i @interlay/system +``` + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/interlay/ui/blob/master/CONTRIBUTING.MD) +for details. + +## License + +[MIT](https://choosealicense.com/licenses/mit/) diff --git a/packages/core/system/package.json b/packages/core/system/package.json index 3d250af8f..bfa2e91d5 100644 --- a/packages/core/system/package.json +++ b/packages/core/system/package.json @@ -1,32 +1,51 @@ { "name": "@just_testing13/system", "version": "0.0.0", + "description": "Interlay UI system primitives.", + "homepage": "https://github.com/interlay/ui#readme", + "license": "MIT", + "keywords": [ + "interlay", + "interlay ui", + "system" + ], "main": "src/index.ts", "files": [ "dist" ], - "license": "MIT", "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/interlay/ui.git", + "directory": "packages/core/system" + }, + "bugs": { + "url": "https://github.com/interlay/ui/issues" + }, "scripts": { "lint": "eslint .", "lint:fix": "eslint . --ext ts,tsx --fix", + "clean": "rimraf dist .turbo", "typecheck": "tsc --noEmit", "build": "tsup src/index.ts --dts", "prepack": "clean-package", "postpack": "clean-package restore" }, - "devDependencies": { - "clean-package": "^2.2.0", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "dependencies": { + "@react-aria/overlays": "^3.16.0", + "@react-aria/i18n": "^3.8.1" }, "peerDependencies": { "react": ">=18", "react-dom": ">=18" }, - "dependencies": { - "@react-aria/overlays": "^3.16.0", - "@react-aria/i18n": "^3.8.1" + "devDependencies": { + "clean-package": "^2.2.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "clean-package": "../../../clean-package.config.json" } diff --git a/packages/core/theme/README.md b/packages/core/theme/README.md new file mode 100644 index 000000000..9c38bf21f --- /dev/null +++ b/packages/core/theme/README.md @@ -0,0 +1,21 @@ +# @interlay/theme + +Interlay UI components theme. + +## Installation + +```sh +yarn add @interlay/theme +# or +npm i @interlay/theme +``` + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/interlay/ui/blob/master/CONTRIBUTING.MD) +for details. + +## License + +[MIT](https://choosealicense.com/licenses/mit/) diff --git a/packages/core/theme/package.json b/packages/core/theme/package.json index 429f9b29c..9b64ce1cb 100644 --- a/packages/core/theme/package.json +++ b/packages/core/theme/package.json @@ -1,25 +1,53 @@ { "name": "@just_testing13/theme", "version": "0.1.3", - "main": "src/index.ts", + "description": "The default theme for Interlay UI components", + "homepage": "https://github.com/interlay/ui#readme", "license": "MIT", + "keywords": [ + "interlay", + "interlay ui", + "theme", + "theming", + "design", + "ui", + "components", + "classNames", + "css" + ], + "main": "src/index.ts", + "files": [ + "dist" + ], "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/interlay/ui.git", + "directory": "packages/core/theme" + }, + "bugs": { + "url": "https://github.com/interlay/ui/issues" + }, "scripts": { "lint": "eslint .", "lint:fix": "eslint . --ext ts,tsx --fix", + "clean": "rimraf dist .turbo", "typecheck": "tsc --noEmit", "build": "tsup", "prepack": "clean-package", "postpack": "clean-package restore" }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, "devDependencies": { "clean-package": "^2.2.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, - "peerDependencies": { - "react": ">=18", - "react-dom": ">=18" - }, "clean-package": "./clean-package.config.json" } diff --git a/packages/hooks/README.md b/packages/hooks/README.md new file mode 100644 index 000000000..e70a94299 --- /dev/null +++ b/packages/hooks/README.md @@ -0,0 +1,21 @@ +# @interlay/hooks + +Interlay UI hooks. + +## Installation + +```sh +yarn add @interlay/hooks +# or +npm i @interlay/hooks +``` + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/interlay/ui/blob/master/CONTRIBUTING.MD) +for details. + +## License + +[MIT](https://choosealicense.com/licenses/mit/) diff --git a/packages/hooks/package.json b/packages/hooks/package.json index e20b4f479..f7c686317 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -1,31 +1,50 @@ { "name": "@just_testing13/hooks", "version": "0.1.3", + "description": "Interlay UI hooks", + "homepage": "https://github.com/interlay/ui#readme", + "license": "MIT", + "keywords": [ + "interlay", + "interlay ui", + "hooks" + ], "main": "src/index.ts", "files": [ "dist" ], - "license": "MIT", "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/interlay/ui.git", + "directory": "packages/hooks" + }, + "bugs": { + "url": "https://github.com/interlay/ui/issues" + }, "scripts": { "lint": "eslint .", "lint:fix": "eslint . --ext ts,tsx --fix", + "clean": "rimraf dist .turbo", "typecheck": "tsc --noEmit", "build": "tsup src/index.ts --dts", "prepack": "clean-package", "postpack": "clean-package restore" }, - "devDependencies": { - "clean-package": "^2.2.0", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "dependencies": { + "@just_testing13/theme": "workspace:*" }, "peerDependencies": { "react": ">=18", "react-dom": ">=18" }, - "dependencies": { - "@just_testing13/theme": "workspace:*" + "devDependencies": { + "clean-package": "^2.2.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "clean-package": "../../clean-package.config.json" } diff --git a/packages/icons/coin-icons/README.md b/packages/icons/coin-icons/README.md new file mode 100644 index 000000000..5d1dfe7b1 --- /dev/null +++ b/packages/icons/coin-icons/README.md @@ -0,0 +1,13 @@ +# @interlay/coin-icons + +Interlay UI internal coin icons. + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/interlay/ui/blob/master/CONTRIBUTING.MD) +for details. + +## License + +[MIT](https://choosealicense.com/licenses/mit/) diff --git a/packages/icons/coin-icons/package.json b/packages/icons/coin-icons/package.json index 6d85b37b6..cc6f977c4 100644 --- a/packages/icons/coin-icons/package.json +++ b/packages/icons/coin-icons/package.json @@ -1,21 +1,44 @@ { "name": "@just_testing13/coin-icons", + "private": true, "version": "0.0.0", + "description": "Internal coin icons used in Interlay UI components", + "homepage": "https://github.com/interlay/ui#readme", + "license": "MIT", + "keywords": [ + "interlay", + "interlay ui", + "coin icons", + "icons" + ], "main": "src/index.ts", - "private": true, "files": [ "dist" ], - "license": "MIT", "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/interlay/ui.git", + "directory": "packages/icons/coin-icons" + }, + "bugs": { + "url": "https://github.com/interlay/ui/issues" + }, "scripts": { "lint": "eslint .", "lint:fix": "eslint . --ext ts,tsx --fix", + "clean": "rimraf dist .turbo", "typecheck": "tsc --noEmit", "build": "tsup src/index.ts --dts", "prepack": "clean-package", "postpack": "clean-package restore" }, + "dependencies": { + "@just_testing13/icon": "workspace:*" + }, "peerDependencies": { "react": ">=18", "react-dom": ">=18" @@ -25,8 +48,5 @@ "react": "^18.2.0", "react-dom": "^18.2.0" }, - "dependencies": { - "@just_testing13/icon": "workspace:*" - }, "clean-package": "../../../clean-package.config.json" } diff --git a/packages/icons/common/CHANGELOG.md b/packages/icons/common/CHANGELOG.md new file mode 100644 index 000000000..f2309877a --- /dev/null +++ b/packages/icons/common/CHANGELOG.md @@ -0,0 +1,62 @@ +# @just_testing13/hooks + +## 0.1.3 + +### Patch Changes + +- css +- Updated dependencies + - @just_testing13/theme@0.1.3 + +## 0.1.2 + +### Patch Changes + +- failed +- Updated dependencies + - @just_testing13/theme@0.1.2 + +## 0.1.1 + +### Patch Changes + +- c86347b: fixing icons +- testing +- Updated dependencies [c86347b] +- Updated dependencies + - @just_testing13/theme@0.1.1 + +## 0.1.0 + +### Minor Changes + +- testing + +### Patch Changes + +- Updated dependencies + - @just_testing13/theme@0.1.0 + +## 0.0.0 + +### Minor Changes + +- test +- test + +### Patch Changes + +- Updated dependencies +- Updated dependencies + - @just_testing13/theme@0.0.0 + +## 0.0.0-dev-20230913104927 + +### Minor Changes + +- fix + +### Patch Changes + +- Updated dependencies + - @just_testing13/theme@0.0.0-dev-20230913104927 diff --git a/packages/icons/common/README.md b/packages/icons/common/README.md new file mode 100644 index 000000000..216b449f7 --- /dev/null +++ b/packages/icons/common/README.md @@ -0,0 +1,21 @@ +# @interlay/hooks + +Interlay UI icons, also used in components. + +## Installation + +```sh +yarn add @interlay/icons +# or +npm i @interlay/icons +``` + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/interlay/ui/blob/master/CONTRIBUTING.MD) +for details. + +## License + +[MIT](https://choosealicense.com/licenses/mit/) diff --git a/packages/icons/common/package.json b/packages/icons/common/package.json index d658ffffe..6a1dcaa9a 100644 --- a/packages/icons/common/package.json +++ b/packages/icons/common/package.json @@ -1,20 +1,43 @@ { "name": "@just_testing13/icons", "version": "0.1.3", + "description": "Interlay UI icons, commonly used in components", + "homepage": "https://github.com/interlay/ui#readme", + "license": "MIT", + "keywords": [ + "interlay", + "interlay ui", + "icons", + "components" + ], "main": "src/index.ts", "files": [ "dist" ], - "license": "MIT", "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/interlay/ui.git", + "directory": "packages/icons/common" + }, + "bugs": { + "url": "https://github.com/interlay/ui/issues" + }, "scripts": { "lint": "eslint .", "lint:fix": "eslint . --ext ts,tsx --fix", + "clean": "rimraf dist .turbo", "typecheck": "tsc --noEmit", "build": "tsup src/index.ts --dts", "prepack": "clean-package", "postpack": "clean-package restore" }, + "dependencies": { + "@just_testing13/icon": "workspace:*" + }, "peerDependencies": { "react": ">=18", "react-dom": ">=18" @@ -24,8 +47,5 @@ "react": "^18.2.0", "react-dom": "^18.2.0" }, - "dependencies": { - "@just_testing13/icon": "workspace:*" - }, "clean-package": "../../../clean-package.config.json" } diff --git a/packages/icons/icon/README.md b/packages/icons/icon/README.md new file mode 100644 index 000000000..4483f4a2f --- /dev/null +++ b/packages/icons/icon/README.md @@ -0,0 +1,13 @@ +# @interlay/icon + +Base component for icons. + +## Contribution + +Yes please! See the +[contributing guidelines](https://github.com/interlay/ui/blob/master/CONTRIBUTING.MD) +for details. + +## License + +[MIT](https://choosealicense.com/licenses/mit/) diff --git a/packages/icons/icon/package.json b/packages/icons/icon/package.json index ae1870e50..c9d900d83 100644 --- a/packages/icons/icon/package.json +++ b/packages/icons/icon/package.json @@ -1,17 +1,43 @@ { "name": "@just_testing13/icon", + "private": true, "version": "0.0.0", + "description": "Internal base component for icons", + "homepage": "https://github.com/interlay/ui#readme", + "license": "MIT", + "keywords": [ + "interlay", + "interlay ui", + "svg", + "icons" + ], "main": "src/index.ts", - "private": true, "files": [ "dist" ], - "license": "MIT", "sideEffects": false, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/interlay/ui.git", + "directory": "packages/icons/icons" + }, + "bugs": { + "url": "https://github.com/interlay/ui/issues" + }, "scripts": { "lint": "eslint .", "lint:fix": "eslint . --ext ts,tsx --fix", - "typecheck": "tsc --noEmit" + "clean": "rimraf dist .turbo", + "typecheck": "tsc --noEmit", + "build": "tsup src/index.ts --dts", + "prepack": "clean-package", + "postpack": "clean-package restore" + }, + "dependencies": { + "@just_testing13/theme": "workspace:*" }, "peerDependencies": { "react": ">=18", @@ -25,7 +51,5 @@ "react-dom": "^18.2.0", "styled-components": "^6.0.7" }, - "dependencies": { - "@just_testing13/theme": "workspace:*" - } + "clean-package": "../../../clean-package.config.json" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99654397f..8fe16cf24 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -186,6 +186,9 @@ importers: '@just_testing13/icons': specifier: workspace:* version: link:../icons/common + '@just_testing13/system': + specifier: workspace:* + version: link:../core/system '@just_testing13/test-utils': specifier: workspace:* version: link:../utilities/test-utils