# osp-lit-common

> Common web components for the OSP ecosystem

Latest version **0.1.0** (published 2019-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install osp-lit-common
pnpm add osp-lit-common
yarn add osp-lit-common
bun add osp-lit-common
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-02-18 |
| First published | 2018-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | yes |
| Maintainers | snyder13 |

## Links

- npm: https://www.npmjs.com/package/osp-lit-common
- Repository: https://gitlab.hubzero.org/onescienceplace/osp-lit-common
- npm.io page: https://npm.io/package/osp-lit-common

## Dependencies (11)

- [d3](https://npm.io/package/d3.md) ^5.7.0
- [prompt](https://npm.io/package/prompt.md) ^1.0.0
- [debounce](https://npm.io/package/debounce.md) ^1.2.0
- [lit-element](https://npm.io/package/lit-element.md) ^2.0.0-rc.5
- [markdown-it](https://npm.io/package/markdown-it.md) ^8.4.2
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.0.0
- [autocomplete.js](https://npm.io/package/autocomplete.js.md) ^0.35.0
- [markdown-it-emoji](https://npm.io/package/markdown-it-emoji.md) ^1.4.0
- [postcss-preset-env](https://npm.io/package/postcss-preset-env.md) ^6.4.0
- [babel-plugin-inline-svg](https://npm.io/package/babel-plugin-inline-svg.md) ^1.0.0
- [babel-plugin-inline-import-data-uri](https://npm.io/package/babel-plugin-inline-import-data-uri.md) ^1.0.1

## Recent versions

- 0.1.0 (latest) — 2019-02-18
- 0.0.4 — 2019-02-05
- 0.0.3 — 2019-02-01
- 0.0.2 — 2018-12-17
- 0.0.1 — 2018-12-10

## README

# osp-lit-common

This repo contains some general-use components implementing the OSP design language and assorted simple functionality.

## API Documentation

Static docs, which may not correspond exactly to your version: https://rmer.info/osp

To run your own synchronized version:

 * `git clone (this repo)`
 * (in repo dir) `yarn install`
 * `yarn watch`
 * Visit `http://localhost:8080`


### Writing new web components

 * `yarn add osp-lit-common`
 * Follow `lit-element` and `lit-html` docs, except inherit from `OspElement` instead, and use its provided registry in preference to `customElements`:

```
import { OspElement } from 'osp-lit-common';

export class OspMyFooComponent extends OspElement {
	// ...
}
OspElement.define(OspMyFooComponent);
```

Also, in your template, import `html` and similar utilities from `osp-lit-common` as well, instead of directly referencing `lit-element` or `lit-html`.


More information about this is above in the API documentation.

### Using components (in a lit-based app, or in another context like React, Vue, vanilla JS, etc)

TODO: there should be a bundle URL you can link from OSP to get all the common components while taking advantage of the client cache to not duplicate them between pages.

Until that's configured:
 * `yarn add osp-lit-common`
 * `import` components as needed, e.g: `import { OspInput } from 'osp-lit-common/src/components/Input'`
 * Use the corresponding tags as needed in your templates, `<osp-input label="Test"></osp-input>`

---
_Source: https://npm.io/package/osp-lit-common · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
