- Added new property:
shortcut
theTooltip
component.
- Added experimental
left
andright
positioning to thePopover
andTooltip
components.
- Added 2 new functions to utils
getValueAtPath
andsetValueAtPath
to handle deeply and uncertain object structures.
- Improve
InputNumber
andInputMath
to better filter out invalid characters and keep the formatting.
- New component:
Grid
(alpha). This should not be used for production yet, as it's still in development (or it may even be dropped). - Use
crypto
forguid
generation inutils
.
- Fix
Combobox
issue for some edge cases.
- Fix
--ui-shadow-large
in light-mode (was a bit too dark). - Animation speed increased from 0.3 to 0.25s.
- Fix
Dialog
's rendering artifacts in Safari.
- New property for
Dialog
:modal
. - Fix square radiobuttons bug.
- Fix
MenuItem
descenders were 1px cropped when using some fonts. - Fix active style in
ButtonToggle
was showing despite the disabled attribute. - Improve js & css linting and build process.
- Upgrade dependencies.
- Hide error on
InputPassword
wherezxcvbn
wasn't loaded. - Correct icons' alignment.
- Renamed icons:
pluscircle
toplusCircle
andminuscircle
tominusCircle
. - Fix
chartLine
icon (there was/>
showing in the icon). - Fix
InputPassword
it was focusable when disabled. - Fix
InputPassword
incorrect layout whenstrength
andlabelOnTheLeft
was set.
- Fix icon alignment in
Menu
. - Fix tests to work with the latest version of svelte testing library.
- InputDate event handling race-condition fix (when enter was pressed).
- Maintenance release; updating dependencies.
- Fix
InputDate
's value setting onEnter
, after input was emptied.
Dialog
's backdrop style tweaks (add some effects to the backdrop).Popover
tip style tweaks (it's now offset using full pixels, so the tip's border will look consistently all around).
- Fix
InputRating
- it would select value on mouse-down. This - where an error message was displayed above the input - would cause the error message to be removed, and input to slide up, which would unselect the value (while mouse was down), and cause the error message to reappear.
- Minor style tweaks (label-on-the-left alignment).
- Fix tip positioning when popups are not centered on targets (for
Tooltip
andPopover
).
- Style tweak: reduce margin around
Radio
items.
- Fix
Range
- knob alignment in Safari is off. - Fix
Range
- clicking on ticks should set the value.
- More bugfixes, tests and some optimisations of the
Combobox
component. - Fix to allow to clear the value of the
Combobox
by setting its value tonull
or[]
.
- Minor bugfixes for
Popover
andCombobox
.
- Add
title
attribute to the multiselectCombobox
input, so that when it's too long, the value can be read easily.
- Add
multiselect
option to theCombobox
.
- Fix
InputDate
when picker was not in sync with the input value. - Better dropdown alignment for
Popover
andMenu
onScroll (should work if scrolling other elements beside the<body>
).
- Add
$$restProps
to some components, to allow passing through custom props. - Fix
Range
offset issue in chromium browsers.
Panel
types (color variations).- New icons (
print
). - Icon optimisations.
- Fix
InputTag
.
- Change tooltip to ticks in
Range
component, for better accessibility.
Tag
should not be clickable (or focusable) by default. It can be made interactive by adding the newclickable
attribute.
- New component:
Range
.
- New components:
InputRating
,Tag
,InputTag
,InputTime
. - Add
hideTip
and more, toPopover
. - Add
useNativeOnMobile
toInputDate
. - Fix
Popover
z-index (so that it shows over dialogs) - Many other smaller bugfixes and improvements.
- Reduce
Dialog's
z-index
so that the popups from the dialog show up on top of it.
- Make
title
optional forPanel
. - Add
ANIMATION_SPEED
to utils/properties. - Correct
FOCUSABLE_SELECTOR
(it's a constant, not a svelte store).
- New: added
Utils
page in the docs with APIs to the utility functions exposed by the library. Tooltip
was simplified and now the positioning ensures that the tooltip is always visible on the screen.Popover
will now update its position when the window is resized.- The tip of the
Tooltip
andPopover
will now try to be centered on the target element (if the box was offset from the screen edge). - Improved keyboard focus for notifications: when a notification is dismissed from the keyboard (Escape) the focus will be moved to the next available notification.
- Improved & standardised z-index throughout the components.
- Tweaked
Menu
positioning to update on window resize. - Tweaked
MenuItem
for responsiveness (e.g. add ellipsis if the text is too long).
- The
events
property was dropped from theTooltip
, leaving hover and focus events as the default. For use cases when the click was needed,Popover
should be used instead. z-index
value of thePopover
andTooltip
has been reduced from9999
to99
, so that it's closer to the content it describes. Ideally tooltips should slide under some other floating elements of the UI (like toolbars or drawers), while remaining above the content layer. This can be o overriden in the app's own css if needed.
- Standardise
InputSearch
UX: clear button and Escape-to-clear behaviour now works the same in different browsers. - Enhance
Popover
so that it updates its position after it detects a content change. - Expose
Popover
'supdatePosition
function. - Tweak the dropdown-align function for popover.
- Fix
InputRadio
group block padding.
- New:
Popover
component. If aDialog
andTooltip
had a child - this would be it. It's a container that can be opened like a dialog, but will be attached to the target element (like a tooltip). It's a great way to display additional information or actions for a specific element on the page. It can contain other components (e.g. buttons) and can serve as a free-form menu. - Fix popover above the target styling.
- Simplify & refactor
Tooltip
to share more code withPopover
. Styling and core functionality is now almost the same, while the UX and usage remains a bit different.
- Inputs with dropdowns (e.g.
Combobox
andInputDate
) will not trigger page scroll on focus (in mobile Safari). Combobox
dropdown will now auto-adjust its position when the virtual keyboard opens (in mobile Safari).:focus
has been updated to:focus-visible
for non-input elements, for a better look.
- Improve
InputRadio
styling to look more like the rest of the inputs (e.g. checkbox). - Standardise font sizes into css variables:
--ui-font-xs
=14px,--ui-font-s
=15px,--ui-font-m
=16px,--ui-font-l
=17px,--ui-font-xl
=22px - Correct the symbol for Return (⏎) in
Menu
. Menu
can now be centered with the target button (usingalign
attribute).- Context
Menu
will now open above the long-pressed spot on mobile (by default). - Pressing the same letter key, with the
Menu
open will now cycle through the items starting with that letter. - Pressing space with the
Menu
open, while typing something quickly, will not trigger the click event on the currently selected item. This allows to type-to-highlight elements that contain space in the text. Pressing space standalone (while not typing), will trigger the click event.
- Removed
--ui-margin-xl
and--ui-margin-xxl
as they were not used. - Merged
--ui-border-radius-s
with--ui-border-radius
and changed to a rem value that calculates to the whole pixel (so that browsers would render it better). - Fixed the
NotificationCenter
issue, where toasts would not close if navigated away from the page that initialises the component. - Tweaked dialog border-radius to render a bit better (for dialog's header and footer).
- Aligned components heights (
Menu
,Combobox
, andInputRadio
items). - Fixed
Menu
's longpress event to not triger when moving the finger (touchmove should stop longpress). - Improve navigation swipe event (swiping can now be triggered by any element that is not scrollable and has no scrollable ancestors).
- Increased
Menu
font size slightly, while decreasing it for everything (102% -> 100% onbody
).
- New:
InputSearch
component. Not much more thanInputText
, except the search icon and (depending on the browser) - the clear button. - Fixed a weird and edge-case issue with
Menu
on mobile Safari (#119).
data
attribute inCombobox
is deprecated. It will be removed in the next major version. Useitems
instead.Combobox
andMenu
now use the same align function (for consistency and performance) and there's no need to addelevate
attribute to either of them, as both popups are rendered inside thebody
element and are only added to the DOM, when they are opened (to avoid polluting the DOM with unnecessary elements).
- Improved
PushButton
pressed styling. - Some buttons should now react faster on mobile (touch-action added to notification buttons and all inputs, selects and textareas).
PushButton
now has better contrast (when pressed).- Fixed
showMessage
style for long messages on mobile. - Fixed password strength popup style.
- Docs: fancy font should be applied do docs only, not to the components.
- Docs: try swipeRight on mobile to open sidebar.
- Added touch-action: manipulation to
Label
and some other missing places.
- Small table style tweaks
- Docs improvements
- Bring back
--ui-color-accent-semi
and--ui-color-highlight-semi
colors. Combobox
andInputDate
buttons should not be tabbable.Combobox
andInputDate
buttons should toggle the dropdown on click.
- New: All inputs have a new attribute
labelOnTheLeft
which allows to move the label to the left of the input.
- New: Check the platform on load and add a
mobile
ordesktop
class to thehtml
element. - Fixed: Menu separator is now aligned with menu items.
- Fixed: Notifications Archive "Clear all" button is now back to normal.
- New:
Label
component. - New icons:
sun
andmoon
for the dark-theme switchers. - Improvement:
info
,error
andlabel
attributes are now supported on other inputs (Combobox
,InputDate
,Select
,ButtonToggle
, andToggle
). - Improvement: all components now expose
element
andinputElement
(if there is one (and only one)). The exceptions areNotificationCenter
andMessageBox
, due to their implementation. - Added
title
attribute toButtonToggle
. - Added
success
type forMessageBox
. - Fixed
selectable=false
not working onTable
. - Improved styling for
Dialog
andMessageBox
.
- Color palette has been completely revamped for better accessibility (more contrast), consistency and simplicity (fewer colors and css variables).
Autocomplete
has been renamed toCombobox
as this is what it really is.Datepicker
has been renamed toInputDate
.Toaster
component has been removed. UseNotificationCenter
instead.Select
- HTML structure has changed:.select-wrap select
-->.select .input-inner .input-row select
Table
- CSS classes have changed from.table-wrapper table.table
-->.table table
Toggle
- HTML structure has changed from.toggle .toggle-inner .toggle-scroller input
-->.toggle .toggle-inner .toggle-label .toggle-scroller input
drawBorders
attribute has been removed fromDialog
, while header and footer styling has been improved for all dialogs.- These components previously exposed
_this
, which is now calledelement
:Button
,Checkbox
,InputMath
,PushButton
,Table
--ui-color-text-dark-1
-->--ui-color-text-1
--ui-color-text-dark-2
-->--ui-color-text-2
--ui-color-border-dark-1
-->--ui-color-border-1
--ui-color-border-dark-2
-->--ui-color-border-2
--ui-color-background-light-2
-->--ui-color-background-1
--ui-color-background-dark-2
-->--ui-color-background-2
--ui-color-highlight-dark-2
-->--ui-color-highlight-1
Other (not mentioned above) color variations, (i.e. -light-
and -dark-
) have been removed.
- Fix
Checkbox
label (don't render empty label if no label attribute was passed).
- Fixed some
NotificationCenter
bugs.
- Improve
Panel
component with new properties:collapsible
(it's not collapsible by default), anddisabled
.
- Add
success
to theInfoBar
component. - Behind the scenes refactoring and improvements.
Textarea
component now follows all basic inputs and supporterror
,info
, andlabel
properties.- Notifications are now centered on mobile screen sizes.
- New: InfoBar component.
- New: InputText, InputNumber, and Radio components.
- New:
info
,error
andlabel
attributes are now supported on all basic inputs (InputText
,InputNumber
,InputMath
,InputPassword
,Radio
, andCheckbox
). - Improved:
InputMath
component: support for()
characters, to allow for more complex expressions.
- HTML structure changed
input
-->.checkbox .checkbox-row input
on:change
is called with a svelte event instead of the native one, so:e.target.checked
is nowe.detail.checked
- HTML structure changed
.input-math-wrapper input
-->.input-math .input-inner .input-math-row input
- HTML structure changed:
input
-->.input-number .input-inner input
- HTML structure changed:
.input-password-wrapper .input-password-row input
-->.input-password .input-inner .input-password-row input
--ui-shadow-invalid
-->--ui-shadow-danger
- Allow HTML in
MessageBox
. - Improve styling for multi-line messages in
MessageBox
.
- New:
MessageBox
component for displaying quick info/warning/error messages or confirmation dialogs (replacement for browser's nativealert
andconfirm
).
- Fix
Menu
show and hide events and clearing the highlight on mouse out.
- New:
NotificationCenter
component. This will eventually replaceToaster
, as it's more accessible and powerful. Toaster
component is now deprecated and will be removed in the next major version.PushButton
changes:- remove
link
andtext
types, as they don't make sense (pushed state would not be visible). - fix
outline
type styling. - update the event passed to the
on:change
callback (rename property fromevent.detail.value
toevent.detail.pressed
). - fix
PushButton
keyboard events (pressing Space or Enter would not trigger theon:change
event).
- remove
Menu
improvements:aria-expanded
attribute was incorrectly being added to thebody
on menu open (apart from the target button).- Tabbing does not move focus out of the menu anymore (it will cycle through the menu items).
- simplify html structure (
ul
->menu
,li/button
->button
)
Toaster
enhancements:- Improve contrast (reduce the transparency).
- Make toasts focusable (so that they can be closed with
Escape
). - When toasts are focused or mouse is over them, the auto-close progress will pause.
- Fix
button-toggle
not working on mobile.
- Bring back
--ui-shadow-small
property. Menu
performance improvements: menu will not be rendered until it's opened.
Select
now also accepts an array of strings for items.ButtonToggle
now also accepts an array of strings for items.em
torem
, as it's more consistent and predictable.
- Standardise button height to match all the other controls.
- Standardise placeholder and input-icon colours.
- Enhance Autocomplete's and DatePicker's input-icon click experience.
- Size the icons in
em
notpx
.
- Maintenance update: upgrade dependencies, remove yet another useless a11y warning from svelte zealots.
Menu
highlighting upgrade:ArrowDown
on the last item will highlight the first item,ArrowUp
on the first item will highlight the last item.
- Change the default color for a secondary button.
- Add
info
type toButton
component (that takes the colour of the previousdefault
). - Fix round button (with text) aspect-ratio lock.
- Improve
<InputPassword/>
component: don't rerender when eye button is clicked, minor alignment style tweak. Autocomplete
keyboard scrolling alignment fix (highlighted item was partially cropped).
- Remove the need to inline svg icons in the consumer's build.
- Add
addIcon
function to allow adding custom icons. - Fix
menu.open
issue when event was not passed.
- Tweaks to allow it to be used with SvelteKit.
- New icons:
undo
andredo
. - Fix
ButtonGroup
styling for other button types.
Tooltip
style tweaks, so it's finally perfect.- Minor fix in
Tooltip
.
- Cleanup.
Menu
on-close should resolve instantly, when the menu is already closed.Menu
new attributealign
allows to align the menu to the right with the target.
- Handle svelte's newest a11y warnings.
- Tweak media query notation.
- Remove menu of type='input'.
- Allow
data-
attributes onButton
andMenuItem
. - Fix Menu target button's
aria-expanded
attribute (wasn't set tofalse
on menu close).
Tooltip
tip was upgraded to take advantage of the newclip-path
property.Tooltip
tip was enhanced with color variations:success
,warning
anddanger
.
Table
will not listen to events when it's not the target.Dialog
buttons can now be navigated with left & right arrow keys for convenience.
ButtonGroup
styling tweaks (edge buttons padding alignment)
- enhance
MenuItem
component (add props: class, disabled, icon, success, warning, danger)
- Also pass event target in menu
on:close
event.
- Fix: menu
on:open
event was missing.
- move tooltip custom class attribute to the tooltip itself, not the content (so that it can easily overwrite the background color).
- revert some tooltip changes (
events
prop is actually useful)
- simplify tooltip (change bg color to
accent
, dropevents
prop and default to focus + hover)
- disable svelte false-positive a11y warnings. See svelte#8402
- update table docs (missing
data
prop) - change button's
active
class totouching
for touch events (to not conflict with popularactive
class name that may be used by consumers)
- Fix issue where a selectable table would become non-selectable if another table on the same page was destroyed.
- Datepicker should stopPropagation on Escape, when the calendar is open.
- Review accessibility of all components (added
aria-
roles and attributes where necessary). - Tweaked some components (e.g. close Tooltip on Escape)
- Added unit tests for all components.
- Docs pages style tweaks (e.g. color palette)
- Remove
coverage
folder from the npm package.
Toggle
component has been completely rewritten to make it more flexible and perfect.
- rebrand
simple-ui-components-in-svelte
to@perfectthings/ui
- Better Menu highlighting (doesn't hl first item on open, mouseout removes the highlighting), inline with how native menus work on MacOS
- Mobile friendlier buttons (touchstart invokes :active styling)
- unit tests for some components
- Tooltip offset parameter
- PushButton fix (pushed class was not applied)
- Add back
form
property to a button
- Reduce memory footprint (removed some of the
transform
props that were no longer necessary)
- esbuild replaced rollup for speed and simplicity
- cleanup & refactoring
- Tooltip hiding fix (wasn't hiding when hovering target)
- Toaster import fix
- Tooltip fix (some console errors were popping up)
- Bring back
button-outline.css
(it was accidentally deleted in v5.0.0)
- Breaking change: renamed props for all components:
className
->class
(as it turns out it is possible to useclass
as a prop name in svelte) - Almost all components now have a
class
prop, which can be used to add custom classes to the component - Updated docs to reflect the above changes
- Docs API table is now alphabetically sorted
- Components don't use
$$props
anymore, as it was causing issues with theclass
prop. Instead, the props are now explicitly passed down to the component. This is a good thing to do, as it makes the components more explicit and easier to understand.
- Breaking change: renamed components:
Item
->MenuItem
,Separator
->MenuSeparator
- Refactored the folder structure
- Toggle's
innerWidth
function was somehow overwritingwindow.innerWidth
property (maybe a compiler issue?)
- Fix
input-number
(could not enter decimals) - Fix
input-math
(math didn't work)
- UX change: autocomplete will not close on scroll or resize events from now on (it can be changed using new properties
hideOnScroll
andhideOnResize
). - fixed: autocomplete issue, where clicking on a filtered list would not select.
- tweak: autocomplete will now show "create new item" always (when enabled), not only when the query did not match anything. Except when the query matches an item exactly.
- autocomplete should revert when entered value is not on the list
- breaking change:
cssClass
property available on some components has been renamed toclassName
(to be more aligned with the standard workaround in other libs/frameworks). - some components (where possible) are now using
$$props
to pass-through the properties of the instance down to the component.
- breaking change:
dist
folder has been renamed todocs
, as this is the only allowed name for a GH pages folder so that the GH pages is published automatically (without writing a GH action specifically for this).