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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fractalcms/aurelia-select-beautiful

v1.1.0

Published

Custom Select component for Aurelia 2

Downloads

15

Readme

@fractalcms/select-beautiful

Un composant Select multi-sélection et accessible pour Aurelia 2, conçu pour être simple, élégant et extensible. Compatible multi-sélection, recherche intégrée, navigation clavier et ARIA live pour l’accessibilité.

Installation

npm install @fractalcms/aurelia-select-beautiful

Ajouter le composant

import Aurelia from 'aurelia';
import { MyApp } from './my-app';
import { SelectBeautiful } from '@fractalcms/aurelia-select-beautiful';

Aurelia
  .register(SelectBeautiful)
  .app(MyApp)
  .start();

Ajout des styles CSS

Le composant ne surcharge aucun style global et ne s’injecte pas automatiquement. Pour appliquer ses styles, importez simplement la feuille CSS dans votre fichier global SCSS ou CSS :

@import "@fractalcms/aurelia-select-beautiful/dist/styles/select-beautiful.css";

Cette méthode est compatible avec Webpack, Vite et Aurelia CLI. Elle garantit que vos styles de site ne sont jamais altérés.

Exemple d'utilisation

<select multiple fractalcms-select-beautiful.bind="{ theme: 'green'}">
  <option value="1">Option 1</option>
  <option value="2">Option 2</option>
</select>
<select fractalcms-select-beautiful="">
  <option value="1">Option 1</option>
  <option value="2">Option 2</option>
</select>

Fonctionnalités incluses

  • Recherche textuelle dynamique
  • Navigation clavier (↑, ↓, Entrée, Échap)
  • Sélection multiple avec suppression
  • Accessibilité ARIA (live region, multiselect, etc.)

Thèmes CSS

| Thème | Description | Exemple | | --------------------- | ----------------------------------- |-------------------| | soft (par défaut) | Clair, doux et neutre | theme: 'soft' | | dark | Fond sombre, texte clair | theme: 'dark' | | blue | Accent bleu professionnel | theme: 'blue' | | red | Accent rouge moderne | theme: 'red' | | green | Accent vert équilibré | theme: 'green' | | custom | Thème utilisateur (voir ci-dessous) | theme: 'custom' |

Exemple

<select fractalcms-select-beautiful.bind="{theme: 'blue'}" multiple>
  <option value="1">Bleu</option>
  <option value="2">Vert</option>
</select>

Créer un thème personnalisé ('custom')

<select fractalcms-select-beautiful.bind="{theme: 'custom'}" multiple>
  <option value="1">Bleu</option>
  <option value="2">Vert</option>
</select>
.theme-custom.select-beautiful {
  .select-beautiful--item---item {
    border: 2px solid #ff9900;
    color: #ff9900;
  }

  .select-beautiful--item---item-close {
    background-color: #fff5e6;
    color: #ff9900;
    border: 2px solid #ff9900;
  }

  .select-beautiful--search---input {
    border: 2px solid #ff9900;
  }

  .select-beautiful--search---list--items {
    border: 2px solid #ff9900;

    &---option[aria-selected="true"] {
      background-color: #ff9900;
      color: white;
    }
  }
}

Ce mode vous permet d’adapter le composant à la charte graphique de votre application sans modifier le code source du package.

Options

| Option | Type | Default | Description | |-----------------------|---------------|----------------------------------------------|----------------------------------------| | theme | ECssTheme | 'soft' | Select theme | | searchPlaceholder | string | 'Rechercher' | Search Input placeholder | | searchInputName | string | 'model[search]' | Search Input name | | removeText | string | 'retiré' | ARIA text when item removed | | removeAllText | string | 'Toutes les sélections ont été supprimées' | ARIA text when item removed | | addText | string | 'ajouté' | ARIA text when item added | | eventChangeItemName | string | 'fractalcms-select-change' | Event dispatch name wher select change |

Evénement de changement

Le composant déclenche un événement personnalisé à chaque modification de sélection :

this.element.addEventListener('fractalcms-select-change', (e: CustomEvent) => {
  console.log('Valeurs sélectionnées :', e.detail);
});

Accessibilité (A11y)

Le composant suit les bonnes pratiques ARIA :

  • aria-live pour annoncer les ajouts/suppressions
  • aria-multiselectable et aria-selected sur les options
  • aria-activedescendant pour la navigation clavier
  • Support total pour lecteurs d’écran

Développement Local

# Installation des dépendances
npm install

# Build complet
npm run build

# Watch (TypeScript + SCSS)
npm run watch

License

license