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

@fluentui-vue/theme

v1.1.2

Published

This is a port of the React `@fluentui/theme` package to Vue.

Downloads

336

Readme

@fluentui-vue/theme

This is a port of the React @fluentui/theme package to Vue.

See the original README for usage. You have to update @fluentui/theme to @fluentui-vue/theme

Getting started

If you do not specify your own color palette, the default blue color palette is used. Instead of using JS variables for colors, @fluentui-vue/theme uses CSS Variables for all color slots.

All @fluentui-vue/theme CSS Variables are prefixed by fluentui-, for example: --fluentui-themePrimary.

Creating a Theme

Use the official Microsoft Fluent UI Theme Designer to create a theme.

Usage

You can provide custom color palettes in multiple ways:

CSS Variables

You can directly define CSS Variables in your DOM:

:root {
  --fluentui-themePrimary: #a00;
}

@microsoft/load-themed-styles API

The @microsoft/load-themed-styles loadStyles API allows you to create responsive CSS Variable definitions.

First, add the CSS Variable definitions with the default color palette:

import { loadStyles } from '@microsoft/load-themed-styles'

loadStyles(`:root {
  --fluentui-bodyBackground: "[theme:bodyBackground, default: #ffffff]";
  --fluentui-bodyText: "[theme:bodyText, default: #000000]";
  --fluentui-black: "[theme:black, default: #000000]";
  --fluentui-white: "[theme:white, default: #ffffff]";
  --fluentui-themePrimary: "[theme:themePrimary, default: #0078d4]";
  --fluentui-themeLighterAlt: "[theme:themeLighterAlt, default: #eff6fc]";
  --fluentui-themeLighter: "[theme:themeLighter, default: #deecf9]";
  --fluentui-themeLight: "[theme:themeLight, default: #c7e0f4]";
  --fluentui-themeTertiary: "[theme:themeTertiary, default: #71afe5]";
  --fluentui-themeSecondary: "[theme:themeSecondary, default: #2b88d8]";
  --fluentui-themeDarkAlt: "[theme:themeDarkAlt, default: #106ebe]";
  --fluentui-themeDark: "[theme:themeDark, default: #005a9e]";
  --fluentui-themeDarker: "[theme:themeDarker, default: #004578]";
  --fluentui-neutralLighterAlt: "[theme:neutralLighterAlt, default: #faf9f8]";
  --fluentui-neutralLighter: "[theme:neutralLighter, default: #f3f2f1]";
  --fluentui-neutralLight: "[theme:neutralLight, default: #edebe9]";
  --fluentui-neutralQuaternaryAlt: "[theme:neutralQuaternaryAlt, default: #e1dfdd]";
  --fluentui-neutralQuaternary: "[theme:neutralQuaternary, default: #d0d0d0]";
  --fluentui-neutralTertiaryAlt: "[theme:neutralTertiaryAlt, default: #c8c6c4]";
  --fluentui-neutralTertiary: "[theme:neutralTertiary, default: #a19f9d]";
  --fluentui-neutralSecondary: "[theme:neutralSecondary, default: #605e5c]";
  --fluentui-neutralSecondaryAlt: "[theme:neutralSecondaryAlt, default: #8a8886]";
  --fluentui-neutralPrimaryAlt: "[theme:neutralPrimaryAlt, default: #3b3a39]";
  --fluentui-neutralPrimary: "[theme:neutralPrimary, default: #323130]";
  --fluentui-neutralDark: "[theme:neutralDark, default: #201f1e]";
}`)

Now, whenever you call loadTheme, the CSS Variables are updated automatically:

import { loadTheme } from '@microsoft/load-themed-styles'

loadTheme({
  themePrimary: '#228566',
  themeLighterAlt: '#f3faf8',
  themeLighter: '#d0ebe3',
  themeLight: '#aadacb',
  themeTertiary: '#65b69c',
  themeSecondary: '#339375',
  themeDarkAlt: '#1f775b',
  themeDark: '#1a654d',
  themeDarker: '#134a39',
  neutralLighterAlt: '#faf9f8',
  neutralLighter: '#f3f2f1',
  neutralLight: '#edebe9',
  neutralQuaternaryAlt: '#e1dfdd',
  neutralQuaternary: '#d0d0d0',
  neutralTertiaryAlt: '#c8c6c4',
  neutralTertiary: '#a19f9d',
  neutralSecondary: '#605e5c',
  neutralSecondaryAlt: '#8a8886',
  neutralPrimaryAlt: '#3b3a39',
  neutralPrimary: '#323130',
  neutralDark: '#201f1e',
  black: '#000000',
  white: '#ffffff',
})

@fluentui/theme

Basic building blocks for [Fluent UI React](https://developer.microsoft.com/en-us/> fluentui) Themes

Define your own theme based on an existing theme:

import { createTheme, Theme, FontWeights } from '@fluentui/theme';

export const MyTheme: Theme = createTheme({
  components: {
    Button: {
      variants: {
        fontWeight: FontWeights.semibold,
        paddingLeft: '24px',
        paddingRight: '24px',
      },
    },
  },
});