GithubHelp home page GithubHelp logo

syrp-nz / angular-polaris Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 3.0 1.4 MB

An Angular port of the Shopify Polaris design system.

License: MIT License

JavaScript 6.25% TypeScript 65.21% HTML 24.69% CSS 3.84%

angular-polaris's Introduction

angular-polaris

This package aimed to port functionality from the Shopify Polaris design system from React to Angular. It tries to follow the same convention as the original Shopify Polaris package as much as possible.

<plrsLayout>
    <plrsSection>
        <plrsCard title="Syrp App Configuration" sectioned [actions]="[{'content': 'Manage Configuration', 'url': '/config', 'routerLinkActive': true}]">
            <p>Manage configuration.</p>
        </plrsCard>
    </plrsSection>
</plrsLayout>

Review the Angular Poalris Demo Project to see the library in action and see code examples.

Under Development - Use at your own risk

The package is under active development, so beware. Polaris components are converted as needed.

Component Implementation state Extra details
Badge Beta
Banner Beta
Breadcrumbs Dev
Button Beta
Card Beta
Icon Dev
Label Dev
Labelled Dev
Layout Beta
Page Dev
Pagination Dev
Resource List Dev
Select Dev
Stack Beta
Textfield Dev
Thumbnail Dev
UnstyledLink Dev
Visually Hidden Beta

NB: The Angular Polaris component are prefix with plrs. e.g.

Installation

To install this library, run:

$ npm install angular-polaris --save

Consuming the library

To use AngularPolaris in your Angular project, import AngularPolarisModule in your AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { AngularPolarisModule } from 'angular-polaris';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AngularPolarisModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

The package doesn't ship with the Polaris css, so you need to manually include it in your project from the Shopify CDN. e.g.:

<link href="https://sdks.shopifycdn.com/polaris/1.0.2/polaris.min.css" rel="stylesheet">

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run publish

Wysiwyg Component

The library comes with a plrsWysiwyg component that is not natively included in the Shopify Polaris React library. This component is built on top of (QuillJs)[https://quilljs.com]. If you want to use the WYSIWYG component, you need to add a reference to "../node_modules/quill/dist/quill.js" under scripts in your .angular-cli.json file and to load the Quill Snow Theme css in your index.html file with:

<link href="https://cdn.quilljs.com/1.2.2/quill.snow.css" rel="stylesheet">

The Angular implementation was done by adapting code from (NGX-Quill)[https://github.com/KillerCodeMonkey/ngx-quill].

License

MIT © Maxime Rainville

angular-polaris's People

Contributors

maxime-rainville avatar

Stargazers

Dalana Dharmathilake avatar Ishtiaque Shahrier avatar Milos Bejda avatar Diego Plascencia avatar  avatar Šime Jerković avatar Kaelig Deloumeau-Prigent avatar Johan Isacsson avatar Alejandro avatar

Watchers

James Cloos avatar  avatar Chris Sauve avatar  avatar quinnn1 avatar

angular-polaris's Issues

What is the difference between Dev and Beta

Hi

I know that you mentioned you are not working on this project, however would you update the readme giving more detail about the progress in case of somebody else what to folk and continue working on it?

Also it's sad that you stopped working on this since it's really needed.

Thanks

Dead?

Just dropping in to ask if there's any plan to renew this repo - it's a great idea and sorely needed!
Thanks

Dead #2?

Anyone know of an angular + polaris port? This is badly needed on our end

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.