Giter Club home page Giter Club logo

comet's Introduction

Comet Component Library


Comet is a React with TypeScript Component Library based on USWDS.

In the beginning, Comet was built with a primary focus of USWDS. Today however, it has become more of a framework for React Apps which require USWDS, as well as other functionality (charts, custom components, etc). In the end, we hope to provide a set of modular tools to accelerate developer productivity and simplify the use of Design Systems, particularly USWDS.

Table of Contents

  1. Overview
  2. Getting Started
  3. Want to help?

Overview

comet-uswds - The base USWDS component library implemented in React with TypeScript.

comet-data-viz - A set of Victory Chart components provided as a Comet wrapper.

comet-extras - A set of custom components, intended to fill in the gaps where USWDS does not provide an implementation.

comet-cli - A CLI for creating Comet Apps.

Getting Started

In order to simplify the process of getting started, we have provided a starter app which includes our components. This app also provides some additional opinionated tools to further accelerate the process of getting started. These additions are not required. The starter app repo can be found here: Comet Starter App.

See each package directory for additional information on getting started.

Want to help?

Interested in contributing to any of the packages in this project? Review our contributing info here: Contributing.

comet's People

Contributors

amber-k avatar bapplejax avatar dependabot[bot] avatar jbouder avatar kildre avatar marshyski avatar naatebarber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jbouder

comet's Issues

Components with children should accept and render children

Discussed in #75

Originally posted by jpandersen87 September 7, 2023
Either in addition to, or replacement of existing render logic, components should accept and render children. For example, the accordion component currently only accepts a javascript array of items to render instead of allowing the items to be passed manually as children (ex: <Accordion><AccordionItem>...</AccordionItem></Accordion>).

Create USWDS Utility Class Prop Type for use across components

Discussed in #74

Originally posted by jpandersen87 September 7, 2023
It would be useful for all the possible utility classes (not usa- classes, as that's expected to be the component's responsibility and can be given via className by the user otherwise) to be applicable via a prop object similar to how the native style prop works.

DatePicker duplication bug

Describe the bug
The DatePicker initializes every time the parent component renders, which adds partially visible calendar icon buttons.

To Reproduce
Create this component and add it to a comet-starter page (typing in input adds more icons):

function MyComponent() {
  const [myInput, setMyInput] = useState('');

  console.log(myInput);

  return (
    <div>
      <TextInput
        id="my-input"
        onChange={(e) => setMyInput(e.target.value)}
      ></TextInput>
      <DatePicker></DatePicker>
    </div>
  );
}

Expected behavior
The DatePicker is initialized once instead of on every component rerender.

Screenshots
Top edges of multiple calendar buttons:
datepicker_bug

Multiple usa-date-picker__wrapper divs:
dom

Desktop (please complete the following information):

  • OS: Manjaro Linux
  • Browser Chromium
  • Version 126.0.6478.126

Smartphone (please complete the following information):

  • (Not tested on smartphone)

Additional context

Add USWDS In-page Navigation component to base library

Is your feature request related to a problem? Please describe.
Add the USWDS In-page Navigation component to the base library as a reusable React Component.

Describe the solution you'd like
The following component should be converted to a React component, as part of the base library: https://designsystem.digital.gov/components/in-page-navigation/.

Conversion of this component should include the following:

  • Add new component (tsx)
  • Add Storybook stories as needed (stories.tsx)
  • Add Unit Tests to cover functionality (test.tsx)
  • Add index.ts to export the component
  • Add the component export to the default index.ts

Describe alternatives you've considered
N/A, this is a USWDS component

Additional context
The component should be implemented to make it as reusable and as extensible as possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.