npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@xsoulspace/vue_flutter_tailwind

v0.7.2

Published

Vue3 styled like Flutter with Tailwind CSS

Downloads

52

Readme

Vue3 styled like Flutter with Tailwind CSS

Gitter chat

Please notice: this project is a work in progress and completely experimental!

The reason & motivation why this project have been started is a question: Flutter & Dart awesome! Vue3 & Typescript & Tailwind awesome too!

But...

Flutter is not working inside Excel:( and its kind of complicated to work with web libraries.

So, what if we will write Vue3 TS in style of Flutter, because it's just simplier and faster?

Please notice:

  • It is not a Flutter at all and even close, but hopefully will be use its style of components & methods writing.
  • It is not properly written at all and cannot be used in production until release 1.
  • It is not aligned to any standard yet and do not have any styling at all and it looks bad:) as primary focus now is to write basic widgets.
  • All is subject to change until release 1.
  • If you like this project - contributing &|| star is very welcome and appreciated and will keep development running Open Source and free:)

Awesome tools used

Installation

Add this package to your package.json file:

"dependencies": {
  "@xsoulspace/vue_flutter_tailwind": "next"
}

add styling to your main.ts

import '@xsoulspace/vue_flutter_tailwind/dist/vft.css'

add styling to app div (temporary and will be removed during Scaffold widget refactoring)

<div id="app" class="absolute left-0 right-0 top-0 bottom-0"></div>

Usage

export const wrapperApp = () => {
  const text = ref('Hello world!')
  const text2 = ref(2)
  const padding = EdgeInsets.all(EdgeInsetsStep.s3)

  const textCard = Padding({
    child: Text({
      text,
    }),
    padding,
  })

  const btn = ElevatedButton({
    child: Text({ text: ref('Hello Button') }),
    onPressed: () => {
      text2.value++
      text.value = `Hello Wolrd! Counter: ${text2.value}`
    },
  })

  return Scaffold({
    body: Align({
      toOverlay: true,
      alignment: Alignment.bottom,
      child: Container({
        padding,
        decoration: new BoxDecoration({
          boxShadow: BoxShadow.xl,
          borderRadius: BorderRadius.vertical({ bottom: BorderRadiusStep.xxl }),
        }),
        child: Row({
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            MouseRegion({
              child: btn,
              cursor: SystemMouseCursor.use({
                cursor: SystemMouseCursors.click,
              }),
            }),
            textCard,
          ],
        }),
      }),
    }),
  })
}

Roadmap

Ready to test and possible to use

  • [] Provider

Usage:

Let's suppose we have a model:

export class Hero {
  constructor(public name: string) {}
}
export class HeroesModel {
  heroes = reactive<Maybe<Hero>[]>([])
  add(hero: Hero) {
    this.heroes.push(hero)
  }
  get count() {
    return this.heroes.length
  }
}

Create Provider on top of tree

MultiProvider.create({
  models: [HeroesModel],
  child: wrapperApp(),
})

And somewhere in tree just call

const heroModel = MultiProvider.get<HeroesModel>(HeroesModel)
  • [x] Text Widget, FontWeight, TextDecoration, TextStyle, TextAlign, TextOverflow
  • [x] Alignment, Align, Center
  • [x] Padding
  • [x] Margin
  • [x] ButtonStyleButton
  • [x] Flex
  • [x] Row (Flex -> row)
  • [x] Column (Flex -> column)
  • [x] DividerDecoration (only for Row, Column)
  • [x] MouseRegion
  • [x] TextButton
  • [x] Elevated Button
  • [x] ListView.builder made with vue3-virtual-scroller - must be placed inside SizedBox to have defined size
  • [x] ConstrainedBox
  • [x] SizedBox
  • [x] Opacity [x] widget [x] Text
  • [x] ColoredBox
  • [x] CheckboxListTile
  • [x] ListTile
  • [x] Grid, GridTile with awesome vue-grid-layout
  • [x] Wrap (Flex - flex-wrap)
  • [x] Dialog

Usage

First - get NavigationController in setup

Be sure that you have Navigation widget on top of tree

const navigationController = MultiProvider.get<NavigationController>(
  NavigationController
)

Second call a function from for example Button.onTap:

ElevatedButton({
  child: Text({
    text: ref('Show dialog'),
  }),
  onTap: () => {
    showDialog({
      builder: Dialog({
        child: Text({ text: ref('Hello World') }),
      }),
      navigationController,
    })
  },
}),

To close, just use navigationController.pop()

  • [x] Navigation & NavigationController

    • [x] Popup (with background) functionality
    • [x] Fullscreen functionality
  • [x] MultiDropdown Button

Usage:

Create controller in setup or anywehere and give generic type to use

const IndexedText {
  id: string
  text: string
}


const multiDropdownController = new MultiDropdownFieldController<IndexedText>(
  { keyofValue: 'id' }
)

Then use MultiDropdownButton with DropdownMenuItem in items to make it work

MultiDropdownButton({
  controller: multiDropdownController,
  items: dropdownItems.map((el) =>
    DropdownMenuItem({
      child: Text({
        text: ref(el.text),
      }),
      value: el,
      key: el.id,
      title: el.text,
    })
  ),
}),

To get or change selected values use: controller.value

Usage:

Add controller into MultiPorvider and Navigation widget below:

MultiProvider.create({
  models: [NavigationController, ...],
  child: Navigation({
    child: ...,
  }),
})
  • [x] DropdownButton, DropdownButtonItem [x] functionality [] decoration

  • [] Visibility [x] functionality [] animation

  • [] TextField [x] Basic properties [x] TextEditingController [] InputDecoration (partially) [] TextStyle

  • [x] Checkbox [x] Basic [] Style

WIP

  • [] GestureDetecture [x] click [] tap [] swipes [] hover

  • [] Container [x] Border [x] BorderRadius [x] Color [x] Shadow [] Margin [x] Padding [] Color Opacity ? Border Color Opacity [] Shape [] Gradient [] Alignment [] Image [x] Height [x] Width

  • [] Material

  • [] InkWell

  • [] Colors [x] White, black [] Color palette

  • [] Scaffold

Next

  • [] Flexible
  • [] OutlinedButton
  • [] Ripple
  • [] Drawer
  • [] Progress
  • [] Card
  • [] AppBar
  • [] Icon
  • [] IconButton
  • [] Bar
  • [] ButtonBar
  • [] ListView, ListView.separeted
  • [] Object Fit - FitBox?, FittedBox?

Current Problems:

  • [] Tailwind included as package, but needs to be included to main.ts(js) when this package added. Maybe it's a wrong way..
  • [] Sizes cannot be set as numbers.

Changelog

Changelog can be found in Releases