1.2.5 • Published 1 year ago

@sobolt/sobolt-components v1.2.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Built With Stencilnpm

Sobolt Components

Web Component library for Sobolt's design system.

Installation

npm i @sobolt/sobolt-components

Development / Component building

npm install to install packages, followed by npm start to start the development server

Development / Storybook

To work with storybook, open 2 terminals and in the first terminal run npm run watch and in the second terminal run npm run start-storybook The first command will open a development server that keeps track of updates, so that storybook, which will open in a separate tab, will also reflect updates.

React

To use with React, follow the following instructions:

In your index.js file, import the necessary loaders:

import {
	applyPolyfills,
	defineCustomElements,
} from "@sobolt/sobolt-components/loader"

Then apply the polyfills and define the custome lements

applyPolyfills().then(() => {
	defineCustomElements()
})

Angular

To use with Angular, follow the following instructions:

  • Include CUSTOM_ELEMENTS_SCHEMA within your modules that use components, for example within AppModule
  • Call defineCustomElements() from main.ts (or other place)
// within main.ts -> also apply polyfills for different browser support

import { applyPolyfills, defineCustomElements } from  "@sobolt/sobolt-components/loader";

if (environment.production) {
  enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.log(err));

applyPolyfills().then(() => {
	defineCustomElements()
})
// within module or wherever you're going to define custom schema elements

import { BrowserModule } from '@angular/platform-browser';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, FormsModule],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}

For more information on integrating with Angular visit the official Stencil docs

After integrating the library, you can use every sobolt component available

Documentation

Sobolt Components Documentation, please contact Sobolt for login credentials

Request Sobolt Component

Coming soon

Global Styles

For now, global styling only works with font-sizes and widths of contained elements of your choosing for each breakpoint. These widths work with navbar, but you can also choose to add these widths to whatever component you want. Inside your main css file (e.g. main.scss), and add the following variables to the root to control the widths and font-sizes:

:root {
	--largeScreenWidth: 1200px;
	--mediumScreenWidth: 890px;
	--smallScreenWidth: 600px;
	--tabletScreenWidth: 480px;
	--mobileScreenWidth: 320px;

	--body: 13px;
}

Patch 0.2.1 notes

  • Replaced functions wth event emitters
  • Updated storybooks with methods & eventemitters
  • Fixed dropdown and added width and color customization to button
  • Fixed bug in select component that makes it automatically choose first option in select content list
1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.2.5

1 year ago

1.0.7

2 years ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.2.10

2 years ago

0.2.7

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.2.6

3 years ago

0.2.3

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.0.4

3 years ago