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

ccm-react-components

v1.2.6

Published

CCM's React Components

Downloads

13

Readme

CCM React Components

QA NPM

Production NPM


Overview

This library houses a series of React components utilized throughout the suite of our CCM products. The inspiration behind this component library is to promote UX consistency across our products.

Demo

Demo Library

Installation

npm install ccm-react-components

Components Included

   


CCM Address Component

<CCMAddress />

Details

This component has been built to normalize how we collect addresses throughout all of CCM's products built using React.

Demo

CCM Address Demo

Basic Usage

  import { CCMAddress } from 'ccm-react-components';

  const CCMAddressDemo = () => (
    <CCMAddress
      // Required Props
      muleApiUrl={"https://address-api"}
      muleClientId={"abc123"}
      muleClientSecret={"a1b2c3d4e5"}
      onAddressCollected={
        (address) => this.onAddressCollected(address)
      }
      onAddressInvalidated={
        () => this.onAddressInvalidated()
      }
      // Optional Props
      address={{
        line1:                '123 Fake St',
        city:                 'Fakesville',
        state:                'FL',
        zip:                  '12345'
        latitude:             '43.645074',
        longitude:            '-115.993081',
        verified:             true,
      }}
      checkForValidAddressUponMount={true}
      componentDisabled={false}
      includeGeocodeData={true}
      showProcessingMessages={true}
      showRequiredAsterisks={true}
      statesOverride={[
        {
          abbr: "CO",
          name: "Colorado"
        },
        {
          abbr: "FL",
          name: "Florida"
        },
        {
          abbr: "WI",
          name: "Wisconsin"
        }
      ]}
      onStatesFetched={statesFetched => this.handleStatesFetched(statesFetched)}
      style={{
        mainWidth:            'override-main-width',
        modalWidth:           'override-modal-width',
        borderRadius:         'override-border-radius',
        generalInputStyle:    'override-input-style',
        line1InputStyle:      'override-line1-style',
        cityInputStyle:       'override-city-style',
        stateInputStyle:      'override-state-style',
        zipInputStyle:        'override-zip-style',
        requiredAsterisk:     'override-required-asterisk'
      }}
      title={"Mailing Address"}
    />
  )

Props


CCM Pricing Calculator Component

<CCMPricingCalculator />

Details

This component has been built to collect the minimum information needed in order to fetch plan options for a household.

Demo

CCM Pricing Calculator Demo

Basic Usage

  import { CCMPricingCalculator } from 'ccm-react-components';

  const CCMPricingCalculator = () => (
    <CCMPricingCalculator
      // Required Props
      muleApiUrl={"https://address-api"}
      muleClientId={"abc123"}
      muleClientSecret={"a1b2c3d4e5"}
      htfApiUrl={"https://htf-api.herokuapp.com"}
      agentId={"1234"}
      auth={"A1aB2bC3cD4dE5eF6fG7g"}
      onPlanOptionsFetched={options => this.handlePlanOptionsFetched(options)}
      // Optional Props
      statesOverride={[
        {
          abbr: "CO",
          name: "Colorado"
        },
        {
          abbr: "FL",
          name: "Florida"
        },
        {
          abbr: "WI",
          name: "Wisconsin"
        }
      ]}
      showFullStateNames={true}
      onStatesFetched={statesFetched => this.handleStatesFetched(statesFetched)}
      debugMode={false}
    />
  )

Props


CCM State Picker Component

<CCMStatePicker />

Details

This component has been built to be used as a dropdown picker that fetches statesto choose from given credentials to hit a Mule API.

Demo

CCM State Picker Demo

Basic Usage

  import { CCMStatePicker } from 'ccm-react-components';

  const CCMStatePicker = () => (
    <CCMStatePicker
      // Required Props
      onStateSelected={state => this.handleStateSelected(state)}
      muleApiUrl={"https://settings-api"}
      muleClientId={"abc123"}
      muleClientSecret={"a1b2c3d4e5"}
      // Optional Props
      defaultOptionText={"Please select a state..."}
      disabled={false}
      selectedState={'WI'}
      showFullStateNames={true}
      showRequiredAsterisk={true}
      statesOverride={[
        {
          abbr: "CO",
          name: "Colorado"
        },
        {
          abbr: "FL",
          name: "Florida"
        },
        {
          abbr: "WI",
          name: "Wisconsin"
        }
      ]}
      onStatesFetched={fetchedStates => this.handleCacheStaets(fetchedStates)}
      style={{
        borderRadius:       'override-border-radius',         // Border radius for the input fields
        generalInputStyle:  'override-input-style',           // Class Name to apply to all input field
        requiredAsterisk:   'override-required-asterisk',     // Class Name to apply to the optional asterisk that denotes input fields to be required
        titleStyle:         'override-title-style',           // Class Name to apply to the title above the drop down input
      }}
      onBlur={state => this.handleStateBlur(state)}
    />
  )

Props

License

CCM © ccm-innovation