Git Product home page Git Product logo

mint-ui's Introduction

Mint UI

CI Gitter chat Discord

A beautiful, fully featured, reliable UI component library for Mint.

  • 60+ ready to use, hand crafted components.
  • Themable with CSS variables.
  • Fully responsive.
  • Data driven.

Get started

To use Mint UI you need to install Mint first.

Create a new Mint application with:

mint init my-app

add mint-ui to the mint.json file as a dependency:

"dependencies": {
  "mint-ui": {
    "repository": "https://github.com/mint-lang/mint-ui",
    "constraint": "8.0.0 <= v < 9.0.0"
  }
}

then install dependencies:

$ mint install
Mint - Installing dependencies
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Constructing dependency tree...
  ✔ Cloned mint-ui (https://github.com/mint-lang/mint-ui)
  ✔ Cloned mint-color (https://github.com/mint-lang/mint-color)

⚙ Resolving dependency tree...
  ◈ mint-ui ➔ 8.0.0
  ◈ mint-color ➔ 0.9.0

⚙ Copying packages...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All done in 2.387s!"

Documentation

Head to ui.mint-lang.com to learn the in and outs of Mint UI!

License

Be aware of that Mint UI has a special license and requires obtaining a company license in some cases. Read the LICENSE documentation for more information.

Contributing

Please read CONTRIBUTING.md to learn about contributing to this project.

mint-ui's People

Contributors

bjab avatar gdotdesign avatar hovsater avatar sclee15 avatar sija avatar zer0-star 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mint-ui's Issues

Event for submitting single-field (`onEnterKey`/`onSubmit` perhaps?)

I've been using Mint for a while, and in pretty much every project I ended up having to deal with the same problem. The most common scenario is when creating a Search Box. Seems pretty simple, create a <Ui.Input >, define a state to hold its value (Shouldn't be needed but let's roll with it), define an onChange event that updates the state, and now I have to submit it... onIconClick makes for half of the solution, but a reasonable search box will also trigger when the user hits the Enter key, and that's not so easy in mint.

Right now I'm using this slight aberration to make this work:

onChange={(newValue : String) : Promise(Never,Void) {
  next { fieldValue = newValue }
}}
onKeyDown={(e : Html.Event) : Promise(Never,Void) {
  if (e.key == "Enter") {
    "someUrl/#{`encodeURI(#{fieldValue})`}"
    |> Window.navigate
  } else {
    Promise.never()
    }
}}
onIconClick={(e : Html.Event) : Promise(Never,Void) {
  "someUrl/#{`encodeURI(#{fieldValue})`}"
  |> Window.navigate
}}

The else branch is irrelevant boilerplate, and the e.key == "Enter" doesn't check for modifiers like Ctrl or Shift or pretty much anything. It's be a lot easier to have something like:

onSubmit={(fieldValue : String) : Promise(Never,Void){
  "someUrl/#{`encodeURI(#{fieldValue})`}"
  |> Window.navigate
}}

which could actually replace all three handlers above, with the added benefit of doing away with having a state.

Am I the only one who thinks this is a good idea, or are there others who agree we could use something like this?

Error when initializing a new project

I did everything as written in the instructions https://ui.mint-lang.com/documentation/installation. The prompt shows an error:

The type of the default value of the formatter property does not match its type annotation.
(screenshot https://imgur.com/a/HCsldMy)
I was expecting:

Function(
String,
Time,
String)
Instead it is:

Function(
Time.Format.Language(
toOrdinalSuffix:
Function(
Number,
String),
toMonthName:
Function(
Month,
String),
toMonthAbbreviation:
Function(
Month,
String),
toWeekdayName:
Function(
Weekday,
String),
toWeekdayAbbreviation:
Function(
Weekday,
String),
amPm:
Function(
Number,
String),
someSecondsAgo:
Function(
Number,
String),
someMinutesAgo:
Function(
Number,
String),
someHoursAgo:
Function(
Number,
String),
someDaysAgo:
Function(
Number,
String),
someMonthsAgo:
Function(
Number,
String),
someYearsAgo:
Function(
Number,
String),
inSomeSeconds:
Function(
Number,
String),
inSomeMinutes:
Function(
Number,
String),
inSomeHours:
Function(
Number,
String),
inSomeDays:
Function(
Number,
String),
inSomeMonths:
Function(
Number,
String),
inSomeYears:
Function(
Number,
String),
rightNow: String),
String,
Time,
String)
Here is the relevant code snippet:

/home/---/Desktop/mint-learning/tests-project/.mint/packages/mint-ui/source/DatePicker.mint

Checkout Example: Country-Select cut-off

https://ui.mint-lang.com/examples/checkout

The country select is partially cut-off.

Tested with Firefox Developer Edition (88.0b9) and Chrome (90.0.4430.85) on MacOS Big Sur (11.2.3).
Screenshot 2021-04-22 at 10 39 46


BTW: Selecting a country on such lists is always really annoying. If I want to select "Germany" (sometimes they also translate it, then I would have to search for "Deutschland"), I need to find the item somewhere in the list. Luckily - at least with a native select - I can press "G" on my keyboard which brings me to that section. But unfortunately, that doesn't seem to be supported with Ui.Select.

Getting in touch

Hi,
This is not an issue per se. I just would like to know more about mint as this looks very interesting and somewhat in line with some thoughts I've been having about creating gui's. The thing that peeks my interest, is the fact that your using svg for common elements. That leads me to think that animation will be a first-class citizen of the library, which is usually just an afterthought.
Am I right?
If so, is there some way I can contribute?
Btw: the language looks nice to 👍

Syntax Error: I was looking for a branch of a case expression but found Maybe::Just instead.

When I add UI as a dependency of a basic project (mint init ...), run mint install, and mint start, error shows up on the main page saying:


Syntax Error

I was looking for a branch of a case expression but found Maybe::Just instead.

Here is the relevant code snippet:
mint/packages/mint-ui/source/Modal.mint
      () {
        case (base) {
          Maybe::Just comp => comp.focusFirst()
          Maybe::Nothing => next {  }
        }
      })
  }

Any hints? Thanks.

Ui.Tab is not working

Hi!

I'm getting familiar with mint and mint-ui, and as a first step I read through the docs/examples.
I noticed that Ui.Tab is not working on https://ui.mint-lang.com/documentation/tabs, when I click the other tab the content remains the same. I tried it out locally (checked with the develop branch as well) and got the same result.

I haven't looked into it, but I thought I'd point it out.
Keep up the good work!

[FEATURE] format property for Ui.RelativeTime and Ui.DatePicker

the format currently used is "YYYY-MM-DD". The format property would make possible the inputs have the formats:

  • "YYYY-MM-DD"
  • "YYYY-DD-MM"
  • "MM-DD-YYYY"
  • "MM-YYYY-DD"
  • "DD-MM-YYYY"
  • "DD-YYYY-MM"

  • "YYYY/MM/DD"
  • "YYYY/DD/MM"
  • "MM/DD/YYYY"
  • "MM/YYYY/DD"
  • "DD/MM/YYYY"
  • "DD/YYYY/MM"

Color Picker: Changes width when dragging color handle

First of all, I’m amazed at the quality & quantity of the components. That's really astonishing 🎉


When dragging around the color handle on the Color Picker, the hex value changes. Since not all characters are rendered with the same width, the overall width of the button changes.

Expected: Button & Popup keep the same width, regardless of the button content.

Actual: The button changes the width and then the popup also changes the width.

One way this could be fixed is by changing the font family to a monospaced font on the span. Then the individual characters would be the same width regardless of the actual character.

Tested with Firefox Developer Edition (88.0b9) and Chrome (90.0.4430.85) on MacOS Big Sur (11.2.3).

mint_ui_color_picker.mov

Syntax error when running mint start after installing

I'm just trying mint and I initialised a new project, added the dependency, ran install and now when I run start I get this error.

I was looking for a branch of a case expression but found Maybe::Just instead.
Here is the relevant code snippet:
.mint/packages/mint-ui/source/ActionSheet.mint
      Timer.timeout(100, "")

      case (container) {
        Maybe::Just element => Dom.focusFirst(element)
        Maybe::Nothing => next {  }
      }

      case (scrollContainer) {
        Maybe::Just element => Dom.scrollTo(element, 0, 0)

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.