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

quasar-ui-danx

v0.4.33

Published

DanX Vue / Quasar component library

Downloads

1,208

Readme

Component Danx

npm npm

Compatible with Quasar UI v2 and Vue 3.

Component Danx

Component and function library built on Quasar + Vue 3

Usage


<template>
	<ActionTable
		label="Danx"
		name="danx"
		v-model:quasar-pagination="quasarPagination"
		v-model:selected-rows="selectedRows"
		:columns="columns"
	/>
</template>
<script setup>
	import 'quasar-ui-danx/dist/index.css';
	import { ActionTable, useTableColumns, useControls } from 'quasar-ui-danx';

	const { columns } = useTableColumns([{ name: 'name', label: 'Name' }, { name: 'age', label: 'Age' }]);
	const { quasarPagination, selectedRows } = useControls({});
</script>

Setup

yarn create vue # Follow instructions for settings up new Vue App
yarn add quasar-ui-danx quasar
yarn add -D sass vite-svg-loader tailwindcss eslint eslint-plugin-import autoprefixer

Setup PHPStorm

  • Disable Typescript language service
  • Setup node_modules directory as a library
  • Configure tsconfig.json
{
  "include": [
    "node_modules/quasar-ui-danx/**/*"
  ]
}
  • Configure vite.config.ts
export default ({ command }) => {
	// For development w/ HMR, load the danx library + styles directly from the directory
	// NOTE: These are the paths relative to the mounted quasar-ui-danx directory inside the mva docker container
	const danx = (command === "serve" ? {
		"quasar-ui-danx": resolve(__dirname, "../quasar-ui-danx/ui/src"),
		"quasar-ui-danx-styles": resolve(__dirname, "../quasar-ui-danx/src/styles/index.scss")
	} : {
		// Import from quasar-ui-danx module for production
		"quasar-ui-danx-styles": "quasar-ui-danx/dist/style.css"
	});

	return defineConfig({
		resolve: {
			alias: {
				...danx
			}
		},
	});
}
  • Add node_modules as a library in PHPStorm
    • Settings -> Directories -> Add
    • Create a new directory w/ name node_modules and set the directory to the node_modules directory in your project
  • Symlink Danx UI library
    • FOR LOCAL DEVELOPMENT ONLY: if you plan on updating Danx UI
      • Symlinking the danx UI library allows for better integration w/ PHPStorm + tailwindcss + HMR w/ vite.
        • NOTE: Setting this up w/ npm link or trying to modify tsconfig.json / vite.config.ts only can be quite challenging to get everything configured correctly. I found this to be the best solution.
    • copy/paste and run ./danx-local.sh
      • (recommended) Configure yarn / npm to always run this after updating packages
        • Add {"scripts: {..., "postinstall": "./danx-local.sh"}} to your package.json
    • (or manually symlink node_modules/quasar-ui-danx to ../../quasar-ui-danx/ui/src)
      • Directory structure of your project relative to quasar-ui-danx:
- parent-directory
  - your-app
    - tsconfig.json
    - vite.config.ts
    - src
    - node_modules
      - quasar-ui-danx -> (symlink) ../../quasar-ui-danx/ui/src
  - quasar-ui-danx
    - ui
      - src
      - tests

Setup Tailwind

Initialize config files for tailwind NOTE: vite will automatically pick up the postcss.config.js file, no need to manually configure anything

npx tailwindcss init -p
  • Rename tailwind.config.js to tailwind.config.ts
  • Setup your tailwind.config.ts:
    • Make any changes to the colors object
/** @type {import('tailwindcss').Config} */
export const colors = {}

export default {
	content: [],
	theme: {
		extend: {
			colors
		}
	},
	plugins: []
}

Developing

# start dev in SPA mode
$ yarn dev

Building package

$ yarn build

Adding Testing Components

in the ui/dev/src/pages you can add Vue files to test your component/directive. When using yarn dev to build the UI, any pages in that location will automatically be picked up by dynamic routing and added to the test page.

License

MIT (c) Dan [email protected]