Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 24 Jul 19:28
· 30 commits to master since this release

2.0.0 (2024-07-24)

Bug Fixes

fixed build:types not exiting when it has errors (31bf76e)

fixed missing onInput attribute for the simple input component (2c4c93c)

Also cast the event type as InputEvent instead of vue's Event type.

fixed color picker input (dab0778)

fixed types of individual imports (a6612fe)

added missing types folder to package.json (39d7d29)

fixed Fa attribute types (4248718)

fixed .gitignore (915ff9c)

added vue-ignore to eslint's known jsdoc tags (e102285)

moved vue from devDeps to deps (7ff807b)

added missing playground vite config and dev script (b2e2d8a)

fixed missing components import (2707d83)

added missing types property in some exports paths (c6b84ea)

fixed aria auto-title (460506e)

fixed file input focus outline, added new focus-outline-within tailwind class (b92438c)

fixed non-multiple file input showing file count (2a12b68)

input value now resets to model value on blur in case model value wasn't changed (dddff45)

close suggestions in the input component when a suggestion is submitted (9cf08f1)

all label props in input are now also passed to the slot (1f9b1e6)

clicking on label whitespace no longer focuses input (f5ed2ea)

Clicking on the label itself still works.
BREAKING CHANGE: The label whitespace fix is a breaking change because it changes the layout of the label.
Style top no longer automatically does w-full. You must place an additional

after the label.
The top style will probably be removed in the future.

prevent recorder from emitting click event when pressing space (a9ba47a)

fixed some bugs with suggestions when they aren't restricted or filtered (220a7f3)

fixed listeners not getting correctly removed (9402014)

fixed input accidentally becoming multi-value input (e52934b)

We were not properly checking whether multi-value was enabled or not.
An incorrect implementation of "addValue" (now removed) was masking the problem.

input not correctly re-emits events it also listens to (1f8b27e)

fixed several issues with suggestions (44be50f)

  • It now also emits "submit" properly on any "intentful" selection (pressing enter or directly clicking)
    instead of just when multiple values are enabled.

exposed table config as a type (TableColConfig) (d58c16d)

BREAKING CHANGE: colInfo prop is now colConfig

fixed input suggestions not closing properly (b31053f)

fixed input padding issues (5c99f2e)

fixed checkbox cursor on hover (980b64d)

renamed plugin from MyLibPlugin to VueComponentsPlugin (636beb0)

BREAKING CHANGE

fixed checkbox value type (a8d934a)

twMerge now takes into account custom focus-outline class (8fa714f)

fixed slot padding in input (eaabbf8)

fixed types and lint errors (60518ef)

  • generic types still have some problems

fixed incorrect alignment in notification without title (cbad11e)

  • Fixed single notification story.
  • Added story for this.

fixed autoTitle setting title as false (4eb1a3f)

fix useDivideAttrs not generating keys for all divisions even if empty (668dbd8)

fixed button looking vertically off center next to other elements (9acbd9e)

  • The sm shadow is too far down, added custom subtle shadow.
  • Also added slight highlight to make buttons pop better in dark mode.

removed tailwind utilities import from utilities.css (5b64e12)

The downstream user can then choose to import them or not.

removed usage of some tailwind colors that shouldn't have been used (708462f)

  • added a recorder color since that doesn't need to be danger red

removed accidentally left in border (a78b9eb)

fixed useDivideAttrs not correctly dividing attributes (24c1f6e)

fix missing indicator class in input component (14da66d)

fixed all typescript errors (4ce1bbf)

Features

allow file input to take in any format by passing empty array (a95d74a)

Also added stories/test for this and the error handler.

dropped fontawesome in favor of unplugin-icons (3558b6b)

BREAKING CHANGE: The Fa fontawesome component has been removed.

  • There is now an icon component but it is not for "picking" an icon, just a
    wrapper to make it have the right height when it's alone in a div.

  • Instructions have been added for how to add unplugin to a downstream project
    to use it similarly to how it's used internally.

  • Any components that took in an icon prop no longer do.

  • The button component no longer has an icon slot nested inside the label slot,
    but separate icon, iconAfter, and label slots.

improved input dropdown when it's borderless (d64dacf)

make select like input/suggestions require submission (24c6595)

  • The suggestions component now shows the suggestions when there is one matching suggestion.
  • The input now doesn't change the modelValue when restrictToSuggestions is true.
    The user must hit enter to submit.

added ability to use the library's global ambient types via a reference tag (70054c4)

  • Ended up removing the AdditionalProps interface. It overcomplicated things.

added a darkmode "switch" component (tri-state button) (87fd40e)

added several options an features to useDarkMode (d750367)

moved to type only props + proper attribute types (624a243)

This involved some convoluted workarounds, but it should mostly work.

  • Components are know able to take the attributes of html attributes
    they extend without error.

  • Components which can be passed attributes to different parts of them
    (i.e. wrapper attributes via wraper-attr-name) now have these correctly
    typed, so autosuggestion should work.

  • The AdditionalAttributes interface has been added which you can extend
    to more easily allow more attributes. The package no longer auto extends them, except
    for a few specific attributes.

  • All components now use type only defineProps, so the previous workaround
    to get around this problem has been dropped and types should be more
    accurate, since before they were limited.

added ability to center popup to screen (dd55c28)

added ability to pass attributes to popup (adccea6)

added more imports to allow importing other things directly (ddca781)

improved treeshakeability (bd93091)

  • only uses direct imports to utils library now
  • vue register* functions have been moved so we aren't importing all components from the index file
  • several minor type fixes
  • removed type fixes for baseUrl and aliases (baseUrl only renames because of an unrelated bug)

added experimental useScrollNearContainerEdges (7b44d82)

added function to register only some components (ef3dc13)

Treeshaking doesn't work if registering all components globally with the plugin.
This allows more selective importing.

components now also automatically registered in PascalCase as well (aa341db)

exposed several more properties to the table slots (e28ae19)

recorder element can allows binding to it directly (5d29633)

notifications now support significant whitespace (3054fa3)

improved file input error (c07980e)

  • it now uses real errors
  • the error type if available for importing
  • basic error message is provided

added title prop to debug component (935ed11)

added error handling to file input (c7bc2d9)

added automatic extension + mime type validation to file input (a338d9f)

  • also should more correctly emit now
    BREAKING CHANGE: file input now requires both filetypes and
    mimetypes to be passed and a file must match one of both

added useGlobalResizeObserver for easier globalResizeObserver usage (9e5fff6)

improved how attributes are passed to wrappers (734a35a)

BREAKING CHANGE: anything that previously used *Attrs properties to pass attributes
needs to be changed to *-property-name, so :wrapperAttrs="{class:``}" becomes wrapper-class.

BREAKING CHANGE: Font awesome wrapper no longer has fixed-width attribute by default.

useDarkMode composable (ceb7f13)

improved suggestions (636dda1)

The suggestions logic is now de-coupled from the component and can be re-used if
needed.

  • The submit event also works more consistently.

  • The open/close logic in general has been cleaned up.

  • Added a suggestionSelector prop option for determining which option to
    select (this can be used to implement fuzzy matching).

  • You can now filter the handling of all events to the suggestions component.
    BREAKING CHANGE: - isValid, isOpen and activeSuggestion are no longer v-models. isValid
    is only a prop, the others are now only events.

  • The suggestions component should be controled instead from the suggestions
    object it exposes which contains all the variables and functions from the
    composable. Before these were partially exposed at the root.

  • The component is no longer generic for the model or input value only for the
    suggestions list and it still has some edge cases to iron out. In general though
    it works better than before.

  • data-is-active-suggestion has been removed, given aria-selected is the same
    thing.

  • The way the submit event works is now slightly different.

added export of the twMerge config used (twMergeExtend) (e6ff086)

nuxt: added direct directive imports and ability to pick imports installed by vue plugin (46aec8c)

nuxt: added nuxt autoImport for twMerge (a46abaf)

Code Refactoring

helpers cleanup (db051f4)

BREAKING CHANGE: Deleted several now redundant helpers. Many will also be moved to the utils package in future.

BREAKING CHANGES

  • The Fa fontawesome component has been removed.
  • There is now an icon component but it is not for "picking" an icon, just a
    wrapper to make it have the right height when it's alone in a div.

  • Instructions have been added for how to add unplugin to a downstream project
    to use it similarly to how it's used internally.

  • Any components that took in an icon prop no longer do.

  • The button component no longer has an icon slot nested inside the label slot,
    but separate icon, iconAfter, and label slots.

  • The label whitespace fix is a breaking change because it changes the layout of the label.
    Style top no longer automatically does w-full. You must place an additional
    after the label.
    The top style will probably be removed in the future.
  • Deleted several now redundant helpers. Many will also be moved to the utils package in future.
  • colInfo prop is now colConfig
  • file input now requires both filetypes and
    mimetypes to be passed and a file must match one of both
  • anything that previously used *Attrs properties to pass attributes
    needs to be changed to *-property-name, so :wrapperAttrs="{class:``}" becomes wrapper-class.
  • Font awesome wrapper no longer has fixed-width attribute by default.
    • isValid, isOpen and activeSuggestion are no longer v-models. isValid
      is only a prop, the others are now only events.
  • The suggestions component should be controled instead from the suggestions
    object it exposes which contains all the variables and functions from the
    composable. Before these were partially exposed at the root.

  • The component is no longer generic for the model or input value only for the
    suggestions list and it still has some edge cases to iron out. In general though
    it works better than before.

  • data-is-active-suggestion has been removed, given aria-selected is the same
    thing.

  • The way the submit event works is now slightly different.