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

cubejs-uikit

v0.3.9

Published

UIKit for Cube.js projects

Downloads

5

Readme

Cube.js UI Kit

UI Kit for Cube.js website and other projects.

UI Kit is based on Numl Design System and injects it into the project.

To learn more about Numl+React integration read the documentation.

Showcase

Showcase is a playground to see all the components in one place. Also it's used to present a design system solutions.

Install dependencies:

$ npm i

Add CeraPro font to the src/assets/fonts folder:

  • CeraPro-Regular.woff2
  • CeraPro-Medium.woff2

Run showcase:

$ npm start

Integration

Install via npm:

npm install cubejs-uikit jsx-native-events --save-dev

For Gatsby projects

Add the following code to the gatsby-ssr.js file:

import React from "react";

export const onRenderBody = ({ setHeadComponents }) => {
    if (process.env.BUILD_STAGE === `build-html`) {
        const css = `
*:not(:defined) { visibility: hidden; }
@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Regular.woff2);
    font-weight: 300;
}

@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Regular.woff2);
    font-weight: 400;
}

@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Medium.woff2);
    font-weight: 500;
}

@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Medium.woff2);
    font-weight: 600;
}

@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Medium.woff2);
    font-weight: 700;
}
`;

        setHeadComponents([<style>{css}</style>]);
    }
}

Where ./assets/fonts/CeraPro-Medium.woff2 is a public path to CeraPro font.

For other projects

Include the following CSS in your application:

*:not(:defined) { visibility: hidden; }
@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Regular.woff2);
    font-weight: 300;
}

@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Regular.woff2);
    font-weight: 400;
}

@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Medium.woff2);
    font-weight: 500;
}

@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Medium.woff2);
    font-weight: 600;
}

@font-face {
    font-family: "CeraPro";
    src: url(./assets/fonts/CeraPro-Medium.woff2);
    font-weight: 700;
}

Where ./assets/fonts/CeraPro-Medium.woff2 is your local (or public) path to CeraPro font.

Usage

Import UI Kit to your React project:

// index.js / gatsby-browser.js for Gatsby
import UIKit from 'cubejs-uikit';

UIKit.init();

Either you can pass options to the init() method or/and subscribe to it.

UIKit.init({
  scheme: 'auto' // 'light' by default
}).then(() => {
  // UI Kit is initialized
});

Use simplified

Import UI Components to your application. It's required to use Root component to wrap your application.

import Root from 'cubejs-uikit/dist/Root';
import Topbar from 'cubejs-uikit/dist/Topbar';

export default function App() {
  return <Root>
    <Topbar/>
    <nu-block>Other content</nu-block>
  </Root>;
}

Available components

  • Root - A root component to wrap your application with.
  • Section - A section component.
  • Card - A card component.
  • Grid - A card component.

Available blocks

  • Topbar - A top bar component with a row of links.
  • Hero - A card block component.
  • Footer - A footer block component with copyright, links and "get in touch" section.
  • SubscriptionBlock - A subscription block. A simple form to subscribe user to our updates.
  • CardBlock - A card block.
  • FeatureBlock - A block with feature list.
  • SmallSignUpCard - A small signup card block with dark background.
  • BigSignUpCard - A big signup card block with white background.
  • SwitchBlock - A block with button group to switch sections each with text and image.

Contribution

Add new component/block

  • Add a new file {ComponentName}.jsx in src/components folder with your component.
  • Add a new line to list.js file in the root with component name.
  • Add an example of usage to the Showcase component in src/showcase/index.jsx.
  • Add a new line to the Available components section.
  • Add a documentation docs/${ComponentName}.md file for the component.

Run showcase and test your work

$ npm start

Then navigate to https://localhost:1234/ in your browser to open Showcase.

Create pull request

Commit your work to the new branch and create pull request.