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

react-component-library-sutradhar

v1.1.59

Published

This library includes user interface components which can be used in forms and as inputs.

Downloads

51

Readme

React UI components library

This library contains UI components to be used in forms with various inputs.

Documentation links

Installation and usage.

To install and use the components in the library run below commands:

npm i react-component-library-sutradhar

Note: In case of missing dependecy error, run below command:

npm i @mui/material react react-dom react-table styled-components react-icons @emotion/styled

Usage/Examples

TextField

TextField accepts regular string input.

import { Textfield } from 'react-components-library-sutradhar'
/* Props Example: 
  border: "standard" | "outlined" | "filled";
  width: '100px' '50%';
  fontSize: '14px';
  fontColor: '#000000'
  errorState: {
    isError: true | false,
    errorMessage: 'Enter error message here'
  }
  handleReturnValue: callbackfunction
*/
function App() {
  return <TextField
          label={label}
          placeholder='Enter date'
          border={border}
          width='200px'
          fontSize={fontSize}
          fontColor={fontColor}
          handleReturnValue={handleValue}
          error={errorState}
        />
}

TextInput with Search Modal

TextInputWithSearch accepts string input. On presssing enter the provided value to the input can be submitted. If the provided values matches the provided data options the matched value will be set.

import { TextInputWithSearch } from 'react-components-library-sutradhar'
/* Props Example: 
  border: "standard" | "outlined" | "filled";
  width: '100px' '50%';
  fontSize: '14px';
  fontColor: '#000000'
  listData: [
    {
      id: 1,
      firstName: Jon,
      lastName: Doe
    },
    {
      id: 1,
      firstName: Jon,
      lastName: Doe
    },
    ....
  ]
  // searchBy will be the same value you will enter in textfield as input
  searchBy: firstName
  handleReturnValue: callbackfunction
*/

function App() {
  return <TextInputWithSearch
          fontFamily='Arial'
          label='Test Label'
          fontSize='14px'
          fontColor='#000000'
          listData={testData}
          placeholder='Enter text'
          searchBy='firstName'
          width='200px'
          handleReturnValue={handleSelectedValues}
        />
}

NumberInput

NumberInput accepts integers as input.
4 types of integer inputs:
    1. integer: accepts numbers.
    2. decimal: accepts float values and with 2 digits after the decimal.
    3. amount: accepts integers and masks the value with commas. Eg. 10,200
    4. decimalMasking: Masks decimal values with commas.

import { NumberInput } from 'react-components-library-sutradhar'

/* Props Example: 
  border: "standard" | "outlined" | "filled";
  width: '100px' '50%';
  fontSize: '14px';
  fontColor: '#000000'
  type: 'integer' | 'decimal' | 'decimalMasking' | 'amount'
  handleReturnValue: callbackfunction,
  // To provide range input i.e. To & From values 
  isRangeInput: true | false
*/

function App() {
  return <NumberInput
          type= 'decimalMasking'
          label='Test label'
          border='outlined'
          fontSize='14px'
          font='Arial'
          width='200px'
          placeholder='Enter text'
          handleReturnValue={handleReturnedValue}
          isRangeInput={false}
        />
}

DateInput

Accepts integer values as dates. If the input format is correct then input value is accpeted as enter is pressed.
Supportted formats: ddmmyy, ddmmyyyy
Eg. 010211 (ddmmyy) = 01/02/2011
01042022 (ddmmyyyyy) = 01/04/2022

import { DateInput } from 'react-components-library-sutradhar'

/* Props Example: 
  border: "standard" | "outlined" | "filled";
  width: '100px' '50%';
  fontSize: '14px';
  fontColor: '#000000'
  type: 'integer' | 'decimal' | 'decimalMasking' | 'amount'
  handleReturnValue: callbackfunction,
  // To provide range input i.e. To & From values 
  isRangeInput: true | false
*/

function App() {
  return <DateInput
          type= 'decimalMasking'
          label='Test label'
          border='outlined'
          fontSize='14px'
          font='Arial'
          width='200px'
          placeholder='Enter text'
          handleReturnValue={handleReturnedValue}
          isRangeInput={false}
        />
}