Giter Club home page Giter Club logo

mithril-widgets's Introduction

mithril-widgets

These are widgets for mithril applications, using Bootstrap 4.

mithril is an excellent, minimal Javascript single page application framework that is giving everybody else a lesson in YAGNI.

We are using the parts of ECMAScript 6 (ECMAScript 2015) that are directly supported by the major browsers. Our widgets are classes.

Pull requests are extremely welcome! And advice is also appreciated.

Current versions of dependencies

Brief description of the contents

  • TinyEvent is a simple implementation of the Observer pattern.
  • Notification is a class that represents a single message to be displayed to the user. Each instance may contain a title, a main content in either HTML or plain text, and a level such as "success", "info", "warning", "danger" etc.
  • Notifier is a widget that allows you to enqueue Notifications and then toasts them on screen, one at a time. Appearance of the Notification should be animated in order to call the user's attention to it. The time each message stays on screen is computed automatically so you don't have to worry about it. The user can rewind the history and see each notification again. When inactive, this widget is supposed to be a gray, nondescript box containing only the word "Notifications", plus the history button, statically place in a corner of the screen --usually the top right. A final feature is, this idle "Notifications" text can be replaced with small status messages of the kind that should not call the user's attention, e. g. "Fetching data from server".
  • request is a function that wraps m.request(). It transparently communicates with Notifier to set a status message while a request is in progress.
  • SearchBox creates a search input with a "clear" button to the right. You can just add it to your page and then set on it an onchange() function to do stuff whenever the user presses Enter on the search box.
  • Select creates a dropdown and support its typical features.
  • SimpleTable displays a table.
  • SortedTable displays a table which allows the user to click on each header to sort the rows by that column, ascending or descending.
  • UL makes it easy to render an unordered list.
  • NavMenu creates an actual Bootstrap navigation menu from data representing a menu structure.
  • FormField creates a Bootstrap form field, optionally with a label.
  • PhoneField creates a "tel" input for phone numbers.
  • ContentEditable creates in-place editable tags, but it is kind of just a stub right now. Of course, improving it is just a Simple Matter Of Programming...

TO DO

mithril-widgets's People

Contributors

nandoflorestan avatar pitymaia avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sgml

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.