0.11.0 • Published 8 months ago

sanhaua v0.11.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Sanhauá

sanhauá logo

Design System named after the famous river in City of Parahyba.

Check out our live documentation.

Usage

This section describes how to import Sanhauá as an external package and use it within your project

Install Sanhauá

npm i sanhaua

If you need to use any component, import them as usual like:

<!-- src/App.vue -->

<script>
  import { uaButton } from 'sanhaua'
</script>

<template>
  <ua-button type="button" width-behavior="full">Botaozin</ua-button>
</template>

Import Sanhauá's styling to your project it in you main.js file:

// src/main.js

import 'sanhaua/dist/style.css'

If you have a bundler like Vite, you can also use our design system tokens on your application. Just install Sass. You should be able to import all tokens and properties into your own project this way:

// vite.config.js

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

const SELECTED_THEME = 'main'

export default defineConfig({
  plugins: [vue()],
  css: {
    preprocessorOptions: {
      scss: {
        api: 'modern-compiler', // We use sass-embedded, but if you use normal sass, just replace this with 'modern'
        additionalData: `
          @use 'sass:map';
          @import "sanhaua/system/themes/${SELECTED_THEME}/design-tokens/design-tokens.scss";
          @import "sanhaua/system/themes/${SELECTED_THEME}/global/global.scss";
          @import "sanhaua/system/themes/${SELECTED_THEME}/responsiveness/responsiveness.scss";
        `
      }
    }
  }
})

Development

Wanna play around with the design system in dev mode? Here's how to do it.

Recommended IDE Setup

VSCode + Volar.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Run documentation in dev mode

npm run docs

Lint with ESLint

npm run eslint

or

npm run eslint:fix

to force automatic fixes.

Lint with Stylelint

npm run stylelint

or

npm run stylelint:fix

Format with Prettier

npm run format
0.11.0

8 months ago

0.10.1

9 months ago

0.10.0

9 months ago

0.9.2

9 months ago

0.9.1

9 months ago

0.9.0

9 months ago

0.8.1

9 months ago

0.8.0

9 months ago

0.7.0

9 months ago

0.6.3

9 months ago

0.6.2

9 months ago

0.6.1

9 months ago

0.6.0

9 months ago

0.5.1

9 months ago

0.5.0

9 months ago

0.4.2

9 months ago

0.4.1

9 months ago

0.4.0

9 months ago

0.3.3

9 months ago

0.3.2

9 months ago

0.3.1

9 months ago

0.3.0

9 months ago

0.2.3

9 months ago

0.2.2

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.56

9 months ago

0.1.55

9 months ago

0.1.54

9 months ago

0.1.53

9 months ago

0.1.52

9 months ago

0.1.51

9 months ago

0.1.5

9 months ago

0.1.41

9 months ago

0.1.4

9 months ago

0.1.0

9 months ago