npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fintraffic/fds-coreui-components

v0.1.1

Published

Fintraffic Design System Core UI (Web) Components

Downloads

30

Readme

coreui-components

Fintraffic Design System's Core UI Components. Work heavily in progress.

Work is being done at Fintraffic Raide to get some basic web components added to this repository in the near future. After we've achieved some good enough baseline, we'll revisit governing and contribution guidelines and processes for the Design System's technical implementation.

Storybook

https://fintraffic-design.github.io/fds-coreui-components

Install

npm i --save @fintraffic/fds-coreui-components

Usage

Import and register a specific component

import '@fintraffic/fds-coreui-components/dist/define/fds-button.js';

Import and register all components

import '@fintraffic/fds-coreui-components/dist/define/all.js';

Extend a component

import { FdsButton } from '@fintraffic/fds-coreui-components';
class MyButton extends FdsButton { /* ... */ }
customElements.define('my-button', MyButton);

Code style guide

  • Implementation should follow the component publishing guidelines from Open Web Components.

  • Web component code should be ordered as follows:

    • Imports
    • TypeScript definitions
    • Lit-component
      • Constructor (only when required)
      • Reactive properties (@property, @state)
      • Override-methods
      • Render-method
      • Helper-methods
      • CSS

    Reasoning: With this order we aim to have the most functionally essential logic of the component featured most prominently. For this reason, the CSS (static variable) has been moved to the end, contrary to common OOP-practices. Otherwise, it is generally desired to maintain the same order of structure in components, so that even unfamiliar code is a little easier to read when you know how it is structured.

  • Class properties that update the component's inner state, should have the private access modifier, or protected if there is a good reason for it.

  • Use the function keyword when declaring functions.

  • Naming practises:

    • Use underscore (_) for private and protected properties, e.g. @state() private _enabled = true
  • Prettier is used for code formatting.

    • Settings are found in .prettierc.json.
    • Usage (two options):
      • Plugin: Install and enable the Prettier VSCode/IntelliJ -plugin and ensure that the "format on save" -option is enabled for your IDE.
      • No plugin: Run at project root npx prettier -w src/
  • Always write and update the JSDocs!

Licencing

Copyright © Fintraffic 2023 Source code of this program is licensed under the EUPL v1.2