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

kapix-components-react

v1.0.3

Published

Repository generated with https://dev.to/alexeagleson/how-to-create-and-publish-a-react-component-library-2oe The aim is to provide a react UI components library for Kapix. The published material only comes from "./src/package". The rest is used for de

Downloads

1

Readme

KAPIX-COMPONENTS-REACT library

Intro

Repository generated with https://dev.to/alexeagleson/how-to-create-and-publish-a-react-component-library-2oe The aim is to provide a react UI components library for Kapix. The published material only comes from "./src/package". The rest is used for developement purposes via StoryBook. Kapix base elements have to be wrapped with "KapixElement" to be used with style and other features (responsiveness, animations, conditional style...).

For testing purposes, we use the "src/component" folder with "high level" kapix components. Don't forget that the truth source for those components in a generated React repo only comes from the repo "Reactjs-code-generation". Never copy all the "components" folder into "reactjs-code-generation". This one has specific implementations (like "_HeadMetaData"). When working on a new component, you should copy afterwards only the component's folder, and adapt code (like "import" statement to this package! (inception i know))

Process to work on a new component

  • Create a story in "./stories".
  • Put some generated react code that you want to run in ./generatedReact. There's a place for style too (import correctly "variables")
  • Run "npm run storybook". (Hot reload doesn't work well. See "possible errors") Work on your component to make it behave like you want.
  • then see "HOW TO PUBLISH"
  • you may have to synchronize static files from "reactjs-code-generation" from time to time.

STACK

npm (not yarn!) rollup typescript eslint storybook sass iconify react-tooltip animate.css

Some possible errors

If storybook builds but nothing is displayed in the browser, try in "Incognito Mode" (without cache). If it works, clean your cache.

HOW TO PUBLISH

After your modifications, update version number in package.json. Then run "npm run rollup" Then "npm publish"

Tooltips

Tooltips are managed via "react-tooltip" (https://www.npmjs.com/package/react-tooltip). We expect react generated code to have a "data-tooltip" property (instead of "v-tippy" for Vue). This needs a <ReactTooltip ...options/> component at root, to display the portal of the modal.

String format from "options" prop

The inspiration for this package is a vue repo. Vue injects html text (with escaped characters). We manage it here with "decode" function (see "./helpers")

Icons

We use the Icon component from "iconify". The key argument should be formatted as needed. ( libraryKey + ":" + iconKey )

As of 10th of May, 2022, whats up

Result of mission

Initial templates of Kapix (Duckduckgo, Malt, Lostark) can be generated in React. For each of them, the code runs into a website that is, by its features and visuals, equivalent to the generated Vue website.

Still lots to do on components

  • Lazyness of visibility in some components
  • Labels and forms
  • State-dependent style (for example, xs-selected style...)
  • ClickActions that modify other elements in page. The only way to do this seems to target dom elements by their "id" attribute, as for the "scrollTo" action
  • Translations
  • Lots of specific components (typewriter, carousel... the ".vue" files are added in folders, waiting to be replaced)

See "Reactjs-code-generation" repo "README_internal.md" for more information on generated code