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

idea-react

v2.0.0-rc.2

Published

A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.

Downloads

61

Readme

Idea React

A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.

MobX compatibility NPM Dependency CI & CD

NPM

  • API document: https://idea2app.github.io/Idea-React/
  • Preview site: https://idea2app.github.io/Idea-React/preview/
  • Storybook playground: https://idea-react.vercel.app/

Versions

| SemVer | status | ES decorator | MobX | | :----: | :----------: | :----------: | :---------: | | >=2 | ✅developing | stage-3 | >=6.11 | | <2 | ❌deprecated | stage-2 | >=4 <6.11 |

Content

Components

  1. Time Distance
  2. Icon
  3. Avatar
  4. Nameplate
  5. Type Echo
  6. Click Boundary
  7. Spinner Button
  8. Select
  9. Month Calendar
  10. Code Block
  11. Page Nav
  12. Editor
  13. Editor HTML
  14. Table Spinner
  15. Loading
  16. Share Box
  17. Overlay Box
  18. Dialog

Data components

Table, List & Form components around Data models, have been migrated to https://github.com/idea2app/MobX-RESTful-table, since Idea-React v1.0.0.

Map components

Open Map component & model, have been migrated to https://github.com/idea2app/OpenMap, since Idea-React v1.0.0.

Utilities

  1. text2color
  2. animate()

Usage

Scaffolds

  1. MobX: demo & usage
  2. Next.js: demo & usage

CSS on CDN

<link
    rel="stylesheet"
    href="https://unpkg.com/[email protected]/dist/css/bootstrap.min.css"
/>
<link
    rel="stylesheet"
    href="https://unpkg.com/[email protected]/font/bootstrap-icons.css"
/>
<link
    rel="stylesheet"
    href="https://unpkg.com/[email protected]/animate.min.css"
/>
<link
    rel="stylesheet"
    href="https://unpkg.com/[email protected]/themes/prism.min.css"
/>

tsconfig.json

Compatible with MobX 6/7:

{
    "compilerOptions": {
        "target": "ES6",
        "moduleResolution": "Node",
        "useDefineForClassFields": true,
        "experimentalDecorators": false,
        "jsx": "react-jsx"
    }
}

Dialog

import { formToJSON } from 'web-utility';
import { PureComponent } from 'react';
import { Button, Form, Modal } from 'react-bootstrap';
import { Dialog, DialogClose } from 'idea-react';

export class ExamplePage extends PureComponent {
    inputDialog = new Dialog<Record<'a' | 'b', number>>(({ defer }) => (
        <Modal show={!!defer} onHide={() => defer?.reject(new DialogClose())}>
            <Modal.Header>Dialog</Modal.Header>
            <Modal.Body>
                <Form
                    id="input-dialog"
                    onSubmit={event => {
                        event.preventDefault();

                        defer?.resolve(formToJSON(event.currentTarget));
                    }}
                    onReset={() => defer?.reject(new DialogClose())}
                >
                    <Form.Group>
                        <Form.Label>A</Form.Label>
                        <Form.Control type="number" name="a" />
                    </Form.Group>
                    <Form.Group>
                        <Form.Label>B</Form.Label>
                        <Form.Control type="number" name="b" />
                    </Form.Group>
                </Form>
            </Modal.Body>
            <Modal.Footer className="d-flex justify-content-end gap-3">
                <Button form="input-dialog" type="submit">
                    √
                </Button>
                <Button form="input-dialog" type="reset" variant="danger">
                    ×
                </Button>
            </Modal.Footer>
        </Modal>
    ));

    someLogic = async () => {
        try {
            const data = await this.inputDialog.open();

            alert(JSON.stringify(data, null, 4));
        } catch (error) {
            if (error instanceof DialogClose) console.warn(error.message);
        }
    };

    render() {
        return (
            <>
                <Button onClick={this.someLogic}>open Dialog</Button>

                <this.inputDialog.Component />
            </>
        );
    }
}

Development

Publish

  1. update version in package.json file

  2. add Git tag

git tag vx.xx.x  # such as v2.0.0
  1. review tag
git tag
  1. publish code with tag version
git push origin master --tags  # push all branches and tags on master