1.12.5 ā€¢ Published 5 years ago

sling-framework v1.12.5

Weekly downloads
109
License
-
Repository
-
Last release
5 years ago

Sling Framework

The Sling Framework provides the building blocks to create Sling-based web components.

Usage

import { SlingElement, html } from 'sling-framework';

export const StarRating = (Base = class {}) => class extends Base {
  static get properties() {
    return {
      rate: {
        type: Number,
        reflectToAttribute: true,
      },
    };
  }

  render() {
    return html`
      <style>
        button { color: grey; border: none; font-size: 32px; }
        button.selected { color: gold; }
      </style>
      ${[1, 2, 3, 4, 5].map(index => html`
        <button className="${index <= this.rate ? ' selected' : ''}">ā˜…</button>
      `)}
    `;
  }
}

customElements.define('star-rating', StarRating(SlingElement));

More examples can be found at:

SlingElement

A class based on Google's LitElement that provides attribute/property handling and reflecting.

html

A tagged template literal utility from lit-html that provides an expressive API to dynamically generate html that reacts effectively to the component's state.

withRequest

A decorator that exposes methods, properties and events for handling API requests.

withSetState

A decorator that exposes a method that changes the component state in a functional way.

@infinitebrahmanuniverse/nolb-slin@everything-registry/sub-chunk-2780affiliation-merchant-addressesaffiliation-merchant-addresses-listaffiliation-merchant-bank-accountsaffiliation-merchant-bank-accounts-listaffiliation-merchant-bank-info-listaffiliation-merchant-contactsaffiliation-merchant-contacts-listaffiliation-merchant-info-listaffiliation-merchant-partnersaffiliation-merchant-partners-listsling-web-business-sales-report-expandedsling-web-business-payment-statussling-web-business-payment-summarysling-web-business-payments-calendarsling-web-business-planssling-web-business-sales-amountsling-web-business-sales-chartsling-web-business-sales-reportsling-web-business-sales-simulatorsling-web-business-transactionssling-web-component-brand-iconsling-web-component-buttonsling-web-component-calendarsling-web-component-cardsling-web-business-aggregate-paymentssling-web-business-aggregate-salessling-web-business-credit-lockssling-web-business-merchant-addressessling-web-business-merchant-addresses-listsling-web-business-merchant-bank-infosling-web-business-merchant-bank-info-listsling-web-business-merchant-contactssling-web-business-merchant-contacts-listsling-web-business-merchant-feessling-web-business-merchant-info-listsling-web-business-merchant-partnerssling-web-business-merchant-partners-listsling-web-business-merchant-terminalssling-web-business-notificationssling-web-business-payment-chartsling-web-business-payment-detailssling-web-business-payment-details-itemsling-web-business-payment-details-summarysling-web-business-payment-operationssling-web-component-fieldsling-web-component-field-messagesling-web-component-formsling-web-component-iconsling-web-component-inputsling-web-component-labelsling-web-component-listsling-web-component-loadersling-web-component-loader-wrappersling-web-component-menusling-web-component-menu-itemsling-web-component-messagesling-web-component-paginatorsling-web-component-selectsling-web-component-snackbarsling-web-component-tablesling-web-component-tooltipsling-web-search-postal-codeequals-info
1.12.5

5 years ago

1.12.4

5 years ago

1.12.3

5 years ago

1.12.2

5 years ago

1.12.0

5 years ago

1.11.7

5 years ago

1.11.6

5 years ago

1.11.5

6 years ago

1.11.4

6 years ago

1.11.3

6 years ago

1.11.2

6 years ago

1.11.1

6 years ago

1.11.0

6 years ago

1.9.0

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago