@octo-produits-internes/design-system
v1.4.13
Published
Package for implementation of OCTO's design system
Readme
OCTO Design System
Package for implementation of OCTO's design system.
1. Getting started
With a package manager
- Install the package :
yarn add @octo-produits-internes/design-system- Import the design system package in your script :
import { theme } from '@octo-produits-internes/design-systemOn a static website
Add the
unpkg.comorigin to yourscript-srcandfont-srcCSPs.Add the package script tag to your HTML page :
<script src="https://unpkg.com/@octo-produits-internes/design-system"></script>- Import the package namespace in your script :
const { theme } = OctoDesignSystem2. Documentation
Before document loading :
- a new "octo" CSS class is added with basic styling
- the following CSS variables become available
--octo-marine-[100, 70, 50, 20, or 5]--octo-turquoise-[100, 70, 50, 20, or 5]--octo-cyan-[100, 70, 50, 20, or 5]--octo-green-[100, 70, 50, 20, or 5]--octo-yellow-[100, 70, 50, 20, or 5]--octo-orange-[100, 70, 50, 20, or 5]--octo-red-[100, 70, 50, 20, or 5]--octo-purple-[100, 70, 50, 20, or 5]--octo-white
- the following fonts become available
- Outfit
theme
theme.colors
Hash referencing allowed hexadecimal color values. Apart from white, all colors are a hash of tints (100, 70, 50, 20, or 5). Available colors are :
- marine
- turquoise
- green
- yellow
- orange
- red
- purple
- white
theme.fonts
Hash referencing all font-family names. Available fonts are :
- outfit
3. Development
Clone this repository and install all dependencies with yarn install --check-files. Then, the following commands will be usable :
yarn start:example: starts a headless server atlocalhost:8080to show a use case example (defined insrc/main.example.ts)yarn start:example:ssl: same asyarn start:examplebut the server will serve over HTTPS, as long as you have bothcerts/octopod-auth.pemandcerts/octopod-auth-key.pemyarn reinstall: reinstalls all dependencies in a clean stateyarn build: transpiles the project from Typescript to a Javascript module indistyarn build:pack: same asyarn buildbut compiles the code and packs it for browser useyarn build:pack:example: same asyarn build:packbut writes the output pack file toexample, alongside all the assets and the source map fileyarn build:pack:production: same asyarn build:packbut writes the output pack file todist/packs, alongside the imported assets and without the source map fileyarn test: starts tests for the specified file if specified, all files if notyarn test:watch: same asyarn test, but will run in watch modeyarn test:output: same asyarn test, but will output the results insrc/config/jest/jest.result.jsonyarn test:coverage: same asyarn test:output, but will output the coverage in the console and insrc/config/jest/coverage/yarn test:coverage:inspect: same asyarn test:coverage, but will start a headless server atlocalhost:8081to show coverage resultsyarn lint:code: lint the specified TS fileyarn lint:code:all: same asyarn lint:code, but lints on all TS filesyarn lint:style: lint the specified style fileyarn lint:style:all: same asyarn lint:style, but lints on all style files
4. License
All rights reserved to OCTO Technology (France). Credit goes to the Produits Internes team. Use for other businesses is strictly prohibited.
