Giter Club home page Giter Club logo

neopop-web's Introduction

NeoPop Banner

NeoPOP

NeoPOP is CRED's inbuilt library for using NeoPOP components in your web app.

what is NeoPOP?

NeoPOP was created with one simple goal, to create the next generation of the next beautiful, more affirmative, design system. NeoPOP stays true to everything that design at CRED stands for.

what this library features?

  • Easy to use and beautifully designed React components based on NeoPOP design system.
  • Flexible and composable components which accepts custom configurations.
  • Commonly used utility methods and functions.
  • Fluid and highly optimized animations.

note: currently the components in this library are optimized for mobile views, we will soon release support for desktop views.

how to install?

to use NeoPOP library, all you need to do is install the @cred/neopop-web package and its peer dependencies:

yarn add @cred/neopop-web react react-dom styled-components

# or

npm i @cred/neopop-web react react-dom styled-components

how to use?

to start using the library you can,

  • import components from @cred/neopop-web/lib/components
  • import primitives from @cred/neopop-web/lib/primitives
  • import hooks from @cred/neopop-web/lib/hooks
  • import utils from @cred/neopop-web/lib/utils

for example, to use button refer the following code snippet:

import { Button } from '@cred/neopop-web/lib/components';

const Page = () => {
    return (
        <Button
            variant="primary"
            kind="elevated"
            size="big"
            colorMode="dark"
            onClick={() => {
                console.log("I'm clicked");
            }}
        >
            Primary
        </Button>
    );
};

export default Page;

a detailed documentation and an interactive playground can be found here

contributing

pull requests are welcome! we'd love help improving this library. feel free to browse through open issues to look for things that need work. if you have a feature request or bug, please open a new issue so we can track it.

contributors

license

Copyright 2022 Dreamplug Technologies Private Limited.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

neopop-web's People

Contributors

aman123956 avatar chiragmittal-cred avatar devmrin avatar harish-sethuraman avatar iamppborah avatar imanshu03 avatar kirankumarambati avatar mittalchirag avatar rahuldkjain avatar riyaz avatar shanpriyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neopop-web's Issues

Link Button has no semantics that actually make it a "Link"

Describe the bug
Button kind = link has zero semantics. In fact it is rendered with <div class="styles__TypographyWrapper-sc-1n7hass-0 cICjag font sans-serif" font-size="11" font-weight="500" color="#0d0d0d">Link</div>, which does not describe itself as a true "Link".

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Button Demo'
  2. Inspect Link and try checking its accessibility properties.
  3. Note that it is rendered using a div and not as an Anchor.

Expected behavior
I would expect Links to render with Anchor tags with a proper Href etc.

Screenshots
DOMSHOT

<div class="styles__TypographyWrapper-sc-1n7hass-0 cICjag font sans-serif" font-size="11" font-weight="500" color="#0d0d0d">Link</div>

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome/ Safari

Unable to run playground locally

Describe the bug
Unable to run playground locally

To Reproduce
Steps to reproduce the behavior:

  1. Cloned the repo
  2. Run npm i
  3. Run npm run storybook
  4. See error

Expected behavior
Playground should open in local

Screenshots
Screenshot 2022-10-03 at 12 42 46 PM

Desktop (please complete the following information):

  • OS: Mac Monterey
  • Version: 12.4

MDX Intellisense

I did not find the discussions tab so I had to create this Issue.

How did you manage to pull this off at a time where there is no support to mdx files in terms of intellisense, auto imports etc

Shallow freeze on `colorPalette` object

I've noticed that colorPalette has been shallow frozen, colorGuide hasn't been frozen from @cred/neopop-web/lib/primitives and properties with objects on it can still be mutated. If the intention is to freeze all objects, can we do a deepFreeze ? if yes shall I send a fix.

The result of calling Object.freeze(object) only applies to the immediate properties of object itself and will prevent future property addition, removal or value re-assignment operations only on object. If the value of those properties are objects themselves, those objects are not frozen and may be the target of property addition, removal or value re-assignment operations.
MDN docs

Issue
Edit neo-pop-obj-freeze

colorPalette
 export let colorPalette = Object.freeze({
    white: {
        50: '#E0E0E0',
        70: '#EFEFEF',
        90: '#FBFBFB',
    },
    popWhite: {
        100: '#D2D2D2',
        200: '#E0E0E0',
        300: '#EFEFEF',
        400: '#FBFBFB',
        500: '#ffffff',
    },
    popBlack: {
        100: '#8A8A8A',
        200: '#3D3D3D',
        300: '#161616',
        400: '#121212',
        500: '#0d0d0d',
    },
    black: {
        50: '#8A8A8A',
        70: '#3D3D3D',
        90: '#161616',
        100: '#121212',
    },
    poliPurple: {
        100: '#E8DFFF',
        200: '#D2C2FF',
        300: '#B49AFF',
        400: '#9772FF',
        500: '#6A35FF',
        600: '#4A25B3',
        700: '#351A80',
        800: '#20104D',
    },
    orangeSunshine: {
        100: '#FFEFE6',
        200: '#FFDBC7',
        300: '#FFC3A2',
        400: '#FFAB7C',
        500: '#FF8744',
        600: '#B35F30',
        700: '#804322',
        800: '#4D2914',
    },
    parkGreen: {
        100: '#DDFFF1',
        200: '#C4FFE6',
        300: '#9DFFD6',
        400: '#76FFC6',
        500: '#3BFFAD',
        600: '#29B379',
        700: '#1E8057',
        800: '#124D34',
    },
    pinkPong: {
        100: '#FFE1E9',
        200: '#FFC6D4',
        300: '#FFA0B7',
        400: '#FF7B9A',
        500: '#FF426F',
        600: '#B32E4E',
        700: '#802138',
        800: '#4D1421',
    },
    mannna: {
        100: '#FFF8E5',
        200: '#FFEFC7',
        300: '#FFE5A2',
        400: '#FFDB7D',
        500: '#FFCB45',
        600: '#B38E30',
        700: '#806623',
        800: '#4D3D15',
    },
    neoPaccha: {
        100: '#FBFFE6',
        200: '#F7FFC6',
        300: '#F2FF9F',
        400: '#EDFE79',
        500: '#E5FE40',
        600: '#A0B22D',
        700: '#727F20',
        800: '#454C13',
    },
    yoyo: {
        100: '#F4E5FF',
        200: '#E5C5FF',
        300: '#D59FFF',
        400: '#C379FF',
        500: '#AA3FFF',
        600: '#772CB3',
        700: '#552080',
        800: '#33134D',
    },
    error: {
        100: '#FCE2DD',
        200: '#F6A69B',
        300: '#F47564',
        400: '#F05E4B',
        500: '#EE4D37',
    },
    warning: {
        100: '#FBDDC2',
        200: '#F8C699',
        300: '#F5AC6A',
        400: '#F29947',
        500: '#F08D32',
    },
    info: {
        100: '#C2D0F2',
        200: '#89A5E3',
        300: '#3F6FD9',
        400: '#2C5ECD',
        500: '#144CC7',
    },
    success: {
        100: '#E6F9F1',
        200: '#83E0B8',
        300: '#4FE3A3',
        400: '#1FC87F',
        500: '#06C270',
    },
});
colorGuide
const getColorGuide = () => ({
    mainAppBackground: mainColors.black,
    darkComponents: getDarkThemedColors(),
    lightComponents: getLightThemedColors(),
});

export let colorGuide = getColorGuide();

Text Area Input Component for Cred Newpop Web

I would like to propose a new feature for Cred Newpop Web, which involves the addition of a text area input component. Currently, Cred Newpop Web provides various input components such as text fields but a text area input is noticeably missing. This feature would greatly enhance the usability and flexibility of Cred Newpop Web's user interface.

Add Info variant for Toast

Is your feature request related to a problem? Please describe.
Since we have 4 state colors in the palette (error, warning, success, info), it'd make sense to have toasts for all of those states.

Describe the solution you'd like
Add the info variant for Toast and also a corresponding story with example

Describe alternatives you've considered
N/A

Additional context
N/A

None of the form controls like Buttons, Checkboxes etc are keyboard operable or have basic accessibility

Describe the bug
None of the form controls like Buttons, Checkboxes etc are keyboard operable or have basic accessibility

To Reproduce
Steps to reproduce the behavior:
I am talking basic accessibility here, like

  1. Correct Semantics, E.g Checkboxes are rendered as
  2. Nothing is keyboard focusable, operable.
  3. Links are
  4. and a ton more...

Expected behavior
When you publish a component library it should at-least be accessible to a basic level.

Request for Figma file

This is incredible!

Love the design.
What would be amazing if there was an open source Figma+sketch file that could be released so more designers could integrate this into their work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.