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

genesys-spark-components

v4.98.1

Published

Common webcomponents

Downloads

5,038

Readme

Genesys Spark Monorepo

Spark Web Components

This repo contains the custom elements that make up the bulk of the Spark design system. Developers should prefer using the genesys-spark package and avoid importing this package directly unless there is a specific reason to do so.

Component Evolution

At any given time there are three types of components present in the library:

  • stable: Most components fall into this category, and there will be no breaking api changes outside of a major release.
  • beta: New components where the API design is still being explored. Breaking changes may happen without a major version change.
  • legacy: Old components that have been replaced by a new component, or a newer version of the component with an incompatible API. These will be removed in the next major release.

For more details on the component evolution process see the full documentation on the topic

Demo/Documentation

You can find usage examples of all of the components, with an in-browser editor playground online here.

Installing the library

Install

npm install genesys-spark-components

or

yarn add genesys-spark-components

Setting up your App

Required Fonts

Spark is designed to work with the Urbanist and Noto Sans fonts. These components do not provide font loading, so you must include them separately in your project. For a detailed breakdown of the variants of each font in use, see the typography section of the Spark Design Docs.

Stylesheets

The library requires the inclusion of a baseline set of CSS styles that it provides in the package under dist/genesys-webcomponents/genesys-webcomponents.css in apps that use the webcomponents. The stylesheet provides:

  • Baseline styles for browser elements
  • Classes for specific typography patterns
  • CSS variables for colors
  • CSS variables for spacing
  • CSS variables for z-index of "floating" non-flow content like menus, tooltips, popovers, or modals

The best mechanism for importing the stylesheet into your project will depend on how you handle CSS in your project in general. Reach out to the Common UI Development group if you're having trouble with your specific integration.

Note: Since v3 this baseline stylesheet is required.

Genesys Cloud applications

Genesys Cloud applications, or other always-online apps should import the library and call registerElements early during application bootstrap to register the components with the browser.

import { registerElements } from 'genesys-spark-components';
registerElements();

This will register the custom elements and automatically configure stencil to load icons and internationalization files from our CDN. You shouldn't need to bundle any additional assets into your application.

Localization

You will need to set a lang attribute on the a component or one of its ancestor elements to trigger localization. Normally, you should set it on the page somewhere at a high level, e.g. <html lang="en"> or <body lang="en"> and the components will localize based on that. If no language is set, the components default to English.

Framework Integration Notes

Development and Contribution

The common component library has a small set of developers, who also work on other projects, so contribution from users is welcome. If you need a new feature, the best way to get it is to work with the team to implement it yourself. Please reach out to discuss your work before opening a PR. An early conversation is the best way to avoid duplicated effort.

Also, be sure to read the Contributing Guidelines before starting development work.

Migrating to V4

Visit the V4 migration guide for details on the new v4 release and migration details.

Serving component and docs

Once you've checked out the project, install the local dependencies and start the dev server.

npm install
npm run dev

then navigate to http://localhost:8080/ to see the docs

If you want the docs to be accessible externally you can use

npm run dev.public

this will host the docs on http://0.0.0.0:8080/. This means they are available elsewhere on your network at http:/<your-ip-address>:8080/.

Running tests

npm run test

or

npm run test.watch

Documenting your component

Add an example.html file to your component's implementation directory with some examples.

Notes for external users

Currently this project is primarily use for internal Genesys projects, so most of our issue tracking and planning is done in internal tools. We do still look at GitHub isssues, but please understand that we're a small team and may not be able to address items right away, depending on internal priorities.